I have a case that marking variables as secrets loses their value in Release task, please allow me to elaborate further.
Please find below screenshot of Terraform Service principal
The above one works as variables are available in pipeline.
Take scenario, where they are secret and locked.
Now, run the pipeline and it reports required variable not set.
I have added a step to echo these variables, just to see if I can see them, here is the Release task:
I "assume" *** means actual echo, so they word in echo statement.
Not able to understand why the behavior is different:
- When in plain text, they are available in pipeline
- When marked as secret they are not available.
How to make them available in pipeline?
Updates
doing something like this:
Terraform plan -out main.plan -var "ARM_SUBSCRIPTION_ID=$(TF_VAR_ARM_SUBSCRIPTION_ID)" "ARM_CLIENT_ID=$(TF_VAR_ARM_CLIENT_ID)" "ARM_CLIENT_SECRET=$(TF_VAR_ARM_CLIENT_SECRET)" "ARM_TENANT_ID=$(TF_VAR_ARM_TENANT_ID)" It reports: 2019-03-07T00:21:19.7692360Z ##[command]"terraform" plan -out main.plan -var "ARM_SUBSCRIPTION_ID=***" "ARM_CLIENT_ID=***" "ARM_CLIENT_SECRET=***" "ARM_TENANT_ID=***" -input=false -no-color
get error
2019-03-07T00:21:19.8504985Z Too many command line arguments. Configuration path expected.