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

New resource r/aws_wafv2_web_acl #12688

Merged
merged 15 commits into from
Jun 12, 2020
Merged

Conversation

pvanbuijtene
Copy link
Contributor

@pvanbuijtene pvanbuijtene commented Apr 5, 2020

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #11176
Relates #11046

This PR can not be merged before #12677 because of copied dependencies.

Release note for CHANGELOG:

* **New Resource**: `aws_wafv2_web_acl` (#12688)

Output from acceptance testing:

make build; make testacc TEST=./aws TESTARGS='-run=TestAccAwsWafv2WebACL'
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsWafv2WebACL -timeout 120m
...
--- PASS: TestAccAwsWafv2WebACL_Disappears (83.89s)
--- PASS: TestAccAwsWafv2WebACL_Minimal (89.98s)
--- PASS: TestAccAwsWafv2WebACL_ChangeNameForceNew (172.23s)
--- PASS: TestAccAwsWafv2WebACL_ManagedRuleGroupStatement (191.75s)
--- PASS: TestAccAwsWafv2WebACL_RateBasedStatement (196.14s)
--- PASS: TestAccAwsWafv2WebACL_Basic (197.97s)
--- PASS: TestAccAwsWafv2WebACL_Tags (222.97s)
--- PASS: TestAccAwsWafv2WebACL_RuleGroupReferenceStatement (255.26s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       228.215s

Some of the code can be refactored after aws_wafv2_rule_group #12677 is merged.

@pvanbuijtene pvanbuijtene requested a review from a team April 5, 2020 18:09
@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/wafv2 Issues and PRs that pertain to the wafv2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Apr 5, 2020
@bflad bflad added new-resource Introduces a new resource. and removed needs-triage Waiting for first response or review from a maintainer. labels May 1, 2020
@anGie44
Copy link
Contributor

anGie44 commented May 12, 2020

hi @pvanbuijtene 👋 -- dropping a note here to rebase and isolate the resource changes when you get a chance :)

aws/provider.go Show resolved Hide resolved
website/docs/r/wafv2_web_acl.html.markdown Outdated Show resolved Hide resolved
website/docs/r/wafv2_web_acl.html.markdown Outdated Show resolved Hide resolved
website/docs/r/wafv2_web_acl.html.markdown Outdated Show resolved Hide resolved
aws/resource_aws_wafv2_web_acl.go Show resolved Hide resolved
@anGie44 anGie44 added the waiting-response Maintainers are waiting on response from community or contributor. label May 19, 2020
@pvanbuijtene pvanbuijtene force-pushed the wafv2-web-acl branch 2 times, most recently from 8439455 to 35d2b4b Compare May 21, 2020 20:42
@pvanbuijtene pvanbuijtene requested a review from anGie44 May 25, 2020 14:58
@anGie44
Copy link
Contributor

anGie44 commented May 26, 2020

hi @pvanbuijtene, thanks for adding the last code dependency. as it's a collection of helper functions used across this resource and the rule_group resource (and maybe unintentionally is missing the complete rule_group resource definition?), can we rename it to something like wafv2_helpers.go -- but allow for #12677 to be merged for further refactoring as you originally suggested :)

otherwise, atm this PR is looking good with output of acceptance tests:

--- FAIL: TestAccAwsWafv2WebACL_RuleGroupReferenceStatement (3.34s) -- expected error: The provider provider.aws does not support resource type "aws_wafv2_rule_group".
--- PASS: TestAccAwsWafv2WebACL_Disappears (40.84s)
--- PASS: TestAccAwsWafv2WebACL_Minimal (43.84s)
--- PASS: TestAccAwsWafv2WebACL_ChangeNameForceNew (99.09s)
--- PASS: TestAccAwsWafv2WebACL_ManagedRuleGroupStatement (112.34s)
--- PASS: TestAccAwsWafv2WebACL_Basic (128.26s)
--- PASS: TestAccAwsWafv2WebACL_RateBasedStatement (133.31s)
--- PASS: TestAccAwsWafv2WebACL_Tags (161.10s)

@anGie44 anGie44 removed the waiting-response Maintainers are waiting on response from community or contributor. label May 26, 2020
Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

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

Great work @pvanbuijtene. Last round of documentation edits otherwise LGTM 🚀

Output of acceptance tests:

--- PASS: TestAccAwsWafv2RuleGroup_Disappears (167.05s)
--- PASS: TestAccAwsWafv2WebACL_Disappears (224.07s)
--- PASS: TestAccAwsWafv2RuleGroup_Minimal (242.89s)
--- PASS: TestAccAwsWafv2RuleGroup_RegexPatternSetReferenceStatement (274.50s)
--- PASS: TestAccAwsWafv2RuleGroup_IpSetReferenceStatement (286.61s)
--- PASS: TestAccAwsWafv2RuleGroup_ChangeNameForceNew (472.80s)
--- PASS: TestAccAwsWafv2RuleGroup_ChangeCapacityForceNew (476.34s)
--- PASS: TestAccAwsWafv2RuleGroup_ChangeMetricNameForceNew (479.98s)
--- PASS: TestAccAwsWafv2WebACL_Minimal (304.81s)
--- PASS: TestAccAwsWafv2RuleGroup_GeoMatchStatement (540.75s)
--- PASS: TestAccAwsWafv2RuleGroup_XssMatchStatement (544.00s)
--- PASS: TestAccAwsWafv2RuleGroup_ByteMatchStatement (546.92s)
--- PASS: TestAccAwsWafv2RuleGroup_SqliMatchStatement (550.78s)
--- PASS: TestAccAwsWafv2RuleGroup_SizeConstraintStatement (554.51s)
--- PASS: TestAccAwsWafv2RuleGroup_Basic (562.69s)
--- PASS: TestAccAwsWafv2WebACL_ChangeNameForceNew (580.66s)
--- PASS: TestAccAwsWafv2RuleGroup_Tags (613.83s)
--- PASS: TestAccAwsWafv2WebACL_Basic (645.87s)
--- PASS: TestAccAwsWafv2RuleGroup_RuleAction (667.95s)
--- PASS: TestAccAwsWafv2RuleGroup_LogicalRuleStatements (673.80s)
--- PASS: TestAccAwsWafv2WebACL_ManagedRuleGroupStatement (515.76s)
--- PASS: TestAccAwsWafv2WebACL_RateBasedStatement (457.43s)
--- PASS: TestAccAwsWafv2WebACL_Tags (447.92s)
--- PASS: TestAccAwsWafv2WebACL_RuleGroupReferenceStatement (508.13s)
--- PASS: TestAccAwsWafv2RuleGroup_ByteMatchStatement_FieldToMatch (828.77s)

@pvanbuijtene
Copy link
Contributor Author

@anGie44 I see I was getting a bit sloppy at the end 😬

Had to fix a rebase issue, maybe wise to run the integration tests again... just to be sure

@ghost ghost removed the waiting-response Maintainers are waiting on response from community or contributor. label Jun 12, 2020
@anGie44
Copy link
Contributor

anGie44 commented Jun 12, 2020

no worries @pvanbuijtene, thanks for taking a look!

Output of acceptance tests:

--- PASS: TestAccAwsWafv2RuleGroup_Disappears (172.69s)
--- PASS: TestAccAwsWafv2WebACL_Disappears (221.31s)
--- PASS: TestAccAwsWafv2RuleGroup_Minimal (239.77s)
--- PASS: TestAccAwsWafv2RuleGroup_IpSetReferenceStatement (284.15s)
--- PASS: TestAccAwsWafv2RuleGroup_RegexPatternSetReferenceStatement (286.19s)
--- PASS: TestAccAwsWafv2RuleGroup_ChangeCapacityForceNew (474.50s)
--- PASS: TestAccAwsWafv2RuleGroup_ChangeMetricNameForceNew (477.78s)
--- PASS: TestAccAwsWafv2RuleGroup_ChangeNameForceNew (488.91s)
--- PASS: TestAccAwsWafv2WebACL_Minimal (306.85s)
--- PASS: TestAccAwsWafv2RuleGroup_XssMatchStatement (540.67s)
--- PASS: TestAccAwsWafv2RuleGroup_GeoMatchStatement (544.67s)
--- PASS: TestAccAwsWafv2RuleGroup_SqliMatchStatement (546.22s)
--- PASS: TestAccAwsWafv2RuleGroup_SizeConstraintStatement (550.12s)
--- PASS: TestAccAwsWafv2RuleGroup_ByteMatchStatement (554.10s)
--- PASS: TestAccAwsWafv2RuleGroup_Basic (560.28s)
--- PASS: TestAccAwsWafv2WebACL_ChangeNameForceNew (583.94s)
--- PASS: TestAccAwsWafv2RuleGroup_Tags (612.86s)
--- PASS: TestAccAwsWafv2WebACL_Basic (648.76s)
--- PASS: TestAccAwsWafv2RuleGroup_RuleAction (668.04s)
--- PASS: TestAccAwsWafv2RuleGroup_LogicalRuleStatements (672.87s)
--- PASS: TestAccAwsWafv2WebACL_ManagedRuleGroupStatement (511.80s)
--- PASS: TestAccAwsWafv2WebACL_RateBasedStatement (457.34s)
--- PASS: TestAccAwsWafv2WebACL_Tags (447.87s)
--- PASS: TestAccAwsWafv2WebACL_RuleGroupReferenceStatement (498.01s)
--- PASS: TestAccAwsWafv2RuleGroup_ByteMatchStatement_FieldToMatch (827.67s)

@anGie44 anGie44 merged commit ddf532b into hashicorp:master Jun 12, 2020
@anGie44 anGie44 added this to the v2.67.0 milestone Jun 12, 2020
anGie44 added a commit that referenced this pull request Jun 12, 2020
@ghost
Copy link

ghost commented Jun 19, 2020

This has been released in version 2.67.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!

@ghost
Copy link

ghost commented Jul 13, 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 Jul 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/wafv2 Issues and PRs that pertain to the wafv2 service. size/XXL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: WAFv2 Web ACL Resource
4 participants