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 support for resource tags aws cloudwatch metric alarm #8168

Conversation

teraken0509
Copy link
Contributor

@teraken0509 teraken0509 commented Apr 3, 2019

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" comments, they generate extra noise for pull request followers and do not help prioritize the request

Fixes #8129

Changes proposed in this pull request:

  • Add support for resource tags for cloudwatch service.
  • Add tags attribute for aws_cloudwatch_metric_alarm resource.

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSCloudWatchMetricAlarm_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -parallel 20 -run=TestAccAWSCloudWatchMetricAlarm_ -timeout 120m
=== RUN   TestAccAWSCloudWatchMetricAlarm_basic
=== PAUSE TestAccAWSCloudWatchMetricAlarm_basic
=== RUN   TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate
=== PAUSE TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate
=== RUN   TestAccAWSCloudWatchMetricAlarm_AlarmActions_SNSTopic
=== PAUSE TestAccAWSCloudWatchMetricAlarm_AlarmActions_SNSTopic
=== RUN   TestAccAWSCloudWatchMetricAlarm_AlarmActions_SWFAction
=== PAUSE TestAccAWSCloudWatchMetricAlarm_AlarmActions_SWFAction
=== RUN   TestAccAWSCloudWatchMetricAlarm_datapointsToAlarm
=== PAUSE TestAccAWSCloudWatchMetricAlarm_datapointsToAlarm
=== RUN   TestAccAWSCloudWatchMetricAlarm_treatMissingData
=== PAUSE TestAccAWSCloudWatchMetricAlarm_treatMissingData
=== RUN   TestAccAWSCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles
=== PAUSE TestAccAWSCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles
=== RUN   TestAccAWSCloudWatchMetricAlarm_extendedStatistic
=== PAUSE TestAccAWSCloudWatchMetricAlarm_extendedStatistic
=== RUN   TestAccAWSCloudWatchMetricAlarm_expression
=== PAUSE TestAccAWSCloudWatchMetricAlarm_expression
=== RUN   TestAccAWSCloudWatchMetricAlarm_missingStatistic
=== PAUSE TestAccAWSCloudWatchMetricAlarm_missingStatistic
=== RUN   TestAccAWSCloudWatchMetricAlarm_tags
=== PAUSE TestAccAWSCloudWatchMetricAlarm_tags
=== CONT  TestAccAWSCloudWatchMetricAlarm_basic
=== CONT  TestAccAWSCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles
=== CONT  TestAccAWSCloudWatchMetricAlarm_tags
=== CONT  TestAccAWSCloudWatchMetricAlarm_missingStatistic
=== CONT  TestAccAWSCloudWatchMetricAlarm_expression
=== CONT  TestAccAWSCloudWatchMetricAlarm_extendedStatistic
=== CONT  TestAccAWSCloudWatchMetricAlarm_AlarmActions_SWFAction
=== CONT  TestAccAWSCloudWatchMetricAlarm_treatMissingData
=== CONT  TestAccAWSCloudWatchMetricAlarm_datapointsToAlarm
=== CONT  TestAccAWSCloudWatchMetricAlarm_AlarmActions_SNSTopic
=== CONT  TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate
--- PASS: TestAccAWSCloudWatchMetricAlarm_missingStatistic (13.38s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_datapointsToAlarm (27.37s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_extendedStatistic (27.63s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_basic (32.24s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_SNSTopic (33.81s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_SWFAction (35.05s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles (43.84s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_treatMissingData (43.91s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_tags (67.01s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_expression (85.51s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate (235.24s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	235.336s

@ghost ghost added documentation Introduces or discusses updates to documentation. service/cloudwatch Issues and PRs that pertain to the cloudwatch service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/XL Managed by automation to categorize the size of a PR. labels Apr 3, 2019
@teraken0509 teraken0509 force-pushed the feature/add-support-for-resource-tags-aws_cloudwatch_metric_alarm branch from 330a9cd to 749bee2 Compare April 4, 2019 15:36
@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Apr 4, 2019
@bflad bflad added this to the v2.5.0 milestone Apr 4, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Thanks so much, @kterada0509! 🚀

Output from acceptance testing (AWS Standard):

--- PASS: TestAccAWSCloudWatchMetricAlarm_missingStatistic (5.35s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_datapointsToAlarm (12.32s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_extendedStatistic (12.74s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_SWFAction (14.06s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_basic (14.39s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_SNSTopic (15.94s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles (17.82s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_treatMissingData (19.22s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_tags (31.15s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_expression (38.97s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate (230.29s)

Output from acceptance testing (AWS GovCloud (US)):

--- PASS: TestAccAWSCloudWatchMetricAlarm_missingStatistic (5.03s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_datapointsToAlarm (14.81s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_extendedStatistic (14.94s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_basic (18.12s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_SWFAction (18.47s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_SNSTopic (19.78s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_treatMissingData (24.36s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles (27.21s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_tags (41.50s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_expression (50.90s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate (192.24s)

@bflad bflad merged commit babb668 into hashicorp:master Apr 4, 2019
bflad added a commit that referenced this pull request Apr 4, 2019
@bflad
Copy link
Contributor

bflad commented Apr 5, 2019

This has been released in version 2.5.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@teraken0509 teraken0509 deleted the feature/add-support-for-resource-tags-aws_cloudwatch_metric_alarm branch March 5, 2020 14:03
@ghost
Copy link

ghost commented Mar 5, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 5, 2020
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/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.

r/aws_cloudwatch_metric_alarm: Add support for resource tags
2 participants