Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "features": required field is not set #24200

Closed
athimm opened this issue Feb 24, 2020 · 7 comments
Closed

Error: "features": required field is not set #24200

athimm opened this issue Feb 24, 2020 · 7 comments

Comments

@athimm
Copy link

athimm commented Feb 24, 2020

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

@jbankes
Copy link

jbankes commented Feb 24, 2020

I am also having this issue this morning

edit: Looks like there is chatter about this on the terraform provider repo hashicorp/terraform-provider-azurerm#5866

@ghost
Copy link

ghost commented Feb 25, 2020

This issue has been automatically migrated to hashicorp/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 hashicorp/terraform-provider-azurerm#5893.

@ghost ghost closed this as completed Feb 25, 2020
@ghost
Copy link

ghost commented Feb 25, 2020

This issue has been automatically migrated to hashicorp/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 hashicorp/terraform-provider-azurerm#5894.

@ghost
Copy link

ghost commented Feb 28, 2020

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

@ghost
Copy link

ghost commented Feb 28, 2020

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

@MikaSoinetsalo
Copy link

Should work like this:

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

@ghost
Copy link

ghost commented Mar 29, 2020

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.

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants