Terraform with azure CLI - error building account Terraform with azure CLI - error building account azure azure

Terraform with azure CLI - error building account


Even though I was already logged in via az cli, forcing another:

az login

Resolved this for me.


Removing variable

ARM_USE_MSI=true

Solved my problem.

This variable tells terraform to use Managed Service Identity. See the docs. The problem was, that the Azure Instance Metadata service endpoint(available on the above mentioned IP), that is used from that point, is only accessible from within a VM, and I was running the terraform from my desktop.


az login --tenant TENANT_ID

resolved by using tenant ID

Initially, I tried to log in with "az login" but got a similar error you posted.