-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(core): add methods to SecretValue and aws-secretsmanager Secret to obtain a literal (unresolved by CloudFormation) dynamic reference key (#34397) #35105
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
Conversation
83c4775 to
fb7abb6
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
…to obtain a literal (unresolved by CloudFormation) dynamic reference key
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.
(This review is outdated)
8a2b1a7 to
c76a380
Compare
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Abogical
left a comment
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). |
|
This pull request has been removed from the queue for the following reason: The pull request can't be updated
You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. |
|
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). |
|
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). |
|
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). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #34397
Reason for this change
Dynamic references allow an AWS Secrets Manager Secret to be retrieved for use in another AWS CloudFormation resource. Currently the key strings for dynamic references must be created using string manipulation, eg
Description of changes
The existing static secretsManager function in
aws-cdk-lib/coreincludes code to generate a dynamic reference key string. This code was therefore extracted into a new staticcfnDynamicReferenceKeyfunction to make it available outside thesecretsManagerfunction. Using this new static function the above code example becomesA new instance method
cfnDynamicReferenceKeywas also created in the Secret class inaws-cdk-lib/aws-secretsmanager, which calls the new staticcfnDynamicReferenceKeyfunction for the secret that it represents. Using this new instance method the above example becomesDescription of how you validated changes
Unit tests and an integration test.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license