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
Support for removal of feature block, as it conflicts with module for_each/count #31806
Comments
Hi @ToniCipriani , thanks for opening this issue. As Terraform's document said:
A module that intended to be used along with |
We are already following the terraform provider requirements format. However AzureRM still requires a |
hey @ToniCipriani Unfortunately we don't plan to remove the Ultimately this is a Terraform Core/configuration question - the current implementation within Terraform Core requires that the Regarding potentially defining these values within the Thanks! |
@tombuildsstuff so I'm assuming that means what we are really asking for is Hashicorp to provide a way to supply the |
Thanks for sending this over to the Terraform Core repository, @tombuildsstuff! From what I see here, it seems like it should be already possible to set this up the way intended by the current Terraform Core design:
I'm not sure I understand exactly what this feature request is representing now that it's in the Thanks! |
I am doing clean-up on old waiting-response issues. As this issue has not seen a response since the previous post, I am going to close this. Please let me know if you are experiencing this issue and can answer the questions raised in the previous post. Thanks! |
The issue still persist, but I have a workaround. In the pipeline, I only inject a separate provider block to run the test, but the module when used doesn't contain the block. Not a very clean solution but it solves the problem. |
OK, in that case it would be helpful to reframe this request for the core terraform product. See #31806 (comment), particularly:
This may be a bit much to process given that this issue is already been written and had a discussion, but if it is helpful this is what our new feature request form looks like: https://github.com/hashicorp/terraform/issues/new?assignees=&labels=enhancement%2Cnew&projects=&template=feature_request.yml |
Community Note
Description
Remove the requirement to define the feature block in the provider configuration.
When developing modules that uses the AzureRM provider, provider requires a
provider { feature {} }
block even when no additional configuration is required to the provider. This causes an issue when the module is used with Terraform 0.13+for_each
andcount
feature for defining repeated modules, where this is not allowed.If the provider configuration is removed at the module level, this breaks the ability to individually test the module, e.g. deploying and planning it via Terratest, as we will get the "features {}" error.
Defining provider configuration within a module is considered a legacy pattern according to Hashicorp.
New or Affected Resource(s)/Data Source(s)
All
Potential Terraform Configuration
References
https://www.terraform.io/language/modules/develop/providers
The text was updated successfully, but these errors were encountered: