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

r/aws_wafv2_web_acl add support for association_config #31668

Conversation

TsvetanMilanov
Copy link
Contributor

@TsvetanMilanov TsvetanMilanov commented May 31, 2023

Description

Add association_config argument in the aws_wafv2_web_acl resource to allow providing AssociationConfig

Relations

Closes #31667.
Closes #32141.
Closes #32367.

References

https://docs.aws.amazon.com/waf/latest/APIReference/API_CreateWebACL.html
https://docs.aws.amazon.com/waf/latest/APIReference/API_AssociationConfig.html

Output from Acceptance Testing

$ make testacc TESTS=TestAccWAFV2WebACL_associationConfig PKG=wafv2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/wafv2/... -v -count 1 -parallel 20 -run='TestAccWAFV2WebACL_associationConfig'  -timeout 180m
=== RUN   TestAccWAFV2WebACL_associationConfig
=== PAUSE TestAccWAFV2WebACL_associationConfig
=== CONT  TestAccWAFV2WebACL_associationConfig
--- PASS: TestAccWAFV2WebACL_associationConfig (28.49s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/wafv2	30.624s
...

Note: The only test which passes locally is the test added in this pull request. The rest of the Web ACL tests are skipped due to WAFInvalidOperationException: Your request contains fields that belong to a feature you are not allowed to use.

@github-actions
Copy link

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/wafv2 Issues and PRs that pertain to the wafv2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. labels May 31, 2023
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @TsvetanMilanov 👋

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! 😃

@ewbankkit ewbankkit added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels May 31, 2023
@TsvetanMilanov TsvetanMilanov force-pushed the f-aws_wafv2_web_acl-add-association_config branch from 0a8ca31 to e4cb8d2 Compare May 31, 2023 13:18
@TsvetanMilanov TsvetanMilanov force-pushed the f-aws_wafv2_web_acl-add-association_config branch from e4cb8d2 to d416aee Compare June 19, 2023 13:59
@TsvetanMilanov TsvetanMilanov force-pushed the f-aws_wafv2_web_acl-add-association_config branch from d416aee to 41385d6 Compare July 3, 2023 10:16
@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Jul 20, 2023
…hat belong to a feature you are not allowed to use' errors with nil 'association_config'.
Copy link
Contributor

@ewbankkit ewbankkit left a 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_basic\|TestAccWAFV2WebACL_associationConfig\|TestAccWAFV2WebACL_CloudFrontScope' PKG=wafv2 ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/wafv2/... -v -count 1 -parallel 2  -run=TestAccWAFV2WebACL_basic\|TestAccWAFV2WebACL_associationConfig\|TestAccWAFV2WebACL_CloudFrontScope -timeout 180m
=== RUN   TestAccWAFV2WebACL_basic
=== PAUSE TestAccWAFV2WebACL_basic
=== RUN   TestAccWAFV2WebACL_associationConfig
=== PAUSE TestAccWAFV2WebACL_associationConfig
=== RUN   TestAccWAFV2WebACL_CloudFrontScope
=== PAUSE TestAccWAFV2WebACL_CloudFrontScope
=== CONT  TestAccWAFV2WebACL_basic
=== CONT  TestAccWAFV2WebACL_CloudFrontScope
    acctest.go:873: skipping tests; AWS_DEFAULT_REGION (us-west-2) not supported. Supported: [us-east-1]
--- SKIP: TestAccWAFV2WebACL_CloudFrontScope (0.59s)
=== CONT  TestAccWAFV2WebACL_associationConfig
    acctest.go:873: skipping tests; AWS_DEFAULT_REGION (us-west-2) not supported. Supported: [us-east-1]
--- SKIP: TestAccWAFV2WebACL_associationConfig (0.00s)
--- PASS: TestAccWAFV2WebACL_basic (36.09s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/wafv2	42.149s
% AWS_DEFAULT_REGION=us-east-1 make testacc TESTARGS='-run=TestAccWAFV2WebACL_basic\|TestAccWAFV2WebACL_associationConfig\|TestAccWAFV2WebACL_CloudFrontScope' PKG=wafv2 ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/wafv2/... -v -count 1 -parallel 2  -run=TestAccWAFV2WebACL_basic\|TestAccWAFV2WebACL_associationConfig\|TestAccWAFV2WebACL_CloudFrontScope -timeout 180m
=== RUN   TestAccWAFV2WebACL_basic
=== PAUSE TestAccWAFV2WebACL_basic
=== RUN   TestAccWAFV2WebACL_associationConfig
=== PAUSE TestAccWAFV2WebACL_associationConfig
=== RUN   TestAccWAFV2WebACL_CloudFrontScope
=== PAUSE TestAccWAFV2WebACL_CloudFrontScope
=== CONT  TestAccWAFV2WebACL_basic
=== CONT  TestAccWAFV2WebACL_CloudFrontScope
--- PASS: TestAccWAFV2WebACL_basic (34.46s)
=== CONT  TestAccWAFV2WebACL_associationConfig
--- PASS: TestAccWAFV2WebACL_CloudFrontScope (36.60s)
--- PASS: TestAccWAFV2WebACL_associationConfig (27.73s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/wafv2	68.110s

@ewbankkit
Copy link
Contributor

@TsvetanMilanov Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 2c47b30 into hashicorp:main Jul 20, 2023
@github-actions github-actions bot added this to the v5.9.0 milestone Jul 20, 2023
@github-actions
Copy link

This functionality has been released in v5.9.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!

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2023
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. enhancement Requests to existing resources that expand the functionality or scope. service/wafv2 Issues and PRs that pertain to the wafv2 service. size/XL 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
3 participants