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

Add CloudWatch composite alarm actions suppressor attributes #32751

Conversation

DanielRieske
Copy link
Contributor

@DanielRieske DanielRieske commented Jul 28, 2023

Description

This PR adds the ActionsSuppressor options, which has alarm, extension_period and wait_period attributes to configure actions suppressor.

https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutCompositeAlarm.html

Relations

Closes #32251

References

Output from Acceptance Testing

terraform-provider-aws git:(f-aws_cloudwatch_composite_alarm_suppressor_attributes) ✗ make testacc TESTS=TestAccCloudWatchCompositeAlarm_actionSuppressor PKG=cloudwatch
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cloudwatch/... -v -count 1 -parallel 20 -run='TestAccCloudWatchCompositeAlarm_actionSuppressor'  -timeout 180m
=== RUN   TestAccCloudWatchCompositeAlarm_actionSuppressor
=== PAUSE TestAccCloudWatchCompositeAlarm_actionSuppressor
=== CONT  TestAccCloudWatchCompositeAlarm_actionSuppressor
--- PASS: TestAccCloudWatchCompositeAlarm_actionSuppressor (31.23s)
PASS
ok      [github.com/hashicorp/terraform-provider-aws/internal/service/cloudwatch](http://github.com/hashicorp/terraform-provider-aws/internal/service/cloudwatch) 33.100s

@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. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/cloudwatch Issues and PRs that pertain to the cloudwatch service. needs-triage Waiting for first response or review from a maintainer. and removed size/M Managed by automation to categorize the size of a PR. labels Jul 28, 2023
@DanielRieske DanielRieske marked this pull request as ready for review July 28, 2023 23:15
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 @DanielRieske 👋

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 Jul 31, 2023
@github-actions github-actions bot added the size/M Managed by automation to categorize the size of a PR. label Aug 5, 2023
@DanielRieske DanielRieske changed the title Add CloudWatch omposite alarm actions suppressor attributes Add CloudWatch composite alarm actions suppressor attributes Aug 5, 2023
Copy link
Member

@bschaatsbergen bschaatsbergen left a comment

Choose a reason for hiding this comment

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

Added a few drive-by comments - I've asked @ewbankkit to review this as we're direct colleagues.

Nice work @DanielRieske 👍🏼

.changelog/32751.txt Show resolved Hide resolved
internal/service/cloudwatch/composite_alarm.go Outdated Show resolved Hide resolved
internal/service/cloudwatch/composite_alarm.go Outdated Show resolved Hide resolved
internal/service/cloudwatch/composite_alarm_test.go Outdated Show resolved Hide resolved
website/docs/r/cloudwatch_composite_alarm.html.markdown Outdated Show resolved Hide resolved
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=TestAccCloudWatchCompositeAlarm_' PKG=cloudwatch ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cloudwatch/... -v -count 1 -parallel 2  -run=TestAccCloudWatchCompositeAlarm_ -timeout 180m
=== RUN   TestAccCloudWatchCompositeAlarm_basic
=== PAUSE TestAccCloudWatchCompositeAlarm_basic
=== RUN   TestAccCloudWatchCompositeAlarm_disappears
=== PAUSE TestAccCloudWatchCompositeAlarm_disappears
=== RUN   TestAccCloudWatchCompositeAlarm_tags
=== PAUSE TestAccCloudWatchCompositeAlarm_tags
=== RUN   TestAccCloudWatchCompositeAlarm_actionsEnabled
=== PAUSE TestAccCloudWatchCompositeAlarm_actionsEnabled
=== RUN   TestAccCloudWatchCompositeAlarm_alarmActions
=== PAUSE TestAccCloudWatchCompositeAlarm_alarmActions
=== RUN   TestAccCloudWatchCompositeAlarm_description
=== PAUSE TestAccCloudWatchCompositeAlarm_description
=== RUN   TestAccCloudWatchCompositeAlarm_updateAlarmRule
=== PAUSE TestAccCloudWatchCompositeAlarm_updateAlarmRule
=== RUN   TestAccCloudWatchCompositeAlarm_insufficientDataActions
=== PAUSE TestAccCloudWatchCompositeAlarm_insufficientDataActions
=== RUN   TestAccCloudWatchCompositeAlarm_okActions
=== PAUSE TestAccCloudWatchCompositeAlarm_okActions
=== RUN   TestAccCloudWatchCompositeAlarm_allActions
=== PAUSE TestAccCloudWatchCompositeAlarm_allActions
=== RUN   TestAccCloudWatchCompositeAlarm_actionsSuppressor
=== PAUSE TestAccCloudWatchCompositeAlarm_actionsSuppressor
=== CONT  TestAccCloudWatchCompositeAlarm_basic
=== CONT  TestAccCloudWatchCompositeAlarm_updateAlarmRule
--- PASS: TestAccCloudWatchCompositeAlarm_basic (32.83s)
=== CONT  TestAccCloudWatchCompositeAlarm_actionsEnabled
--- PASS: TestAccCloudWatchCompositeAlarm_updateAlarmRule (55.08s)
=== CONT  TestAccCloudWatchCompositeAlarm_description
--- PASS: TestAccCloudWatchCompositeAlarm_actionsEnabled (52.59s)
=== CONT  TestAccCloudWatchCompositeAlarm_alarmActions
--- PASS: TestAccCloudWatchCompositeAlarm_description (51.29s)
=== CONT  TestAccCloudWatchCompositeAlarm_tags
--- PASS: TestAccCloudWatchCompositeAlarm_alarmActions (70.44s)
=== CONT  TestAccCloudWatchCompositeAlarm_allActions
--- PASS: TestAccCloudWatchCompositeAlarm_tags (68.87s)
=== CONT  TestAccCloudWatchCompositeAlarm_actionsSuppressor
--- PASS: TestAccCloudWatchCompositeAlarm_actionsSuppressor (30.92s)
=== CONT  TestAccCloudWatchCompositeAlarm_okActions
--- PASS: TestAccCloudWatchCompositeAlarm_allActions (50.41s)
=== CONT  TestAccCloudWatchCompositeAlarm_insufficientDataActions
--- PASS: TestAccCloudWatchCompositeAlarm_insufficientDataActions (70.31s)
=== CONT  TestAccCloudWatchCompositeAlarm_disappears
--- PASS: TestAccCloudWatchCompositeAlarm_okActions (74.03s)
--- PASS: TestAccCloudWatchCompositeAlarm_disappears (21.92s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/cloudwatch	304.382s

@ewbankkit
Copy link
Contributor

@DanielRieske Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 63c9cda into hashicorp:main Aug 10, 2023
@github-actions github-actions bot added this to the v5.12.0 milestone Aug 10, 2023
@github-actions
Copy link

This functionality has been released in v5.12.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 Sep 10, 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/cloudwatch Issues and PRs that pertain to the cloudwatch service. size/M 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.

[Enhancement]: Missing configurations for actions suppressor in aws_cloudwatch_composite_alarm resource
4 participants