Skip to content
Latchkey

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

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →