Hi Thomas,
I was going through your "DevOps-Journey-Using-Azure-DevOps" tutorial and trying to learn and while running the lab2pipeline.yaml pipeline I am getting an error which I am not able to understand and not able to move ahead.
Here, is what I have done so far.
- Have installed all pre-requisites.
- Create a new RG and storage account by following the steps mentioned by you in Initial setup.
- Now in second steps i.e. in Setup Azure DevOps Pipeline. I cloned your code in my ADO repo and updated the variables in pipeline yml file with my RG name, storage account name.
- Also updated the RG and storage account name in providers.tf of the main code and also updated location in all the variables files of modules to "East US 2" to match my RG location.
- Now when I try to run the pipeline it fail with below error in "init" task -
##[error]Error: There was an error when attempting to execute the process '/opt/hostedtoolcache/terraform/1.2.6/x64/terraform'. This may indicate the process failed to start. Error: spawn /opt/hostedtoolcache/terraform/1.2.6/x64/terraform ENOENT
Attaching screenshot of the build along with its log for reference.
1_validate (1).txt
If possible could you please let me know what am I missing as I just started learning about TF with ADO I am unsure of couple of things?
I also tried running the TF commands in VS code after making the changes in files and after I run the Terraform init command it is asking me for a blob key to enter. I am not aware where can I find this key, I tried searching on internet and went to my storage account and then to its access keys section there I saw Key1 and key2 and then tried copy key1 in my VS code but it failed with error, so I am not sure again where I am missing here.
here is the error along with its image attached.
Error: Failed to get existing workspaces: containers.Client#ListBlobs: Failure responding to request: StatusCode=400 -- Original Error: autorestst/azure: Service returned an error. Status=400 Code="InvalidResourceName" Message="The specifed resource name contains invalid characters.\nReqstuestId:46890cce-f01e-0065-5f03-b0948c000000\nTime:2022-08-14T17:32:23.3160187Z"