Hi, I spend few hours try to understand why a so simple code like the following was not working with the lastest azurerm provider :
variable "AzureRegion" {
type = string
}
variable "ResourceGroupName" {
type = string
}
# Azure Resource Group
resource "azurerm_resource_group" "Terra-RG-Stan1" {
name = var.ResourceGroupName
location = var.AzureRegion
}
If I run terraform plan and then type the values of AzureRegion and ResourceGroupName, I get the following error message : Error: "features": required field is not set
Fixing the azurerm provider to a 1.x version using the following code, solve the issue :
provider "azurerm" {
version = "=1.44.0"
}
Try to change with version 2.0.0 doesn't solve the issue :
provider "azurerm" {
version = "=2.0.0"
}
Adding feature{} to provider block, solve the issue:
provider "azurerm" {
version = "=2.0.0"
**features {}**
}
So one thing to improve is probably to explain that now it s mandatory to define azurem provider block in terraform code in beginning of documentation https://www.terraform.io/docs/providers/azurerm/index.html and insist about required features {}
@squasta The requirement for features {} block was described in the 2.0.0 release notes.
https://github.com/terraform-providers/terraform-provider-azurerm/releases/tag/v2.0.0
But I agree with you, this and other requirements must be rolled into the provider documentation. I suggest that, in addition to the Azure Provider landing page update, the features {} should be called out in the Azure Provider 2.0 Upgrade Guide (assuming this upgrade guide will be maintained for some period of time).
https://www.terraform.io/docs/providers/azurerm/guides/2.0-upgrade-guide.html
@squasta Thank you for the feedback. I'm working with the engineering team on the best way to update the docs.
I'm hitting the case where I'm not even using any azurerm plugin data or resources, just the state backend. And that is requiring me to fully declare a provider for the features {} requirement.
Most helpful comment
@squasta The requirement for features {} block was described in the 2.0.0 release notes.
https://github.com/terraform-providers/terraform-provider-azurerm/releases/tag/v2.0.0
But I agree with you, this and other requirements must be rolled into the provider documentation. I suggest that, in addition to the Azure Provider landing page update, the features {} should be called out in the Azure Provider 2.0 Upgrade Guide (assuming this upgrade guide will be maintained for some period of time).
https://www.terraform.io/docs/providers/azurerm/guides/2.0-upgrade-guide.html