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

feat: support skip_destroy on aws_cloudwatch_logs_group resource #26775

Merged

Conversation

G-Rath
Copy link
Contributor

@G-Rath G-Rath commented Sep 13, 2022

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 #26752

Output from acceptance testing:

$ make testacc TESTS=TestAccLogsGroup_ PKG=logs
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/logs/... -v -count 1 -parallel 20 -run='TestAccLogsGroup_'  -timeout 180m
=== RUN   TestAccLogsGroup_basic
=== PAUSE TestAccLogsGroup_basic
=== RUN   TestAccLogsGroup_namePrefix
=== PAUSE TestAccLogsGroup_namePrefix
=== RUN   TestAccLogsGroup_skipDestroy
=== PAUSE TestAccLogsGroup_skipDestroy
=== RUN   TestAccLogsGroup_NamePrefix_retention
=== PAUSE TestAccLogsGroup_NamePrefix_retention
=== RUN   TestAccLogsGroup_generatedName
=== PAUSE TestAccLogsGroup_generatedName
=== RUN   TestAccLogsGroup_retentionPolicy
=== PAUSE TestAccLogsGroup_retentionPolicy
=== RUN   TestAccLogsGroup_multiple
=== PAUSE TestAccLogsGroup_multiple
=== RUN   TestAccLogsGroup_disappears
=== PAUSE TestAccLogsGroup_disappears
=== RUN   TestAccLogsGroup_tagging
=== PAUSE TestAccLogsGroup_tagging
=== RUN   TestAccLogsGroup_kmsKey
=== PAUSE TestAccLogsGroup_kmsKey
=== CONT  TestAccLogsGroup_basic
=== CONT  TestAccLogsGroup_retentionPolicy
=== CONT  TestAccLogsGroup_NamePrefix_retention
=== CONT  TestAccLogsGroup_namePrefix
=== CONT  TestAccLogsGroup_kmsKey
=== CONT  TestAccLogsGroup_tagging
=== CONT  TestAccLogsGroup_disappears
=== CONT  TestAccLogsGroup_skipDestroy
=== CONT  TestAccLogsGroup_multiple
=== CONT  TestAccLogsGroup_generatedName
=== CONT  TestAccLogsGroup_disappears
--- PASS: TestAccLogsGroup_disappears (26.11s)
--- PASS: TestAccLogsGroup_skipDestroy (121.93s)
--- PASS: TestAccLogsGroup_basic (157.43s)
--- PASS: TestAccLogsGroup_generatedName (158.99s)
--- PASS: TestAccLogsGroup_namePrefix (160.12s)
--- PASS: TestAccLogsGroup_multiple (160.29s)
--- PASS: TestAccLogsGroup_retentionPolicy (216.63s)
--- PASS: TestAccLogsGroup_NamePrefix_retention (218.63s)
--- PASS: TestAccLogsGroup_kmsKey (227.36s)
--- PASS: TestAccLogsGroup_tagging (283.27s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/logs       283.383s

@github-actions github-actions bot added service/logs Issues and PRs that pertain to the logs service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/S Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. labels Sep 13, 2022
@G-Rath G-Rath force-pushed the f-add-skip-destroy-to-cloudwatch-logs-group branch from 204b277 to 24ffed0 Compare September 13, 2022 06:03
@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. and removed size/S Managed by automation to categorize the size of a PR. labels Sep 13, 2022
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 @G-Rath 👋

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

@justinretzolk justinretzolk 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 Sep 13, 2022
@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Sep 13, 2022
Acceptance test output:

% make testacc TESTARGS='-run=TestAccLogsGroup_' PKG=logs ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/logs/... -v -count 1 -parallel 2  -run=TestAccLogsGroup_ -timeout 180m
=== RUN   TestAccLogsGroup_basic
=== PAUSE TestAccLogsGroup_basic
=== RUN   TestAccLogsGroup_nameGenerate
=== PAUSE TestAccLogsGroup_nameGenerate
=== RUN   TestAccLogsGroup_namePrefix
=== PAUSE TestAccLogsGroup_namePrefix
=== RUN   TestAccLogsGroup_disappears
=== PAUSE TestAccLogsGroup_disappears
=== RUN   TestAccLogsGroup_tags
=== PAUSE TestAccLogsGroup_tags
=== RUN   TestAccLogsGroup_kmsKey
=== PAUSE TestAccLogsGroup_kmsKey
=== RUN   TestAccLogsGroup_retentionPolicy
=== PAUSE TestAccLogsGroup_retentionPolicy
=== RUN   TestAccLogsGroup_multiple
=== PAUSE TestAccLogsGroup_multiple
=== RUN   TestAccLogsGroup_skipDestroy
=== PAUSE TestAccLogsGroup_skipDestroy
=== CONT  TestAccLogsGroup_basic
=== CONT  TestAccLogsGroup_kmsKey
--- PASS: TestAccLogsGroup_basic (20.73s)
=== CONT  TestAccLogsGroup_disappears
--- PASS: TestAccLogsGroup_disappears (14.22s)
=== CONT  TestAccLogsGroup_tags
--- PASS: TestAccLogsGroup_kmsKey (54.26s)
=== CONT  TestAccLogsGroup_skipDestroy
--- PASS: TestAccLogsGroup_skipDestroy (14.95s)
=== CONT  TestAccLogsGroup_namePrefix
--- PASS: TestAccLogsGroup_tags (45.38s)
=== CONT  TestAccLogsGroup_nameGenerate
--- PASS: TestAccLogsGroup_namePrefix (18.51s)
=== CONT  TestAccLogsGroup_retentionPolicy
--- PASS: TestAccLogsGroup_nameGenerate (18.57s)
=== CONT  TestAccLogsGroup_multiple
--- PASS: TestAccLogsGroup_multiple (15.86s)
--- PASS: TestAccLogsGroup_retentionPolicy (31.38s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/logs	123.609s
Acceptance test output:

% make testacc TESTARGS='-run=TestAccLogsGroupDataSource_' PKG=logs ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/logs/... -v -count 1 -parallel 2  -run=TestAccLogsGroupDataSource_ -timeout 180m
=== RUN   TestAccLogsGroupDataSource_basic
=== PAUSE TestAccLogsGroupDataSource_basic
=== CONT  TestAccLogsGroupDataSource_basic
--- PASS: TestAccLogsGroupDataSource_basic (18.36s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/logs	23.186s
…ashicorp#15090).

Acceptance test output:

% make testacc TESTARGS='-run=TestAccLogsGroup' PKG=logs ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/logs/... -v -count 1 -parallel 2  -run=TestAccLogsGroup -timeout 180m
=== RUN   TestAccLogsGroupDataSource_basic
=== PAUSE TestAccLogsGroupDataSource_basic
=== RUN   TestAccLogsGroup_basic
=== PAUSE TestAccLogsGroup_basic
=== RUN   TestAccLogsGroup_nameGenerate
=== PAUSE TestAccLogsGroup_nameGenerate
=== RUN   TestAccLogsGroup_namePrefix
=== PAUSE TestAccLogsGroup_namePrefix
=== RUN   TestAccLogsGroup_disappears
=== PAUSE TestAccLogsGroup_disappears
=== RUN   TestAccLogsGroup_tags
=== PAUSE TestAccLogsGroup_tags
=== RUN   TestAccLogsGroup_kmsKey
=== PAUSE TestAccLogsGroup_kmsKey
=== RUN   TestAccLogsGroup_retentionPolicy
=== PAUSE TestAccLogsGroup_retentionPolicy
=== RUN   TestAccLogsGroup_multiple
=== PAUSE TestAccLogsGroup_multiple
=== RUN   TestAccLogsGroup_skipDestroy
=== PAUSE TestAccLogsGroup_skipDestroy
=== RUN   TestAccLogsGroupsDataSource_basic
=== PAUSE TestAccLogsGroupsDataSource_basic
=== RUN   TestAccLogsGroupsDataSource_noPrefix
=== PAUSE TestAccLogsGroupsDataSource_noPrefix
=== CONT  TestAccLogsGroupDataSource_basic
=== CONT  TestAccLogsGroup_kmsKey
--- PASS: TestAccLogsGroupDataSource_basic (19.91s)
=== CONT  TestAccLogsGroup_skipDestroy
--- PASS: TestAccLogsGroup_skipDestroy (16.49s)
=== CONT  TestAccLogsGroupsDataSource_noPrefix
--- PASS: TestAccLogsGroupsDataSource_noPrefix (17.97s)
=== CONT  TestAccLogsGroupsDataSource_basic
--- PASS: TestAccLogsGroup_kmsKey (56.70s)
=== CONT  TestAccLogsGroup_multiple
--- PASS: TestAccLogsGroupsDataSource_basic (16.42s)
=== CONT  TestAccLogsGroup_namePrefix
--- PASS: TestAccLogsGroup_multiple (16.25s)
=== CONT  TestAccLogsGroup_tags
--- PASS: TestAccLogsGroup_namePrefix (18.53s)
=== CONT  TestAccLogsGroup_disappears
--- PASS: TestAccLogsGroup_disappears (13.91s)
=== CONT  TestAccLogsGroup_nameGenerate
--- PASS: TestAccLogsGroup_tags (45.44s)
=== CONT  TestAccLogsGroup_basic
--- PASS: TestAccLogsGroup_nameGenerate (18.80s)
=== CONT  TestAccLogsGroup_retentionPolicy
--- PASS: TestAccLogsGroup_basic (18.65s)
--- PASS: TestAccLogsGroup_retentionPolicy (32.96s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/logs	159.501s
@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Nov 14, 2022
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=TestAccLogsGroup' PKG=logs ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/logs/... -v -count 1 -parallel 2  -run=TestAccLogsGroup -timeout 180m
=== RUN   TestAccLogsGroupDataSource_basic
=== PAUSE TestAccLogsGroupDataSource_basic
=== RUN   TestAccLogsGroup_basic
=== PAUSE TestAccLogsGroup_basic
=== RUN   TestAccLogsGroup_nameGenerate
=== PAUSE TestAccLogsGroup_nameGenerate
=== RUN   TestAccLogsGroup_namePrefix
=== PAUSE TestAccLogsGroup_namePrefix
=== RUN   TestAccLogsGroup_disappears
=== PAUSE TestAccLogsGroup_disappears
=== RUN   TestAccLogsGroup_tags
=== PAUSE TestAccLogsGroup_tags
=== RUN   TestAccLogsGroup_kmsKey
=== PAUSE TestAccLogsGroup_kmsKey
=== RUN   TestAccLogsGroup_retentionPolicy
=== PAUSE TestAccLogsGroup_retentionPolicy
=== RUN   TestAccLogsGroup_multiple
=== PAUSE TestAccLogsGroup_multiple
=== RUN   TestAccLogsGroup_skipDestroy
=== PAUSE TestAccLogsGroup_skipDestroy
=== RUN   TestAccLogsGroupsDataSource_basic
=== PAUSE TestAccLogsGroupsDataSource_basic
=== RUN   TestAccLogsGroupsDataSource_noPrefix
=== PAUSE TestAccLogsGroupsDataSource_noPrefix
=== CONT  TestAccLogsGroupDataSource_basic
=== CONT  TestAccLogsGroup_kmsKey
--- PASS: TestAccLogsGroupDataSource_basic (19.91s)
=== CONT  TestAccLogsGroup_skipDestroy
--- PASS: TestAccLogsGroup_skipDestroy (16.49s)
=== CONT  TestAccLogsGroupsDataSource_noPrefix
--- PASS: TestAccLogsGroupsDataSource_noPrefix (17.97s)
=== CONT  TestAccLogsGroupsDataSource_basic
--- PASS: TestAccLogsGroup_kmsKey (56.70s)
=== CONT  TestAccLogsGroup_multiple
--- PASS: TestAccLogsGroupsDataSource_basic (16.42s)
=== CONT  TestAccLogsGroup_namePrefix
--- PASS: TestAccLogsGroup_multiple (16.25s)
=== CONT  TestAccLogsGroup_tags
--- PASS: TestAccLogsGroup_namePrefix (18.53s)
=== CONT  TestAccLogsGroup_disappears
--- PASS: TestAccLogsGroup_disappears (13.91s)
=== CONT  TestAccLogsGroup_nameGenerate
--- PASS: TestAccLogsGroup_tags (45.44s)
=== CONT  TestAccLogsGroup_basic
--- PASS: TestAccLogsGroup_nameGenerate (18.80s)
=== CONT  TestAccLogsGroup_retentionPolicy
--- PASS: TestAccLogsGroup_basic (18.65s)
--- PASS: TestAccLogsGroup_retentionPolicy (32.96s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/logs	159.501s

@ewbankkit
Copy link
Contributor

@G-Rath Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit ee4cd1a into hashicorp:main Nov 14, 2022
@github-actions github-actions bot added this to the v4.40.0 milestone Nov 14, 2022
@G-Rath G-Rath deleted the f-add-skip-destroy-to-cloudwatch-logs-group branch November 15, 2022 05:03
@github-actions
Copy link

This functionality has been released in v4.40.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 Dec 18, 2022
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/logs Issues and PRs that pertain to the logs 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.

skip_destroy support for aws_cloudwatch_log_group
3 participants