Terraform: Error: "features": required field is not set

Created on 24 Feb 2020  ยท  7Comments  ยท  Source: hashicorp/terraform

Terraform Version

Terraform v0.12.21

  • provider.azurerm v2.0.0
Terraform v0.12.21
+ provider.azurerm v2.0.0
...

Terraform Configuration Files

unknown due to terse error output
...

Debug Output

2020/02/24 19:37:30 [TRACE] BuiltinEvalContext: Initialized "azurerm" provider for provider.azurerm
2020/02/24 19:37:30 [TRACE] <root>: eval: terraform.EvalNoop
2020/02/24 19:37:30 [TRACE] <root>: eval: *terraform.EvalOpFilter
2020/02/24 19:37:30 [TRACE] <root>: eval: *terraform.EvalSequence
2020/02/24 19:37:30 [TRACE] <root>: eval: *terraform.EvalGetProvider
2020/02/24 19:37:30 [TRACE] <root>: eval: *terraform.EvalValidateProvider
2020/02/24 19:37:30 [TRACE] buildProviderConfig for provider.azurerm: using explicit config only
2020/02/24 19:37:30 [TRACE] GRPCProvider: GetSchema
2020/02/24 19:37:30 [TRACE] GRPCProvider: PrepareProviderConfig
2020/02/24 19:37:30 [WARN] <root>: eval: *terraform.EvalValidateProvider, non-fatal err: "features": required field is not set
2020/02/24 19:37:30 [ERROR] <root>: eval: *terraform.EvalSequence, err: "features": required field is not set
2020/02/24 19:37:30 [ERROR] <root>: eval: *terraform.EvalOpFilter, err: "features": required field is not set
2020/02/24 19:37:30 [ERROR] <root>: eval: *terraform.EvalSequence, err: "features": required field is not set
2020/02/24 19:37:30 [TRACE] [walkValidate] Exiting eval tree: provider.azurerm
2020/02/24 19:37:30 [TRACE] vertex "provider.azurerm": visit complete

Expected Behavior

A useful error indicating file and line the error is to be searched at.

Actual Behavior

Steps to Reproduce

$ terraform init -upgrade && terraform plan -target=module.base
Upgrading modules...

  • base in modules/azure/base
  • [...]
  • gitlab_runner.subnet in modules/azure/subnet

Initializing the backend...

Initializing provider plugins...

  • Checking for available provider plugins...
  • Downloading plugin for provider "azurerm" (hashicorp/azurerm) 2.0.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

  • provider.azurerm: version = "~> 2.0"

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

Error: "features": required field is not set

Additional Context

The -target above is not part of the issue, it fails w/o -target and with any other targeted resource.
Also "features" is not referenced anywhere (but the Azure provider) - so perhaps it's a provider bug?

$ grep -r features .
Binary file ./.terraform/plugins/linux_amd64/terraform-provider-azurerm_v2.0.0_x5 matches

provideazurerm

Most helpful comment

Should work like this:

provider "azurerm" {
version = "=2.0.0"
features {}
}

All 7 comments

I am also having this issue this morning

edit: Looks like there is chatter about this on the terraform provider repo https://github.com/terraform-providers/terraform-provider-azurerm/issues/5866

This issue has been automatically migrated to terraform-providers/terraform-provider-azurerm#5893 because it looks like an issue with that provider. If you believe this is _not_ an issue with the provider, please reply to terraform-providers/terraform-provider-azurerm#5893.

This issue has been automatically migrated to terraform-providers/terraform-provider-azurerm#5894 because it looks like an issue with that provider. If you believe this is _not_ an issue with the provider, please reply to terraform-providers/terraform-provider-azurerm#5894.

I am also having this issue this morning, any solution for the above issue.

There is an issue with 2.0.0 azurem version, for temporary fix try to use the 1.44.0.

Should work like this:

provider "azurerm" {
version = "=2.0.0"
features {}
}

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings