Terraform azurerm "Insufficient features blocks" in CI
The azurerm provider requires a (possibly empty) features {} block in its provider configuration. Without it, validation fails before any Azure call.
What this error means
validate/plan fails immediately with "Insufficient features blocks", pointing at the azurerm provider. It surfaces after adding the provider, or upgrading to a version that enforces the block.
terraform
Error: Insufficient features blocks
on <empty> line 0:
(source code not available)
At least 1 "features" blocks are required.Common causes
features {} block omitted
The azurerm provider mandates a features block. Declaring provider "azurerm" {} without it fails schema validation.
Provider declared implicitly without configuration
Relying on a default azurerm provider (no explicit block) means the required features block is never supplied.
How to fix it
Add a features block to the provider
Declare the provider explicitly with a features block; an empty one is valid.
providers.tf
provider "azurerm" {
features {}
}How to prevent it
- Always declare azurerm with at least an empty features {} block.
- Pin the azurerm provider version so behavior is consistent across runners.
- Run terraform validate in CI to catch the missing block early.
Related guides
Terraform azurerm Provider "building AzureRM Client" Auth Errors in CIFix Terraform azurerm provider auth in CI - "building AzureRM Client: please ensure you have configured crede…
Terraform "Invalid provider configuration" in CIFix Terraform "Invalid provider configuration" / "provider configuration not present" in CI - a missing requi…
Terraform google "Error validating provider credentials" (GCP) in CIFix Terraform google "Error validating provider credentials" in CI -- the GCP provider rejected the service-a…