Skip to content
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_wafregional_web_acl + aws_web_acl rule group support #5053

Merged

Conversation

jsandmeyer
Copy link
Contributor

@jsandmeyer jsandmeyer commented Jul 2, 2018

Fixes #4077
Fixes #4052

Changes proposed in this pull request:

  • Add support for type=GROUP in aws_waf_web_acl
  • Add support for type=GROUP in aws_wafregional_web_acl
  • Add override_action for entries where type=GROUP in both modified providers
  • Add a test for this new type that uses an aws_waf_rule_group
  • Add a test for this new type that uses an aws_wafregional_rule_group
  • Add documentation for the new options and parameters

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run="TestAccAWSWafRegionalWebAcl_|TestAccAWSWafWebAcl_"'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run="TestAccAWSWafRegionalWebAcl_|TestAccAWSWafWebAcl_" -timeout 120m
=== RUN   TestAccAWSWafWebAcl_basic
--- PASS: TestAccAWSWafWebAcl_basic (52.20s)
=== RUN   TestAccAWSWafWebAcl_group
--- PASS: TestAccAWSWafWebAcl_group (37.65s)
=== RUN   TestAccAWSWafWebAcl_changeNameForceNew
--- PASS: TestAccAWSWafWebAcl_changeNameForceNew (87.57s)
=== RUN   TestAccAWSWafWebAcl_changeDefaultAction
--- PASS: TestAccAWSWafWebAcl_changeDefaultAction (88.39s)
=== RUN   TestAccAWSWafWebAcl_disappears
--- PASS: TestAccAWSWafWebAcl_disappears (46.77s)
=== RUN   TestAccAWSWafRegionalWebAcl_basic
--- PASS: TestAccAWSWafRegionalWebAcl_basic (37.98s)
=== RUN   TestAccAWSWafRegionalWebAcl_createRateBased
--- PASS: TestAccAWSWafRegionalWebAcl_createRateBased (38.70s)
=== RUN   TestAccAWSWafRegionalWebAcl_createGroup
--- PASS: TestAccAWSWafRegionalWebAcl_createGroup (39.40s)
=== RUN   TestAccAWSWafRegionalWebAcl_changeNameForceNew
--- PASS: TestAccAWSWafRegionalWebAcl_changeNameForceNew (69.61s)
=== RUN   TestAccAWSWafRegionalWebAcl_changeDefaultAction
--- PASS: TestAccAWSWafRegionalWebAcl_changeDefaultAction (69.73s)
=== RUN   TestAccAWSWafRegionalWebAcl_disappears
--- PASS: TestAccAWSWafRegionalWebAcl_disappears (36.35s)
=== RUN   TestAccAWSWafRegionalWebAcl_noRules
--- PASS: TestAccAWSWafRegionalWebAcl_noRules (31.51s)
=== RUN   TestAccAWSWafRegionalWebAcl_changeRules
--- PASS: TestAccAWSWafRegionalWebAcl_changeRules (60.84s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       696.781s

@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Jul 2, 2018
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/waf Issues and PRs that pertain to the waf service. labels Jul 2, 2018
@jsandmeyer jsandmeyer changed the title [WIP] aws_wafregional_web_acl rule group support aws_wafregional_web_acl rule group support Jul 5, 2018
@jsandmeyer jsandmeyer changed the title aws_wafregional_web_acl rule group support [WIP] aws_wafregional_web_acl + aws_web_acl rule group support Jul 6, 2018
@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Jul 6, 2018
@mtaumike
Copy link

mtaumike commented Jul 9, 2018

Excellent and thank you!

@jsandmeyer
Copy link
Contributor Author

I used the compiled module against my own AWS sandbox account and created both global and regional WebACLs referencing a marketplace rule group, changed them to reference another UUID, and then destroyed them successfully.

@jsandmeyer jsandmeyer changed the title [WIP] aws_wafregional_web_acl + aws_web_acl rule group support aws_wafregional_web_acl + aws_web_acl rule group support Jul 9, 2018
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should clear up a ton of issues! Thanks @jsandmeyer! 🚀 I'm a little worried we should probably include a separate type = "GROUP" example in each of the resources, but that can be handled after this.

15 tests passed (all tests)
=== RUN   TestAccAWSWafRegionalWebAcl_createRateBased
--- PASS: TestAccAWSWafRegionalWebAcl_createRateBased (23.83s)
=== RUN   TestAccAWSWafRegionalWebAcl_noRules
--- PASS: TestAccAWSWafRegionalWebAcl_noRules (25.21s)
=== RUN   TestAccAWSWafWebAcl_group
--- PASS: TestAccAWSWafWebAcl_group (31.98s)
=== RUN   TestAccAWSWafRegionalWebAcl_disappears
--- PASS: TestAccAWSWafRegionalWebAcl_disappears (45.37s)
=== RUN   TestAccAWSWafRegionalWebAcl_changeRules
--- PASS: TestAccAWSWafRegionalWebAcl_changeRules (47.03s)
=== RUN   TestAccAWSWafRegionalWebAcl_changeNameForceNew
--- PASS: TestAccAWSWafRegionalWebAcl_changeNameForceNew (56.60s)
=== RUN   TestAccAWSWafRegionalWebAcl_changeDefaultAction
--- PASS: TestAccAWSWafRegionalWebAcl_changeDefaultAction (63.46s)
=== RUN   TestAccAWSWafRegionalWebAcl_basic
--- PASS: TestAccAWSWafRegionalWebAcl_basic (66.43s)
=== RUN   TestAccAWSWafWebAcl_basic
--- PASS: TestAccAWSWafWebAcl_basic (66.90s)
=== RUN   TestAccAWSWafRegionalWebAcl_createGroup
--- PASS: TestAccAWSWafRegionalWebAcl_createGroup (67.79s)
=== RUN   TestAccAWSWafWebAcl_disappears
--- PASS: TestAccAWSWafWebAcl_disappears (75.20s)
=== RUN   TestAccAWSWafWebAcl_changeDefaultAction
--- PASS: TestAccAWSWafWebAcl_changeDefaultAction (110.86s)
=== RUN   TestAccAWSWafWebAcl_changeNameForceNew
--- PASS: TestAccAWSWafWebAcl_changeNameForceNew (113.25s)
=== RUN   TestAccAWSWafRegionalWebAclAssociation_basic
--- PASS: TestAccAWSWafRegionalWebAclAssociation_basic (223.54s)
=== RUN   TestAccAWSWafRegionalWebAclAssociation_multipleAssociations
--- PASS: TestAccAWSWafRegionalWebAclAssociation_multipleAssociations (234.52s)

@bflad
Copy link
Contributor

bflad commented Jul 11, 2018

This has been released in version 1.27.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 4, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/waf Issues and PRs that pertain to the waf service. size/L Managed by automation to categorize the size of a PR.
Projects
None yet
3 participants