-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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 modern extended statistics for CloudWatch metric alarm #22942
Support modern extended statistics for CloudWatch metric alarm #22942
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @EpicWink 👋
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 CONTRIBUTING 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! 😃
689c64b
to
ee3aa66
Compare
…uccessful cases. Acceptance test output: % make testacc TESTS=TestAccCloudWatchMetricAlarm_extendedStatistic PKG=cloudwatch ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/cloudwatch/... -v -count 1 -parallel 20 -run='TestAccCloudWatchMetricAlarm_extendedStatistic' -timeout 180m === RUN TestAccCloudWatchMetricAlarm_extendedStatistic === PAUSE TestAccCloudWatchMetricAlarm_extendedStatistic === CONT TestAccCloudWatchMetricAlarm_extendedStatistic --- PASS: TestAccCloudWatchMetricAlarm_extendedStatistic (229.89s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudwatch 233.753s
@EpicWink Thanks for the contribution 🎉 👏. % make testacc TESTS=TestAccCloudWatchMetricAlarm_extendedStatistic PKG=cloudwatch
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cloudwatch/... -v -count 1 -parallel 20 -run='TestAccCloudWatchMetricAlarm_extendedStatistic' -timeout 180m
=== RUN TestAccCloudWatchMetricAlarm_extendedStatistic
=== PAUSE TestAccCloudWatchMetricAlarm_extendedStatistic
=== CONT TestAccCloudWatchMetricAlarm_extendedStatistic
--- PASS: TestAccCloudWatchMetricAlarm_extendedStatistic (229.89s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudwatch 233.753s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTS=TestAccCloudWatchMetricAlarm_ PKG=cloudwatch
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cloudwatch/... -v -count 1 -parallel 20 -run='TestAccCloudWatchMetricAlarm_' -timeout 180m
=== RUN TestAccCloudWatchMetricAlarm_basic
=== PAUSE TestAccCloudWatchMetricAlarm_basic
=== RUN TestAccCloudWatchMetricAlarm_AlarmActions_ec2Automate
=== PAUSE TestAccCloudWatchMetricAlarm_AlarmActions_ec2Automate
=== RUN TestAccCloudWatchMetricAlarm_AlarmActions_snsTopic
=== PAUSE TestAccCloudWatchMetricAlarm_AlarmActions_snsTopic
=== RUN TestAccCloudWatchMetricAlarm_AlarmActions_swfAction
=== PAUSE TestAccCloudWatchMetricAlarm_AlarmActions_swfAction
=== RUN TestAccCloudWatchMetricAlarm_dataPointsToAlarm
=== PAUSE TestAccCloudWatchMetricAlarm_dataPointsToAlarm
=== RUN TestAccCloudWatchMetricAlarm_treatMissingData
=== PAUSE TestAccCloudWatchMetricAlarm_treatMissingData
=== RUN TestAccCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles
=== PAUSE TestAccCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles
=== RUN TestAccCloudWatchMetricAlarm_extendedStatistic
=== PAUSE TestAccCloudWatchMetricAlarm_extendedStatistic
=== RUN TestAccCloudWatchMetricAlarm_expression
=== PAUSE TestAccCloudWatchMetricAlarm_expression
=== RUN TestAccCloudWatchMetricAlarm_missingStatistic
=== PAUSE TestAccCloudWatchMetricAlarm_missingStatistic
=== RUN TestAccCloudWatchMetricAlarm_tags
=== PAUSE TestAccCloudWatchMetricAlarm_tags
=== RUN TestAccCloudWatchMetricAlarm_disappears
=== PAUSE TestAccCloudWatchMetricAlarm_disappears
=== CONT TestAccCloudWatchMetricAlarm_basic
=== CONT TestAccCloudWatchMetricAlarm_expression
=== CONT TestAccCloudWatchMetricAlarm_dataPointsToAlarm
=== CONT TestAccCloudWatchMetricAlarm_AlarmActions_snsTopic
=== CONT TestAccCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles
=== CONT TestAccCloudWatchMetricAlarm_missingStatistic
=== CONT TestAccCloudWatchMetricAlarm_disappears
=== CONT TestAccCloudWatchMetricAlarm_treatMissingData
=== CONT TestAccCloudWatchMetricAlarm_extendedStatistic
=== CONT TestAccCloudWatchMetricAlarm_tags
=== CONT TestAccCloudWatchMetricAlarm_AlarmActions_swfAction
=== CONT TestAccCloudWatchMetricAlarm_AlarmActions_ec2Automate
--- PASS: TestAccCloudWatchMetricAlarm_missingStatistic (13.06s)
--- PASS: TestAccCloudWatchMetricAlarm_disappears (23.94s)
--- PASS: TestAccCloudWatchMetricAlarm_dataPointsToAlarm (25.89s)
--- PASS: TestAccCloudWatchMetricAlarm_basic (32.81s)
--- PASS: TestAccCloudWatchMetricAlarm_AlarmActions_swfAction (32.93s)
--- PASS: TestAccCloudWatchMetricAlarm_AlarmActions_snsTopic (35.35s)
--- PASS: TestAccCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles (45.67s)
--- PASS: TestAccCloudWatchMetricAlarm_tags (64.15s)
--- PASS: TestAccCloudWatchMetricAlarm_treatMissingData (64.17s)
--- PASS: TestAccCloudWatchMetricAlarm_expression (115.10s)
--- PASS: TestAccCloudWatchMetricAlarm_extendedStatistic (239.27s)
--- PASS: TestAccCloudWatchMetricAlarm_AlarmActions_ec2Automate (304.60s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudwatch 308.039s
This functionality has been released in v4.4.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! |
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. |
Community Note
Details
Adds complexity to the extended-statistic reg-ex to support the current statistics defined in the AWS docs during validation. Also parametrises tests for example statistics.
Closes #22078
Relates #13622
Test output
Output from acceptance testing
How do I test for invalid input? The test isn't catching the raised error, but running the test in non-acceptance mode passes