Skip to content

Commit

Permalink
Merge branch 'main' of github.com:aws/aws-cdk into feat/repo-restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
MrArnoldPalmer committed Mar 30, 2023
2 parents e85b556 + 0f56583 commit bf7d4f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/@aws-cdk/aws-secretsmanager/lib/secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,10 @@ export class Secret extends SecretBase {
* Imports a secret by secret name.
* A secret with this name must exist in the same account & region.
* Replaces the deprecated `fromSecretName`.
* Please note this method returns ISecret that only contains partial ARN and could lead to AccessDeniedException
* when you pass the partial ARN to CLI or SDK to get the secret value. If your secret name ends with a hyphen and
* 6 characters, you should always use fromSecretCompleteArn() to avoid potential AccessDeniedException.
* @see https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen
*/
public static fromSecretNameV2(scope: Construct, id: string, secretName: string): ISecret {
return new class extends SecretBase {
Expand Down

0 comments on commit bf7d4f7

Please sign in to comment.