resource/wafv2_web_acl: remove force_new property from arguments to prevent resource recreation#14616
Conversation
3861ca0 to
981800c
Compare
| LockToken: aws.String(d.Get("lock_token").(string)), | ||
| DefaultAction: expandWafv2DefaultAction(d.Get("default_action").([]interface{})), | ||
| Rules: expandWafv2Rules(d.Get("rule").(*schema.Set).List()), | ||
| Rules: expandWafv2WebACLRules(d.Get("rule").(*schema.Set).List()), |
There was a problem hiding this comment.
addresses TestAccAwsWafv2WebACL_ManagedRuleGroupStatement and TestAccAwsWafv2WebACL_RateBasedStatement test failures as now they actually attempt to do an update vs. a destroy/create, exposing the bug reported in #14035
bflad
left a comment
There was a problem hiding this comment.
Looks good to me 🚀 Two additional recommendations:
- Adding documentation to the
ruleconfiguration blocknameargument to note that it cannot be updated - Adjusting the CHANGELOG message to be a little more operator-centric rather than developer-centric (e.g. Prevent unnecessary resource recreation with
ruleupdates)
Output from acceptance testing (test failure unrelated):
--- FAIL: TestAccAwsWafv2WebACL_RuleGroupReferenceStatement (2297.93s)
--- PASS: TestAccAwsWafv2WebACL_basic (3247.90s)
--- PASS: TestAccAwsWafv2WebACL_ChangeNameForceNew (4845.73s)
--- PASS: TestAccAwsWafv2WebACL_Disappears (2624.62s)
--- PASS: TestAccAwsWafv2WebACL_ManagedRuleGroupStatement (5485.60s)
--- PASS: TestAccAwsWafv2WebACL_MaxNestedOperatorStatements (4079.01s)
--- PASS: TestAccAwsWafv2WebACL_MaxNestedRateBasedStatements (4075.84s)
--- PASS: TestAccAwsWafv2WebACL_Minimal (3069.09s)
--- PASS: TestAccAwsWafv2WebACL_RateBasedStatement (5505.18s)
--- PASS: TestAccAwsWafv2WebACL_Tags (5556.15s)
--- PASS: TestAccAwsWafv2WebACL_updateRule (5690.97s)
--- PASS: TestAccAwsWafv2WebACL_UpdateRuleProperties (6207.71s)
|
thanks for the review @bflad! so interestingly enough, and then applying this plan succeeds: with no subsequent plan-time changes: so i think it's safe to keep the docs as is 👍 the same behavior is true for the |
|
This has been released in version 3.2.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 for triage. Thanks! |
|
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. Thanks! |
Community Note
Closes #13936
Fixes #14035
Fixes #14029
Notes:
rulenameandrulevisibility_configmetric_namecan be changed via the SDK just like in the AWS Console, no longer requiring theForceNewproperty which was also the cause of the forced recreation behaviorRelease note for CHANGELOG:
Output from acceptance testing: