-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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(elbv2): Use correct format for parsing imported target group ARNs #22153
Conversation
FYI - Ignore the PR Linter right now. |
@Mergifyio update |
✅ Branch has been successfully updated |
@Mergifyio update |
✅ Branch has been successfully updated |
Pull request has been modified.
@Mergifyio update |
✅ Branch has been successfully updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Pull Request Linter fails with the following errors:
❌ Fixes must contain a change to an integration test file and the resulting snapshot.
❌ The title of this pull request does not follow the Conventional Commits format, see https://www.conventionalcommits.org/.
PRs must pass status checks before we can provide a meaningful review.
Pull Request updated. Dissmissing previous PRLinter Review.
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…aws#22153) Currently, the following CDK snippet results in outputting the target group ID, not the target group name. ```typescript const importedTgArn = cdk.Fn.importValue('ImportTargetGroupArn'); const importedTg = elbv2.ApplicationTargetGroup.fromTargetGroupAttributes(stack, 'ImportedTg', { targetGroupArn: importedTgArn, }); new cdk.CfnOutput(stack, 'TargetGroupOutput', { value: importedTg.targetGroupName, }); ``` For example, for a sample target group ARN: ``` arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/MyTargetGroupName/6a58f7d61e2151d4 ``` The stack above will output `6a58f7d61e2151d4` instead of the desired `MyTargetGroupName`. This change fixes the ARN format used for parsing the imported ARN value. It does not impact any existing CDK code passing a raw ARN string (as confirmed by existing unit tests), only CDK code trying to pass tokens such as import values. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Currently, the following CDK snippet results in outputting the target group ID, not the target group name.
For example, for a sample target group ARN:
The stack above will output
6a58f7d61e2151d4
instead of the desiredMyTargetGroupName
.This change fixes the ARN format used for parsing the imported ARN value. It does not impact any existing CDK code passing a raw ARN string (as confirmed by existing unit tests), only CDK code trying to pass tokens such as import values.
All Submissions:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license