Skip to content

fix(cloudwatch-actions): stack partition is hardcoded 'aws' in action arn #20224

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

Merged
merged 2 commits into from
May 13, 2022

Conversation

laurelmay
Copy link
Contributor

@laurelmay laurelmay commented May 5, 2022

This removes the hardcoded partition in the ARNs of Alarm Actions for
EC2 and SSM. This ensures that these don't unnecessarily break in other
non-standard partitions. This uses the ARN of the stack, as done for the
region and account.

This updates a regular expression in @aws-cdk/aws-cloudwatch as well
to make sure that EC2 actions are still validated as-expected in GovCloud
and other partitions that may support AlarmActions.

Closes #19765


All Submissions:

Adding new Unconventional Dependencies:

  • This PR adds new unconventional dependencies following the process described here

New Features

  • Have you added the new feature to an integration test?
    • Did you use yarn integ to deploy the infrastructure and generate the snapshot (i.e. yarn integ without --dry-run)?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Sorry, something went wrong.

@gitpod-io
Copy link

gitpod-io bot commented May 5, 2022

@aws-cdk-automation aws-cdk-automation requested a review from a team May 5, 2022 01:47
@github-actions github-actions bot added bug This issue is a bug. p1 labels May 5, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
This removes the hardcoded partition in the ARNs of Alarm Actions for
EC2 and SSM. This ensures that these don't unnecessarily break in other
non-standard partitions. This uses the ARN of the stack, as done for the
region and account.
@laurelmay laurelmay force-pushed the fix-govcloud-cw-alarm-action-ec2 branch from 6045c85 to 0eede1f Compare May 5, 2022 02:33
@TheRealAmazonKendra TheRealAmazonKendra changed the title fix(cloudwatch-actions): Use stack partition in Action ARN fix(cloudwatch-actions): stack partition is hardcoded 'aws' in action arn May 13, 2022
@mergify
Copy link
Contributor

mergify bot commented May 13, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 9549a40
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 0eb6c3b into aws:master May 13, 2022
@mergify
Copy link
Contributor

mergify bot commented May 13, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@laurelmay laurelmay deleted the fix-govcloud-cw-alarm-action-ec2 branch May 13, 2022 04:36
wphilipw pushed a commit to wphilipw/aws-cdk that referenced this pull request May 23, 2022
… arn (aws#20224)

This removes the hardcoded partition in the ARNs of Alarm Actions for
EC2 and SSM. This ensures that these don't unnecessarily break in other
non-standard partitions. This uses the ARN of the stack, as done for the
region and account.

This updates a regular expression in `@aws-cdk/aws-cloudwatch` as well
to make sure that EC2 actions are still validated as-expected in GovCloud
and other partitions that may support AlarmActions.

Closes aws#19765

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add_cloudwatch_action <ec2 autorecover actions>: works only in aws partition
4 participants