Terraform azurerm 2.x Error: "features": required field is not set

Viewed 14780

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?

2 Answers

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 {}
}

You could also fix the azurerm provider version to the last stable version 1.44:

provider "azurerm" {
  version = "~> 1.44"
}
Related