microsoft/azure-pipelines-extensions

##[error]Error: There was an error when attempting to execute the process '/opt/hostedtoolcache/terraform/0.15.4/x64/terraform'. This may indicate the process failed to start. Error: spawn /opt/hostedtoolcache/terraform/0.15.4/x64/terraform ENOENT

MilaMF opened this issue · 2 comments

The following issue occured the terraform init in Azure Dev Ops Pipeline:
##[error]Error: There was an error when attempting to execute the process '/opt/hostedtoolcache/terraform/0.15.4/x64/terraform'. This may indicate the process failed to start. Error: spawn /opt/hostedtoolcache/terraform/0.15.4/x64/terraform ENOENT

I had the same issue. After pulling my hair out for a few hours, I finally realized that it was, because I renamed the CI build pipeline and so the source, or rather: the Source Alias property in the artifacts section changed. Now, the "terraform" tasks have a "Configuration Directory" parameter which was wrong.

After fixing this, I was finally able to proceed - only to be stopped by something else... :/

2021-08-03T21:39:36.4446502Z Successfully configured the backend "azurerm"! Terraform will automatically
2021-08-03T21:39:36.4447084Z use this backend unless the backend configuration changes.
2021-08-03T21:39:39.1122628Z 
2021-08-03T21:39:39.1123271Z Error: Invalid legacy provider address
2021-08-03T21:39:39.1123509Z 
2021-08-03T21:39:39.1123856Z This configuration or its associated state refers to the unqualified provider
2021-08-03T21:39:39.1124229Z "azurerm".
2021-08-03T21:39:39.1124698Z 
2021-08-03T21:39:39.1125052Z You must complete the Terraform 0.13 upgrade process before upgrading to
2021-08-03T21:39:39.1125434Z later versions.
2021-08-03T21:39:39.1125559Z 
2021-08-03T21:39:39.1257296Z ##[error]Error: The process '/opt/hostedtoolcache/terraform/1.0.3/x64/terraform' failed with exit code 1

Hi sorry for late reply, Try using terraform version first 0.13 then run again with a later version. closing this issue. If you feel this is incorrect please open a new issue at: https://github.com/microsoft/azure-pipelines-terraform/issues