Terraform error Insufficient features blocks

A quick blog post to assist you, if you are working with Terraform and you come across the error message Insufficient features blocks when attempting to deploy your infrastructure, don’t worry, it’s a simple fix. This error message is indicating that there is a missing “features” block in your Terraform configuration file. The “features” block is used to enable or disable certain experimental features in Terraform.

Please note: The terraform version I am using is v1.5.0

Error occurred below:

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: Insufficient features blocks
│ 
│   on providers.tf line 11, in provider "azurerm":
│   11: provider "azurerm" {
│ 
│ At least 1 "features" blocks are required.

The fix

Quite straightforward fix, but thought i’d add to a quick blog post 🙂

To fix this error, you can add a “features” block to your configuration file. Here is an example of what the block might look like:

Within your provider, include features {}

Example:

provider "azurerm" {
features {}
}

In the example below, we have added an empty “features” block to the configuration file. You can add any experimental features you want to enable within this block.

Once you have added the “features” block to your configuration file, you should be able to deploy your infrastructure without encountering the “Insufficient features blocks” error.

terraform {
  backend "local" {
  }

  required_providers {
    azurerm = {
    }
  }
}

provider "azurerm" {
  features {}
}

In summary, the “Insufficient features blocks” error in Terraform is caused by a missing “features” block in your configuration file. By adding an empty “features” block to your configuration file, you can enable any experimental features you want to use in Terraform.

Leave a Reply

Discover more from Thomas Thornton Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading

Discover more from Thomas Thornton Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading