I’m trying to follow the Terraform documentation in order to deploy resources using the Azure Provider and Terraform Cloud.
I believe I have mirrored the example in the docs exactly, and I can certainly apply the terraform perfectly before I added the backend config.
This is the example from the documentation, which errors when I run it. With a bit of reading around I think the backend config should be placed inside the terraform block.
So I have changed the code to the below:
This certainly gets further when I run and initializing the terraform works perfectly. However when I go to plan/apply the changes, it errors with the below:
Error: Error building AzureRM Client: obtain subscription() from Azure CLI: Error parsing json result from the Azure CLI: Error launching Azure CLI: exec: “az”: executable file not found in $PATH
I have logged into the Azure tenant using az login, and I have successfully logged into Terraform using terraform login. I have also tried re-authenticating both at the point of this error appearing.
Would someone be able to help out a newbie please? Have I messed up the config here or am I missing something?
Thanks very much.