-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
network_security_rule - unnecessary removal #115
Comments
Perhaps this is a documentation issue? AWS resources that implement a similar pattern - where you can define a sub-resource on the parent directly, or as a discrete resource - state that using both for the same resource is not supported. I imagine this is the case here as well. This block is from the AWS provider documentation for aws_security_group_rule:
|
Having refactored my module to now only use It's interesting that I did not notice this until recently and that Terraform does in fact want to build the correct state (half of the time). ( Documentation updated required. |
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 👉 hashibot-feedback@hashicorp.com. Thanks! |
Terraform Version
Terraform v0.9.8
Affected Resource(s)
azurerm_network_security_group
azurerm_network_security_rule
This could be a dependency graph generation issue in terraform core so apologies in advance if this is the incorrect place to open this bug.
Terraform Configuration Files
In a module define a
azurerm_network_security_group
with somesecurity_rule
s:In a consumer of that module, define an attachment
azurerm_network_security_rule
:Expected Behavior
security_rule
in group description and separateazurerm_network_security_rule
attachments)Actual Behavior
security_rule
in group description and separateazurerm_network_security_rule
attachments)azurerm_network_security_rule
attachmentsazurerm_network_security_rule
and recreates themSteps to Reproduce
terraform apply
terraform plan
security_rule.#: "2" => "1"
terraform apply
terraform plan
Plan: 1 to add
The text was updated successfully, but these errors were encountered: