So azurerm updated to 2.0 a few hours ago....
My main code is version locked for safety, but I'm doing some testing to see what's changed from the public beta of 1.44 and now I'm getting this error on any TF command apart from terraform init.
has anybody else come upon this?
The answer is simply that your provider is missing the required features block (this can even be empty). I believe that the issue here is that the upgrade command expects the terraform that's being upgrade to be valid 0.11 code. And in 0.11, the type fields are expected to have string values (e.g. "map", "string", etc...).
You could also fix the azurerm provider version to the last stable version 1.44: Yes, you could, however, you would not then be able to use the new features that 2.0 gives.
Terraform supports a number of different methods for authenticating to Azure: 1 Authenticating to Azure using the Azure CLI 2 Authenticating to Azure using Managed Service Identity 3 Authenticating to Azure using a Service Principal and a Client Certificate 4 Authenticating to Azure using a Service Principal and a Client Secret More ...
container_name - (Required) The Name of the Storage Container within the Storage Account. key - (Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container. environment - (Optional) The Azure Environment which should be used.
OK, running terraform in debug mode showed it was at the provider level that the error was being thrown.
It's not listed in the 2.0 upgrade guide but if you look at the provider docs it now shows a features{} block.
So at a minimum the provider now needs to look like:
provider "azurerm" {
features {}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With