-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Add Managed Rule Group Config functionality to WAFv2 resource #28594
Add Managed Rule Group Config functionality to WAFv2 resource #28594
Conversation
Community NoteVoting for Prioritization
For Submitters
|
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.
Welcome @dbell-infra 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
4228f6a
to
818a072
Compare
756bf04
to
42f818e
Compare
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=TestAccWAFV2WebACL_' PKG=wafv2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/wafv2/... -v -count 1 -parallel 20 -run=TestAccWAFV2WebACL_ -timeout 180m
--- PASS: TestAccWAFV2WebACL_disappears (32.47s)
--- PASS: TestAccWAFV2WebACL_basic (34.13s)
--- PASS: TestAccWAFV2WebACL_IPSetReference_basic (39.54s)
--- PASS: TestAccWAFV2WebACL_minimal (51.11s)
--- PASS: TestAccWAFV2WebACL_ByteMatchStatement_basic (70.94s)
--- PASS: TestAccWAFV2WebACL_Update_nameForceNew (78.47s)
--- PASS: TestAccWAFV2WebACL_Operators_maxNested (83.86s)
--- PASS: TestAccWAFV2WebACL_RateBased_forwardedIP (84.95s)
--- PASS: TestAccWAFV2WebACL_RateBased_basic (85.00s)
--- PASS: TestAccWAFV2WebACL_GeoMatch_forwardedIP (94.97s)
--- PASS: TestAccWAFV2WebACL_ManagedRuleGroup_specifyVersion (99.62s)
--- PASS: TestAccWAFV2WebACL_RuleGroupReference_basic (106.16s)
--- PASS: TestAccWAFV2WebACL_Update_rule (112.48s)
--- PASS: TestAccWAFV2WebACL_GeoMatch_basic (114.14s)
--- PASS: TestAccWAFV2WebACL_ManagedRuleGroup_ManagedRuleGroupConfig (114.44s)
--- PASS: TestAccWAFV2WebACL_RateBased_maxNested (45.32s)
--- PASS: TestAccWAFV2WebACL_RuleLabels (77.50s)
--- PASS: TestAccWAFV2WebACL_tags (119.28s)
--- PASS: TestAccWAFV2WebACL_Custom_response (120.40s)
--- PASS: TestAccWAFV2WebACL_LabelMatchStatement (71.72s)
--- PASS: TestAccWAFV2WebACL_ByteMatchStatement_jsonBody (126.52s)
--- PASS: TestAccWAFV2WebACL_Update_ruleProperties (132.34s)
--- PASS: TestAccWAFV2WebACL_ManagedRuleGroup_basic (135.81s)
--- PASS: TestAccWAFV2WebACL_IPSetReference_forwardedIP (112.27s)
--- PASS: TestAccWAFV2WebACL_Custom_requestHandling (113.54s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/wafv2 150.797s
@dbell-infra thanks for the contribution 👏🏾 🎉 I made some changes to the PR to better align with the behavior of AWS API. |
This functionality has been released in v4.49.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! |
This does not appear to be working correctly: #28878 |
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
This PR implements Managed Rule Group Config support for the WAFv2 Resource to enable the usage of ATP and BotControl WAF rules within terraform.
Example Configuration:
Relations
Closes #23290
Closes #26826
Closes #23287
References
https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html
https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-atp.html
https://docs.aws.amazon.com/waf/latest/APIReference/API_ManagedRuleGroupConfig.html
Output from Acceptance Testing