terraform init
successfully initializes but gets stuck on terraform plan.
The error is related to the feature block. I'm unsure where to add the feature block:
Insufficient features blocks (source code not available) At least 1 "features" blocks are required.
My configuration looks like
terraform {
required_version = ">= 0.11"
backend "azurerm" {
features {}
}
}
I tried removing and adding features block as github page
features - (Required) A features block as defined below which can be used to customize the behaviour of certain Azure Provider resources. client_id - (Optional) The Client ID which should be used. This can also be sourced from the ARM_CLIENT_ID Environment Variable.
The AzureRM Terraform Provider allows managing resources within Azure Resource Manager. When using version 3.0 of the AzureRM Provider we recommend using Terraform 1.
The command you need to run is in the help text you posted. Use Install-Module -Force AzureRM . See the -Force tag. Once you've updated the bootstrapper, run Install-AzureRM to install the new packages.
When you run updated version of terraform you need to define another block defined below
provider "azurerm" {
features {}
}
An other reason for the message could be, that a named provider is in use:
provider "azurerm" {
alias = "some_name" # <- here
features {}
}
But not specified on the resource:
resource "azurerm_resource_group" "example" {
# might this block is missing
# -> provider = azurerm.some_name
name = var.rg_name
location = var.region
}
Error message:
terraform plan
╷
│ Error: Insufficient features blocks
│
│ on <empty> line 0:
│ (source code not available)
│
│ At least 1 "features" blocks are required.
In Terraform >= 0.13, here's what a sample versions.tf
looks like (note the provider config being in a separate block):
# versions.tf
terraform {
required_providers {
azurerm = {
# ...
}
}
required_version = ">= 0.13"
}
# This block goes outside of the required_providers block!
provider "azurerm" {
features {}
}
Please check if highlighted lines are added to your template
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With