-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(secretsmanager): secretName for owned secrets includes suffix (un…
…der feature flag) (#11736) Proper (tokenized) secret names for owned secrets was introduced in #11202. This caused `Secret.secretName` to return the full resource name (secret name + suffix) for owned secrets. This was done to ensure that the secretName was a Tokenized value that would create a dependency between the Secret and its consumer. However, Secrets Manager's DescribeSecret API does not accept the resourceName as an input; it accepts the full ARN, a partial ARN (without the suffix), or the secret name (without the suffix). This leads to several integrations with other services or custom scripts to fail when using the secretName from an owned Secret. For owned secrets, we can parse the resourceName to get the secretName based on either (a) knowing the secret name or (b) knowing the format that CloudFormation uses when secret names aren't specified. This fix introduces proper parsing of secret names for owned secrets (behind a feature flag). BREAKING CHANGE: (feature flag) Secret.secretName for owned secrets will now only the secret name (without suffix) and not the full resource name. This is enabled through the `@aws-cdk/secretsmanager:parseOwnedSecretName` flag. fixes #11727 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
8 changed files
with
619 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.