-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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 #5893
Comments
A workaround is to specify a
|
@arkiaconsulting I've tried using azrurerm v2.0 with the features block as you suggested, however when I do that I still get a compatibility error, as follows:
|
@jbobbylopez I don’t think that this is related to the current issue. I guess that the |
Thanks @arkiaconsulting, I filed the following issue for 'azuread' for this: |
👋 hi folks As mentioned in the changelog, version 2.0 of the Azure Provider now requires that a provider block be defined and a Since this controls the behaviour of the Provider this block is now required as we believe it's important that folks are aware which Provider block is being used, since this was ambiguous as it was optional in 1.x (and thus we often saw confusion where users were using one provider block when they thought they were using another with modules). As mentioned above this should be a case of updating your Terraform Configurations to include a Provider block as shown below:
#5880 is tracking adding some additional documentation for this however since this should be fixed by updating the Terraform Configuration to include the provider block I'm going to close this issue for the moment, since this is by design in version 2.0 (and upwards) of the Azure Provider. Thanks! |
@tombuildsstuff That error message is really awful, is there no way to make terraform output a more sane error message? I had absolutely no idea where it came from, or how to solve it either. I assume someone had added a variable to the (I forgot to commit a providers file and it auto-upgraded this part of the pipeline to v2 provider and so accidentally came across this error.) |
This error also happens if you have aliased your provisioners and leave a resource without a provider. I assume because it automatically tries to import a blank azurerm provider without the features block.
|
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
This issue was originally opened by @axelthimm as hashicorp/terraform#24200. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Terraform v0.12.21
Terraform Configuration Files
unknown due to terse error output ...
Debug Output
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...
Initializing the backend...
Initializing provider plugins...
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.
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
The text was updated successfully, but these errors were encountered: