Skip to content

Commit

Permalink
feat(cdk): add getRemoteSecretValue
Browse files Browse the repository at this point in the history
  • Loading branch information
shellscape committed Jan 8, 2025
1 parent 0f25e2c commit db91058
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/cdk/src/methods/secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ export const addSecret = (options: AddSecretOptions) => {
return { secret };
};

export const getRemoteSecretValue = (secretName: string, scope: DotStack) => {
const secret = Secret.fromSecretNameV2(scope, `${+new Date()}-${secretName}`, secretName);
return secret.secretValue.toString();
};

export const grantRemoteSecret = ({
consumers,
secretName,
Expand Down

0 comments on commit db91058

Please sign in to comment.