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

Support for tags aws_shield_protection #19168

Merged
merged 3 commits into from
May 3, 2021

Conversation

cob16
Copy link
Contributor

@cob16 cob16 commented Apr 29, 2021

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

Output from acceptance testing:

$  make testacc TESTARGS='-run=TestAccAWSShieldProtection_Cloudfront'

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.16 test ./aws -v -count 1 -parallel 20 -run=TestAccAWSShieldProtection_Cloudfront -timeout 180m
=== RUN   TestAccAWSShieldProtection_Cloudfront
=== PAUSE TestAccAWSShieldProtection_Cloudfront
=== RUN   TestAccAWSShieldProtection_Cloudfront_Tags
=== PAUSE TestAccAWSShieldProtection_Cloudfront_Tags
=== CONT  TestAccAWSShieldProtection_Cloudfront
=== CONT  TestAccAWSShieldProtection_Cloudfront_Tags
--- PASS: TestAccAWSShieldProtection_Cloudfront (193.39s)
--- PASS: TestAccAWSShieldProtection_Cloudfront_Tags (249.95s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	250.018s

Relates: #13826.
Closes: #18046.

@ghost ghost added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/shield Issues and PRs that pertain to the shield service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Apr 29, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 29, 2021
@cob16 cob16 changed the title add tags argument to aws_shield_protection Support for tags aws_shield_protection Apr 29, 2021
@cob16 cob16 marked this pull request as ready for review April 29, 2021 22:21
@cob16 cob16 requested a review from a team as a code owner April 29, 2021 22:21
for aws_shield_protection to Add `tags` argument
@cob16 cob16 force-pushed the f-aws-shield-protection-tags branch from 7026158 to bab0ba0 Compare April 30, 2021 08:01
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label May 3, 2021
@ewbankkit ewbankkit self-assigned this May 3, 2021
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 🚀.

Commercial
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSShieldProtection_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSShieldProtection_ -timeout 180m
=== RUN   TestAccAWSShieldProtection_GlobalAccelerator
=== PAUSE TestAccAWSShieldProtection_GlobalAccelerator
=== RUN   TestAccAWSShieldProtection_ElasticIPAddress
=== PAUSE TestAccAWSShieldProtection_ElasticIPAddress
=== RUN   TestAccAWSShieldProtection_disappears
=== PAUSE TestAccAWSShieldProtection_disappears
=== RUN   TestAccAWSShieldProtection_Alb
=== PAUSE TestAccAWSShieldProtection_Alb
=== RUN   TestAccAWSShieldProtection_Elb
=== PAUSE TestAccAWSShieldProtection_Elb
=== RUN   TestAccAWSShieldProtection_Cloudfront
=== PAUSE TestAccAWSShieldProtection_Cloudfront
=== RUN   TestAccAWSShieldProtection_Cloudfront_Tags
=== PAUSE TestAccAWSShieldProtection_Cloudfront_Tags
=== RUN   TestAccAWSShieldProtection_Route53
=== PAUSE TestAccAWSShieldProtection_Route53
=== CONT  TestAccAWSShieldProtection_GlobalAccelerator
=== CONT  TestAccAWSShieldProtection_Cloudfront
=== CONT  TestAccAWSShieldProtection_Route53
=== CONT  TestAccAWSShieldProtection_Elb
=== CONT  TestAccAWSShieldProtection_Alb
=== CONT  TestAccAWSShieldProtection_ElasticIPAddress
=== CONT  TestAccAWSShieldProtection_Cloudfront_Tags
=== CONT  TestAccAWSShieldProtection_disappears
--- PASS: TestAccAWSShieldProtection_disappears (16.14s)
--- PASS: TestAccAWSShieldProtection_ElasticIPAddress (17.82s)
--- PASS: TestAccAWSShieldProtection_Route53 (46.84s)
--- PASS: TestAccAWSShieldProtection_Elb (47.71s)
--- PASS: TestAccAWSShieldProtection_GlobalAccelerator (71.07s)
--- PASS: TestAccAWSShieldProtection_Cloudfront_Tags (177.99s)
--- PASS: TestAccAWSShieldProtection_Cloudfront (183.34s)
--- PASS: TestAccAWSShieldProtection_Alb (195.84s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	198.861s
GovCloud
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSShieldProtection_'       
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSShieldProtection_ -timeout 180m
=== RUN   TestAccAWSShieldProtection_GlobalAccelerator
=== PAUSE TestAccAWSShieldProtection_GlobalAccelerator
=== RUN   TestAccAWSShieldProtection_ElasticIPAddress
=== PAUSE TestAccAWSShieldProtection_ElasticIPAddress
=== RUN   TestAccAWSShieldProtection_disappears
=== PAUSE TestAccAWSShieldProtection_disappears
=== RUN   TestAccAWSShieldProtection_Alb
=== PAUSE TestAccAWSShieldProtection_Alb
=== RUN   TestAccAWSShieldProtection_Elb
=== PAUSE TestAccAWSShieldProtection_Elb
=== RUN   TestAccAWSShieldProtection_Cloudfront
=== PAUSE TestAccAWSShieldProtection_Cloudfront
=== RUN   TestAccAWSShieldProtection_Cloudfront_Tags
=== PAUSE TestAccAWSShieldProtection_Cloudfront_Tags
=== RUN   TestAccAWSShieldProtection_Route53
=== PAUSE TestAccAWSShieldProtection_Route53
=== CONT  TestAccAWSShieldProtection_GlobalAccelerator
=== CONT  TestAccAWSShieldProtection_Cloudfront
=== CONT  TestAccAWSShieldProtection_Route53
=== CONT  TestAccAWSShieldProtection_Cloudfront_Tags
=== CONT  TestAccAWSShieldProtection_Alb
=== CONT  TestAccAWSShieldProtection_disappears
=== CONT  TestAccAWSShieldProtection_ElasticIPAddress
=== CONT  TestAccAWSShieldProtection_Elb
=== CONT  TestAccAWSShieldProtection_GlobalAccelerator
    provider_test.go:721: skipping tests; partition aws-us-gov does not support shield service
=== CONT  TestAccAWSShieldProtection_Cloudfront
    provider_test.go:721: skipping tests; partition aws-us-gov does not support shield service
=== CONT  TestAccAWSShieldProtection_Route53
    provider_test.go:721: skipping tests; partition aws-us-gov does not support shield service
--- SKIP: TestAccAWSShieldProtection_Cloudfront (1.36s)
--- SKIP: TestAccAWSShieldProtection_GlobalAccelerator (1.36s)
--- SKIP: TestAccAWSShieldProtection_Route53 (1.36s)
=== CONT  TestAccAWSShieldProtection_Elb
    provider_test.go:721: skipping tests; partition aws-us-gov does not support shield service
--- SKIP: TestAccAWSShieldProtection_Elb (1.36s)
=== CONT  TestAccAWSShieldProtection_Cloudfront_Tags
    provider_test.go:721: skipping tests; partition aws-us-gov does not support shield service
--- SKIP: TestAccAWSShieldProtection_Cloudfront_Tags (1.36s)
=== CONT  TestAccAWSShieldProtection_ElasticIPAddress
    provider_test.go:721: skipping tests; partition aws-us-gov does not support shield service
=== CONT  TestAccAWSShieldProtection_disappears
    provider_test.go:721: skipping tests; partition aws-us-gov does not support shield service
--- SKIP: TestAccAWSShieldProtection_ElasticIPAddress (1.36s)
--- SKIP: TestAccAWSShieldProtection_disappears (1.36s)
=== CONT  TestAccAWSShieldProtection_Alb
    provider_test.go:721: skipping tests; partition aws-us-gov does not support shield service
--- SKIP: TestAccAWSShieldProtection_Alb (1.36s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	4.213s

@ewbankkit
Copy link
Contributor

@cob16 Thanks for the contribution 👏.
I went ahead and added a _disappears acceptance test to verify the error code checking you added in the resource Read method.

@ewbankkit ewbankkit merged commit 845d602 into hashicorp:main May 3, 2021
@github-actions github-actions bot added this to the v3.39.0 milestone May 3, 2021
@cob16 cob16 deleted the f-aws-shield-protection-tags branch May 3, 2021 19:21
@ghost
Copy link

ghost commented May 7, 2021

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

@github-actions
Copy link

github-actions bot commented Jun 6, 2021

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 Jun 6, 2021
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. provider Pertains to the provider itself, rather than any interaction with AWS. service/shield Issues and PRs that pertain to the shield 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
Development

Successfully merging this pull request may close these issues.

Refresh phase fails if Shield Protection was manually removed
2 participants