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

Cloudwatch cross account #20541

Merged
merged 7 commits into from
Aug 12, 2021
Merged

Conversation

nahratzah
Copy link

@nahratzah nahratzah commented Aug 12, 2021

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" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #20540

Output from acceptance testing:

ts-child-account-ingress-sandbox$> make testacc TESTARGS='-run=TestAccAWSCloudWatchMetricAlarm'
==> Checking that code complies with gofmt requirements...
xargs: gofmt: No such file or directory
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSCloudWatchMetricAlarm -timeout 180m
=== 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
=== RUN   TestAccAWSCloudWatchMetricAlarm_disappears
=== PAUSE TestAccAWSCloudWatchMetricAlarm_disappears
=== CONT  TestAccAWSCloudWatchMetricAlarm_basic
=== CONT  TestAccAWSCloudWatchMetricAlarm_disappears
=== CONT  TestAccAWSCloudWatchMetricAlarm_tags
=== CONT  TestAccAWSCloudWatchMetricAlarm_missingStatistic
=== CONT  TestAccAWSCloudWatchMetricAlarm_expression
=== CONT  TestAccAWSCloudWatchMetricAlarm_extendedStatistic
=== CONT  TestAccAWSCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles
=== CONT  TestAccAWSCloudWatchMetricAlarm_treatMissingData
=== CONT  TestAccAWSCloudWatchMetricAlarm_datapointsToAlarm
=== CONT  TestAccAWSCloudWatchMetricAlarm_AlarmActions_SWFAction
=== CONT  TestAccAWSCloudWatchMetricAlarm_AlarmActions_SNSTopic
=== CONT  TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate
--- PASS: TestAccAWSCloudWatchMetricAlarm_missingStatistic (20.79s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_disappears (40.22s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_datapointsToAlarm (44.96s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_extendedStatistic (47.62s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_SWFAction (54.51s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_basic (54.76s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_SNSTopic (54.97s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_treatMissingData (68.76s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles (69.23s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_tags (89.29s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_expression (123.92s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate (252.81s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       252.963s

@github-actions github-actions bot added service/cloudwatch Issues and PRs that pertain to the cloudwatch service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. size/S Managed by automation to categorize the size of a PR. labels Aug 12, 2021
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 @nahratzah 👋

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

@nahratzah nahratzah changed the title [WIP] Cloudwatch cross account Cloudwatch cross account Aug 12, 2021
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Aug 12, 2021
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 🚀.

Commercial
% make testacc TESTARGS='-run=TestAccAWSCloudWatchMetricAlarm_'                   
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSCloudWatchMetricAlarm_ -timeout 180m
=== 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
=== RUN   TestAccAWSCloudWatchMetricAlarm_disappears
=== PAUSE TestAccAWSCloudWatchMetricAlarm_disappears
=== CONT  TestAccAWSCloudWatchMetricAlarm_basic
=== CONT  TestAccAWSCloudWatchMetricAlarm_extendedStatistic
=== CONT  TestAccAWSCloudWatchMetricAlarm_datapointsToAlarm
=== CONT  TestAccAWSCloudWatchMetricAlarm_treatMissingData
=== CONT  TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate
=== CONT  TestAccAWSCloudWatchMetricAlarm_tags
=== CONT  TestAccAWSCloudWatchMetricAlarm_disappears
=== CONT  TestAccAWSCloudWatchMetricAlarm_missingStatistic
=== CONT  TestAccAWSCloudWatchMetricAlarm_AlarmActions_SWFAction
=== CONT  TestAccAWSCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles
=== CONT  TestAccAWSCloudWatchMetricAlarm_AlarmActions_SNSTopic
=== CONT  TestAccAWSCloudWatchMetricAlarm_expression
--- PASS: TestAccAWSCloudWatchMetricAlarm_missingStatistic (12.81s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_disappears (32.97s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_extendedStatistic (38.26s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_datapointsToAlarm (38.50s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_SWFAction (43.48s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_basic (44.31s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_SNSTopic (44.63s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles (58.25s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_treatMissingData (59.11s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_tags (75.20s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_expression (109.09s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate (227.46s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       232.515s
GovCloud
% make testacc TESTARGS='-run=TestAccAWSCloudWatchMetricAlarm_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSCloudWatchMetricAlarm_ -timeout 180m
=== 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
=== RUN   TestAccAWSCloudWatchMetricAlarm_disappears
=== PAUSE TestAccAWSCloudWatchMetricAlarm_disappears
=== CONT  TestAccAWSCloudWatchMetricAlarm_basic
=== CONT  TestAccAWSCloudWatchMetricAlarm_tags
=== CONT  TestAccAWSCloudWatchMetricAlarm_disappears
=== CONT  TestAccAWSCloudWatchMetricAlarm_treatMissingData
=== CONT  TestAccAWSCloudWatchMetricAlarm_missingStatistic
=== CONT  TestAccAWSCloudWatchMetricAlarm_AlarmActions_SNSTopic
=== CONT  TestAccAWSCloudWatchMetricAlarm_expression
=== CONT  TestAccAWSCloudWatchMetricAlarm_extendedStatistic
=== CONT  TestAccAWSCloudWatchMetricAlarm_AlarmActions_SWFAction
=== CONT  TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate
=== CONT  TestAccAWSCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles
=== CONT  TestAccAWSCloudWatchMetricAlarm_datapointsToAlarm
--- PASS: TestAccAWSCloudWatchMetricAlarm_missingStatistic (19.59s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_disappears (34.93s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_extendedStatistic (45.05s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_datapointsToAlarm (45.05s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_SNSTopic (49.34s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_basic (49.50s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_SWFAction (49.76s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_treatMissingData (61.85s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_evaluateLowSampleCountPercentiles (62.10s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_tags (78.92s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_expression (129.08s)
--- PASS: TestAccAWSCloudWatchMetricAlarm_AlarmActions_EC2Automate (235.73s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	243.394s

@ewbankkit
Copy link
Contributor

@nahratzah Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit eab99cf into hashicorp:main Aug 12, 2021
@github-actions github-actions bot added this to the v3.54.0 milestone Aug 12, 2021
@github-actions
Copy link

This functionality has been released in v3.54.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!

haidaraM added a commit to haidaraM/terraform-provider-aws that referenced this pull request Sep 7, 2021
Add the missing `account_id` in the documentation. It was added in hashicorp#20541
@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 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/cloudwatch Issues and PRs that pertain to the cloudwatch service. size/S 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.

cloudwatch alarm with cross-account metric
2 participants