-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
chore(kms): prefer new aliasArn
to keyArn
for getting arn of an alias
#28197
chore(kms): prefer new aliasArn
to keyArn
for getting arn of an alias
#28197
Conversation
…N into the alias L2 construct
…precate-keyarn-add-aliasarn
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 has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
@rafaelrcamargo Thanks for opening up a pull request! I think it's good to add the deprecation warning. |
@daschaa for sure, makes sense. Are there any |
@rafaelrcamargo You can use |
…precate-keyarn-add-aliasarn
Awesome, followed the current implementation in the L2 construct.
If there's anything else I can help with, let me know |
Thanks for the contribution. Looks good to me, so a maintainer can have a look :) Can you add an exemption request for the integration test? Just add a comment with "Exemption request" and the reason why an integration test (and change to the README file) is not needed here. |
Exemption request: Integration test and README update not necessary for this PR. No new features have been introduced; the modification solely involves an existing property, which is already well-documented and thoroughly tested with relevant tests. |
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.
Looks good, one nit and should be good to go.
I do not think this needs either integ tests or a readme update.
aliasArn
to keyArn
for getting arn of an alias
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
…precate-keyarn-add-aliasarn
Pull request has been modified.
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.
Thanks!
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). |
…lias (aws#28197) **Motivation:** The current implementation of `keyArn` within the AWS CDK AWS KMS module returns the Key ARN for a key and an alias, which causes confusion for users expecting the Alias ARN. This PR aims to alleviate this confusion by providing clearer access to the Alias ARN. **Changes:** Introducing a new attribute `aliasArn` that mirrors the value from `keyArn` specifically for aliases to explicitly retrieve the Alias ARN. ```typescript /** * The ARN of the alias. * * @Attribute * @deprecated use `aliasArn` instead */ public get keyArn(): string { return Stack.of(this).formatArn({ service: 'kms', // aliasName already contains the '/' resource: this.aliasName, }); } /** * The ARN of the alias. * * @Attribute */ public get aliasArn(): string { return this.keyArn; } ``` **Query:** Should we deprecate the existing `keyArn` and mirror it in `aliasArn` or change the logic within `keyArn` to `aliasArn` and use the `keyArn` as the mirror? > Your feedback on the preferred approach would be greatly appreciated! Closes aws#28105. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Motivation:
The current implementation of
keyArn
within the AWS CDK AWS KMS module returns the Key ARN for a key and an alias, which causes confusion for users expecting the Alias ARN. This PR aims to alleviate this confusion by providing clearer access to the Alias ARN.Changes:
Introducing a new attribute
aliasArn
that mirrors the value fromkeyArn
specifically for aliases to explicitly retrieve the Alias ARN.Query:
Should we deprecate the existing
keyArn
and mirror it inaliasArn
or change the logic withinkeyArn
toaliasArn
and use thekeyArn
as the mirror?Closes #28105.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license