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

fix(aws-elasticloadbalancingv2): target group metrics #1226

Merged
merged 2 commits into from
Nov 21, 2018

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Nov 21, 2018

TargetGroup metrics used to use ${TargetGroup.LoadBalancerArns} to find
the load balancer's full name, but that introduces a deployment-time
ordering dependency on the creation of the Listener object.

Instead, use the Listener ARN to get the load balancer name. We
now have an ordering requirement in the CDK code but that can be
detected early and solved by the user.

Fixes #1213.

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

TargetGroup metrics used to use ${TargetGroup.LoadBalancerArns} to find
the load balancer's full name, but that introduces a deployment-time
ordering dependency on the creation of the Listener object.

Instead, use the Listener ARN to get the load balancer name. We
now have an ordering requirement in the CDK code but that can be
detected early and solved by the user.

Fixes #1213.
@@ -365,3 +360,9 @@ export interface LoadBalancerTargetProps {
*/
targetJson?: any;
}

export function loadBalancerNameFromListenerArn(listenerArn: string) {
// arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2
Copy link
Contributor

Choose a reason for hiding this comment

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

Would prefer this to be part of the function JSDoc as an example, and I think it'd be nice to have the corresponding output, too (aka what part are we extracting in fact).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair

@rix0rrr rix0rrr merged commit de488df into master Nov 21, 2018
@rix0rrr rix0rrr deleted the huijers/elbv2-metrics-lb-arn branch November 21, 2018 10:39
@NGL321 NGL321 added the contribution/core This is a PR that came from AWS. label Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cloudwatch alarms: how to add alarm dependency?
3 participants