Experiencing terraform for the very time, I'm following the document from this link to put in my terraform files in a release pipeline that I have with Azure DevOps. Everything runs perfectly fine until the step where it initializes the terraform. It fails with the following error message:
The storage account itself is provisioned and the key of that also is persisted successfully in the environment variables as per the document.
The YAML I have for terraform init
in Azure DevOps Release pipeline is:
And the terraform
script for the backend service
is:
The variables are stored as environment variables inside the release pipeline and there is a replace token
task that replaces __
with string empty:
Her is the step in the pipeline that create the resource group and storage account:
And finally, the PS scripts that store the storage key in the ENV vars:
Also, I can't understand why the get http
from the error message has env
appended to the terraform.tformstate
.
I'm running out of ideas why it fails with that exception and what is expecting actually.
I've been Googling around but have been failing so far to resolve the issue. Appreciate your help/thoughts on this.
Looks like you misspelled storageaccount for your variable. So the value is not substituted. You have sotrageaccount. The t and o are swapped.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With