Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Terraform azure provider gave me "features required field not set"

This code gave me error, even with the feature block.

terraform {
  required_version = ">= 0.12" 
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "=2.46.0"
    }
  }
  
}

provider "azurerm" {
  tenant_id       = "xxxxx"
  subscription_id = "xxxxx"
  client_id       = "xxxxx"
  client_secret   = "xxxxx"
  alias           = "prod"
  features {}
}

What's wrong??? For azurerm version 2.0, I know features block is needed but I tried several times the error always comes up.

like image 204
Heri Fauzan Avatar asked Oct 19 '25 10:10

Heri Fauzan


1 Answers

I just hit this today and when I removed alias field and it worked! Related to this bug: https://github.com/hashicorp/terraform/issues/26312#issuecomment-801468683

like image 97
Dmitry Tokarev Avatar answered Oct 22 '25 00:10

Dmitry Tokarev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!