-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Resource "aws_default_network_acl" orphaned subnet_ids #529
Comments
Hmm, so the linked PR ended up only working if all the subnets are created by this module. If someone creates a subnet outside the module, it gets associated with the default NACL, and you continue to get a persistent diff. I think for this particular resource, the lifecycle ignore_changes is actually a better option.
|
As noted in the [terraform docs][0], subnets using the default network acl will generate a persistent diff if they are not specified to the aws_default_network_acl resource. This module was handling subnets created by the module, but of course is not aware of subnets created externally to the module. The docs suggest using lifecycle ignore_changes as an option to avoid the persistence diff, which is the approach implemented in this patch. Fixes terraform-aws-modules#529 [0]: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/default_network_acl#managing-subnets-in-a-default-network-acl
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. |
I'm not sure what changed but it seems like something recently corresponds with the blurb here on Managing Subnets in the Default Network ACL for the
aws_default_network_acl
resource. I am getting continuously prompted that the currently associated subnets will be removed. I believe this module either needs to populate thesubnet_ids
value for theaws_default_network_acl
resource or the followinglifecycle
configuration on the resource is needed:The text was updated successfully, but these errors were encountered: