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

aws_cloudwatch_log_group: Allow a three year retention period (1096 days) #29426

Conversation

leewilmott
Copy link

@leewilmott leewilmott commented Feb 15, 2023

Description

This change will allow a three year retention period to be set on the aws_cloudwatch_log_group resource. Such a retention period is allowed to be set in the console, but not [currently] via Terraform.

Relations

Closes #29423

References

Output from Acceptance Testing

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/logs/... -v -count 1 -parallel 20 -run='TestAccLogsGroup_retentionPolicy'  -timeout 180m
=== RUN   TestAccLogsGroup_retentionPolicy
=== PAUSE TestAccLogsGroup_retentionPolicy
=== CONT  TestAccLogsGroup_retentionPolicy
--- PASS: TestAccLogsGroup_retentionPolicy (45.95s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/logs       46.066s
...

@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 needs-triage Waiting for first response or review from a maintainer. size/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/logs Issues and PRs that pertain to the logs service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Feb 15, 2023
@leewilmott
Copy link
Author

Hi @mattburgess,

This was created to address this: #29423

Many thanks,

Lee

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 @leewilmott 👋

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

Copy link
Collaborator

@mattburgess mattburgess left a comment

Choose a reason for hiding this comment

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

@leewilmott this looks great to me! The only minor issue is that as per https://hashicorp.github.io/terraform-provider-aws/changelog-process/#changelog-format your ChangeLog entry needs to be against the PR number (29426) not the issue number.

@leewilmott
Copy link
Author

@mattburgess, thank you...I will update that now. Out of interest, how would I have done this? I wouldn't have known the PR number until 'after' I created a PR...so, I guess you need to create the PR first and then make a subsequent change to add the ChangeLog data....is that correct?

@leewilmott
Copy link
Author

@mattburgess, I have now made that change...thank you! Over to you for review.

@mattburgess
Copy link
Collaborator

so, I guess you need to create the PR first and then make a subsequent change to add the ChangeLog data....is that correct?

I believe so... that's certainly what I do anyway.

@mattburgess
Copy link
Collaborator

@mattburgess, I have now made that change...thank you! Over to you for review.

Ok. Just to set expectations, I only recently got "Collaborator" status on this project so I'm double checking with the maintainers to make sure I'm reviewing/approving correctly. I'll get back to you as soon as I find out.

@leewilmott
Copy link
Author

That's fine...and I'm not a professional coder either. So, I appreciate any guidance and suggestions.

@ewbankkit ewbankkit changed the title aws_cloudwatch_log_group: Allow a three year retention period (1096 d… aws_cloudwatch_log_group: Allow a three year retention period (1096 days) Feb 16, 2023
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Feb 16, 2023
@ewbankkit ewbankkit self-assigned this Feb 16, 2023
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=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   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
=== CONT  TestAccLogsGroup_multiple
--- PASS: TestAccLogsGroup_multiple (15.26s)
=== CONT  TestAccLogsGroup_skipDestroy
--- PASS: TestAccLogsGroup_basic (17.79s)
=== CONT  TestAccLogsGroup_retentionPolicy
--- PASS: TestAccLogsGroup_skipDestroy (13.23s)
=== CONT  TestAccLogsGroup_disappears
--- PASS: TestAccLogsGroup_disappears (11.27s)
=== CONT  TestAccLogsGroup_tags
--- PASS: TestAccLogsGroup_kmsKey (48.44s)
=== CONT  TestAccLogsGroup_namePrefix
--- PASS: TestAccLogsGroup_retentionPolicy (41.47s)
=== CONT  TestAccLogsGroup_nameGenerate
--- PASS: TestAccLogsGroup_namePrefix (18.00s)
--- PASS: TestAccLogsGroup_nameGenerate (16.51s)
--- PASS: TestAccLogsGroup_tags (41.48s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/logs	86.358s

@ewbankkit ewbankkit added the bug Addresses a defect in current functionality. label Feb 16, 2023
@ewbankkit
Copy link
Contributor

@leewilmott Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit cfb1f82 into hashicorp:main Feb 16, 2023
@github-actions github-actions bot added this to the v4.55.0 milestone Feb 16, 2023
@leewilmott
Copy link
Author

That's great, thank you @ewbankkit!

@leewilmott leewilmott deleted the f-29423_aws_cloudwatch_log_group_allow_three_year_retention branch February 16, 2023 17:24
@github-actions
Copy link

This functionality has been released in v4.55.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 Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. documentation Introduces or discusses updates to documentation. service/logs Issues and PRs that pertain to the logs service. size/XS 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.

[Bug]: aws_cloudwatch_log_group resource: Allow 3 year retention
3 participants