-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
aws_networkfirewall_rule_group: Use list instead of set #27102
aws_networkfirewall_rule_group: Use list instead of set #27102
Conversation
Community NoteVoting for Prioritization
For Submitters
|
…rule Order matters for the StatefulRules, at least when rule_order is set to STRICT_ORDER, so change the types from TypeSet to TypeList, so AWS doesn't change the order when it writes it up. Fixes: hashicorp#24977
30e8ac8
to
bab1545
Compare
bab1545
to
634c585
Compare
Thank you for your contribution! 🚀 Please note that the Remove any changes to the |
634c585
to
bab1545
Compare
@ewbankkit any chance you could review this one ? the issue is really a problem for enterprise user using strict policy on firewall 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTARGS='-run=TestAccNetworkFirewallRuleGroup_' PKG=networkfirewall ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/networkfirewall/... -v -count 1 -parallel 3 -run=TestAccNetworkFirewallRuleGroup_ -timeout 180m
=== RUN TestAccNetworkFirewallRuleGroup_Basic_rulesSourceList
=== PAUSE TestAccNetworkFirewallRuleGroup_Basic_rulesSourceList
=== RUN TestAccNetworkFirewallRuleGroup_Basic_referenceSets
=== PAUSE TestAccNetworkFirewallRuleGroup_Basic_referenceSets
=== RUN TestAccNetworkFirewallRuleGroup_Basic_updateReferenceSets
=== PAUSE TestAccNetworkFirewallRuleGroup_Basic_updateReferenceSets
=== RUN TestAccNetworkFirewallRuleGroup_Basic_statefulRule
=== PAUSE TestAccNetworkFirewallRuleGroup_Basic_statefulRule
=== RUN TestAccNetworkFirewallRuleGroup_Basic_statelessRule
=== PAUSE TestAccNetworkFirewallRuleGroup_Basic_statelessRule
=== RUN TestAccNetworkFirewallRuleGroup_Basic_rules
=== PAUSE TestAccNetworkFirewallRuleGroup_Basic_rules
=== RUN TestAccNetworkFirewallRuleGroup_statefulRuleOptions
=== PAUSE TestAccNetworkFirewallRuleGroup_statefulRuleOptions
=== RUN TestAccNetworkFirewallRuleGroup_updateStatefulRuleOptions
=== PAUSE TestAccNetworkFirewallRuleGroup_updateStatefulRuleOptions
=== RUN TestAccNetworkFirewallRuleGroup_statelessRuleWithCustomAction
=== PAUSE TestAccNetworkFirewallRuleGroup_statelessRuleWithCustomAction
=== RUN TestAccNetworkFirewallRuleGroup_updateRules
=== PAUSE TestAccNetworkFirewallRuleGroup_updateRules
=== RUN TestAccNetworkFirewallRuleGroup_updateRulesSourceList
=== PAUSE TestAccNetworkFirewallRuleGroup_updateRulesSourceList
=== RUN TestAccNetworkFirewallRuleGroup_rulesSourceAndRuleVariables
=== PAUSE TestAccNetworkFirewallRuleGroup_rulesSourceAndRuleVariables
=== RUN TestAccNetworkFirewallRuleGroup_updateStatefulRule
=== PAUSE TestAccNetworkFirewallRuleGroup_updateStatefulRule
=== RUN TestAccNetworkFirewallRuleGroup_updateMultipleStatefulRules
=== PAUSE TestAccNetworkFirewallRuleGroup_updateMultipleStatefulRules
=== RUN TestAccNetworkFirewallRuleGroup_StatefulRule_action
=== PAUSE TestAccNetworkFirewallRuleGroup_StatefulRule_action
=== RUN TestAccNetworkFirewallRuleGroup_StatefulRule_header
=== PAUSE TestAccNetworkFirewallRuleGroup_StatefulRule_header
=== RUN TestAccNetworkFirewallRuleGroup_updateStatelessRule
=== PAUSE TestAccNetworkFirewallRuleGroup_updateStatelessRule
=== RUN TestAccNetworkFirewallRuleGroup_tags
=== PAUSE TestAccNetworkFirewallRuleGroup_tags
=== RUN TestAccNetworkFirewallRuleGroup_encryptionConfiguration
=== PAUSE TestAccNetworkFirewallRuleGroup_encryptionConfiguration
=== RUN TestAccNetworkFirewallRuleGroup_disappears
=== PAUSE TestAccNetworkFirewallRuleGroup_disappears
=== CONT TestAccNetworkFirewallRuleGroup_Basic_rulesSourceList
=== CONT TestAccNetworkFirewallRuleGroup_updateRulesSourceList
=== CONT TestAccNetworkFirewallRuleGroup_StatefulRule_header
--- PASS: TestAccNetworkFirewallRuleGroup_Basic_rulesSourceList (147.31s)
=== CONT TestAccNetworkFirewallRuleGroup_updateMultipleStatefulRules
--- PASS: TestAccNetworkFirewallRuleGroup_StatefulRule_header (171.39s)
=== CONT TestAccNetworkFirewallRuleGroup_StatefulRule_action
--- PASS: TestAccNetworkFirewallRuleGroup_updateRulesSourceList (179.17s)
=== CONT TestAccNetworkFirewallRuleGroup_encryptionConfiguration
--- PASS: TestAccNetworkFirewallRuleGroup_updateMultipleStatefulRules (169.60s)
=== CONT TestAccNetworkFirewallRuleGroup_disappears
--- PASS: TestAccNetworkFirewallRuleGroup_StatefulRule_action (190.77s)
=== CONT TestAccNetworkFirewallRuleGroup_updateStatefulRule
--- PASS: TestAccNetworkFirewallRuleGroup_encryptionConfiguration (180.49s)
=== CONT TestAccNetworkFirewallRuleGroup_rulesSourceAndRuleVariables
--- PASS: TestAccNetworkFirewallRuleGroup_disappears (149.52s)
=== CONT TestAccNetworkFirewallRuleGroup_Basic_rules
--- PASS: TestAccNetworkFirewallRuleGroup_updateStatefulRule (165.89s)
=== CONT TestAccNetworkFirewallRuleGroup_updateRules
--- PASS: TestAccNetworkFirewallRuleGroup_rulesSourceAndRuleVariables (155.98s)
=== CONT TestAccNetworkFirewallRuleGroup_statelessRuleWithCustomAction
--- PASS: TestAccNetworkFirewallRuleGroup_Basic_rules (143.08s)
=== CONT TestAccNetworkFirewallRuleGroup_updateStatefulRuleOptions
--- PASS: TestAccNetworkFirewallRuleGroup_updateRules (154.97s)
=== CONT TestAccNetworkFirewallRuleGroup_statefulRuleOptions
--- PASS: TestAccNetworkFirewallRuleGroup_statelessRuleWithCustomAction (153.08s)
=== CONT TestAccNetworkFirewallRuleGroup_Basic_statefulRule
--- PASS: TestAccNetworkFirewallRuleGroup_Basic_statefulRule (143.25s)
=== CONT TestAccNetworkFirewallRuleGroup_Basic_statelessRule
--- PASS: TestAccNetworkFirewallRuleGroup_statefulRuleOptions (144.33s)
=== CONT TestAccNetworkFirewallRuleGroup_Basic_updateReferenceSets
--- PASS: TestAccNetworkFirewallRuleGroup_updateStatefulRuleOptions (283.44s)
=== CONT TestAccNetworkFirewallRuleGroup_Basic_referenceSets
--- PASS: TestAccNetworkFirewallRuleGroup_Basic_statelessRule (154.04s)
=== CONT TestAccNetworkFirewallRuleGroup_tags
--- PASS: TestAccNetworkFirewallRuleGroup_Basic_updateReferenceSets (179.04s)
=== CONT TestAccNetworkFirewallRuleGroup_updateStatelessRule
--- PASS: TestAccNetworkFirewallRuleGroup_Basic_referenceSets (164.89s)
--- PASS: TestAccNetworkFirewallRuleGroup_tags (154.64s)
--- PASS: TestAccNetworkFirewallRuleGroup_updateStatelessRule (167.88s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/networkfirewall 1164.539s
@tmccombs Thanks for the contribution 🎉 👏. |
This functionality has been released in v4.48.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Description
Order matters for the StatefulRules in a network firewall rules group, at least when rule_order is set to STRICT_ORDER,
so change the types from TypeSet to TypeList, so AWS doesn't change the order when it writes it up.
Currently, if you have STRICT_ORDER specified, then terraform writes the rules in an effectively random order, which can result in broken behavior, and makes it basically impossible to use terraform to manage this resource.
Relations
Closes #24977
References
Open Questions
I haven't tested this at all.