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] Composite Alarm ARN is incorrect #11184

Closed
Khufu-I opened this issue Oct 29, 2020 · 1 comment · Fixed by #11186
Closed

[cloudwatch] Composite Alarm ARN is incorrect #11184

Khufu-I opened this issue Oct 29, 2020 · 1 comment · Fixed by #11186
Assignees
Labels
@aws-cdk/aws-cloudwatch Related to Amazon CloudWatch bug This issue is a bug. in-progress This issue is being actively worked on. needs-triage This issue or PR still needs to be triaged.

Comments

@Khufu-I
Copy link
Contributor

Khufu-I commented Oct 29, 2020

Cloudwatch Composite Alarm ARN generated by CompositeAlarm construct is incorrect.

Reproduction Steps

import cdk from 'monocdk';
import cloudwatch from 'monocdk/aws-cloudwatch.js';

const availabilitySharpDropAlarm = new cloudwatch.Alarm(this, 'AvailabilitySharpDropAlarm', {
  evaluationPeriods: 5,
  metric: availabilityMetric.with({ period: cdk.Duration.minutes(1) }),
  threshold: 50,
  alarmName: `Synthetics-Alarm-AvailabilitySharpDrop`,
});
const availabiltyAlarm = new cloudwatch.CompositeAlarm(this, 'AvailabilityAlarm', {
  compositeAlarmName: `availabilty`,
  alarmDescription: `Composite alarm`,
  alarmRule: cloudwatch.AlarmRule.anyOf(availabilitySharpDropAlarm),
});
//availabilityAlarm.alarmArn is incorrect

What did you expect to happen?

The separator between resource name and composite alarm name should be :

       "Fn::Join": [
            "",
            [
              "arn:",
              {
                "Ref": "AWS::Partition"
              },
              ":cloudwatch:us-west-2:945593679341:alarm:availabilty"
            ]
          ]

What actually happened?

The separator between resource name and composite alarm is /

       "Fn::Join": [
            "",
            [
              "arn:",
              {
                "Ref": "AWS::Partition"
              },
              ":cloudwatch:us-west-2:945593679341:alarm/availabilty"
            ]
          ]

Environment

  • CLI Version : aws-cli/2.0.46 Python/3.7.4 Darwin/19.6.0 exe/x86_64
  • Framework Version: monocdk 1.69.0
  • Node.js Version: 12.9.1
  • OS : macOS 10.15.7
  • Language (Version): JavaScript 2020

Other


This is 🐛 Bug Report

@Khufu-I Khufu-I added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 29, 2020
@github-actions github-actions bot added the @aws-cdk/aws-cloudwatch Related to Amazon CloudWatch label Oct 29, 2020
@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Nov 2, 2020
@mergify mergify bot closed this as completed in #11186 Nov 9, 2020
mergify bot pushed a commit that referenced this issue Nov 9, 2020
CompositeAlarm ARN separator should be `:` instead of `/`

Fixes #11184

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented Nov 9, 2020

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-cloudwatch Related to Amazon CloudWatch bug This issue is a bug. in-progress This issue is being actively worked on. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants