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_cloudwatch_log_group: Use log group-specific tagging functions #28492

Merged
merged 3 commits into from
Dec 20, 2022

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Dec 20, 2022

Description

Restores use of the ListTagsLogGroup, TagLogGroup and UntagLogGroup APIs to avoid AWS-managed IAM policy errors.

Relations

Closes #28422.
Closes #28491.
Relates #28359.

References

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccLogsGroup' PKG=logs ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/logs/... -v -count 1 -parallel 3  -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
=== CONT  TestAccLogsGroup_namePrefix
--- PASS: TestAccLogsGroupDataSource_basic (20.00s)
=== CONT  TestAccLogsGroup_nameGenerate
--- PASS: TestAccLogsGroup_namePrefix (22.85s)
=== CONT  TestAccLogsGroup_tags
--- PASS: TestAccLogsGroup_nameGenerate (22.31s)
=== CONT  TestAccLogsGroup_disappears
--- PASS: TestAccLogsGroup_disappears (19.71s)
=== CONT  TestAccLogsGroup_skipDestroy
--- PASS: TestAccLogsGroup_kmsKey (64.84s)
=== CONT  TestAccLogsGroupsDataSource_noPrefix
--- PASS: TestAccLogsGroup_tags (62.13s)
=== CONT  TestAccLogsGroupsDataSource_basic
--- PASS: TestAccLogsGroup_skipDestroy (25.19s)
=== CONT  TestAccLogsGroup_multiple
--- PASS: TestAccLogsGroupsDataSource_noPrefix (33.32s)
=== CONT  TestAccLogsGroup_basic
--- PASS: TestAccLogsGroupsDataSource_basic (27.75s)
=== CONT  TestAccLogsGroup_retentionPolicy
--- PASS: TestAccLogsGroup_multiple (27.09s)
--- PASS: TestAccLogsGroup_basic (27.75s)
--- PASS: TestAccLogsGroup_retentionPolicy (39.00s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/logs	160.613s

@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/M Managed by automation to categorize the size of a PR. generators Relates to code generators. service/logs Issues and PRs that pertain to the logs service. labels Dec 20, 2022
Copy link
Member

@jar-b jar-b 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=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/logs/... -v -count 1 -parallel 3  -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  TestAccLogsGroupsDataSource_noPrefix
=== CONT  TestAccLogsGroup_kmsKey
--- PASS: TestAccLogsGroupDataSource_basic (12.92s)
=== CONT  TestAccLogsGroup_namePrefix
--- PASS: TestAccLogsGroupsDataSource_noPrefix (12.99s)
=== CONT  TestAccLogsGroup_tags
--- PASS: TestAccLogsGroup_namePrefix (13.36s)
=== CONT  TestAccLogsGroup_disappears
--- PASS: TestAccLogsGroup_disappears (9.03s)
=== CONT  TestAccLogsGroup_skipDestroy
--- PASS: TestAccLogsGroup_kmsKey (38.74s)
=== CONT  TestAccLogsGroupsDataSource_basic
--- PASS: TestAccLogsGroup_tags (30.42s)
=== CONT  TestAccLogsGroup_multiple
--- PASS: TestAccLogsGroup_skipDestroy (10.18s)
=== CONT  TestAccLogsGroup_nameGenerate
--- PASS: TestAccLogsGroupsDataSource_basic (11.35s)
=== CONT  TestAccLogsGroup_basic
--- PASS: TestAccLogsGroup_multiple (11.09s)
=== CONT  TestAccLogsGroup_retentionPolicy
--- PASS: TestAccLogsGroup_nameGenerate (12.71s)
--- PASS: TestAccLogsGroup_basic (12.74s)
--- PASS: TestAccLogsGroup_retentionPolicy (22.25s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/logs       79.786s

@github-actions
Copy link

github-actions bot commented Jan 5, 2023

This functionality has been released in v4.49.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

github-actions bot commented Feb 5, 2023

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 Feb 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
generators Relates to code generators. service/logs Issues and PRs that pertain to the logs service. size/M Managed by automation to categorize the size of a PR.
Projects
None yet
2 participants