-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
fix: Use for_each instead count for network ACLs #1144
fix: Use for_each instead count for network ACLs #1144
Conversation
@bryantbiggs @antonbabenko please review, thank you. |
this is a breaking change and not one we can make lightly |
@bryantbiggs how it works right now also introduces breaking changes on every ACL change, since it removes and creates all the rules in ACL, which temporary blocks traffic to VPC. |
This PR has been automatically marked as stale because it has been open 30 days |
up |
This PR has been automatically marked as stale because it has been open 30 days |
This PR was automatically closed because of stale in 10 days |
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Use
for_each
instead ofcount
foraws_network_acl_rule
resources.Motivation and Context
We frequently encounter situations where additional rules need to be added to public network ACLs to block specific IPs. Since blocking rules must precede the allow 0.0.0.0/0 rule, the allow rule gets recreated each time a blocking rule is added. To address this issue, I propose using for_each instead of count for creating ACL rules. This approach will ensure stability and prevent unnecessary rule recreation.
result of running
Breaking Changes
Yes and no. ACL rules will be recreated which can cause temporary networking issues. But it is always possible to move state like this(for default config):
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull request