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.
workingDirectory
in the init task is right and make sure the key value is really right. – Charles Xu