I have declared the below variables in my main.tf file:
variable "TF_VAR_ARM_CLIENT_ID" {}
variable "TF_VAR_ARM_CLIENT_SECRET" {}
variable "TF_VAR_ARM_SUBSCRIPTION_ID" {}
variable "TF_VAR_ARM_TENANT_ID" {}
I have created these variables in Azure Release Pipelines and defined it to be accessible to all pipelines as below:
I am unable to understand why Release Job reports why these variables are not set:
2019-03-06T00:24:27.8892810Z Error: Required variable not set: TF_VAR_ARM_SUBSCRIPTION_ID
2019-03-06T00:24:27.8899867Z
2019-03-06T00:24:27.8899984Z
2019-03-06T00:24:27.8900027Z
2019-03-06T00:24:27.8900136Z Error: Required variable not set: TF_VAR_ARM_TENANT_ID
2019-03-06T00:24:27.8900190Z
2019-03-06T00:24:27.8900227Z
2019-03-06T00:24:27.8900403Z
2019-03-06T00:24:27.8900489Z Error: Required variable not set: TF_VAR_ARM_CLIENT_SECRET
2019-03-06T00:24:27.8900540Z
2019-03-06T00:24:27.8900592Z
2019-03-06T00:24:27.8900627Z
2019-03-06T00:24:27.8900692Z Error: Required variable not set: TF_VAR_ARM_CLIENT_ID
I tried to add a command line out as like below just before terraform plan,
echo $TF_VAR_ARM_SUBSCRIPTION_ID
echo $TF_VAR_ARM_TENANT_ID
echo $TF_VAR_ARM_CLIENT_SECRET
echo $TF_VAR_ARM_CLIENT_ID
Unfortunately, I do not see the values in execution,
2019-03-06T00:52:11.4389621Z ##[command]"C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "d:\a\_temp\ed34e1a6-ccc4-4168-a15b-3bd5e273d9e7.cmd""
2019-03-06T00:52:11.4490377Z $TF_VAR_ARM_SUBSCRIPTION_ID
2019-03-06T00:52:11.4491943Z $TF_VAR_ARM_TENANT_ID
2019-03-06T00:52:11.4493642Z $TF_VAR_ARM_CLIENT_SECRET
2019-03-06T00:52:11.4495118Z $TF_VAR_ARM_CLIENT_ID
I tried both ways, first make as secret and then define the value and also first define value and then make it secret but error still persist.
Any idea what could be the issue?