Skip to content

Commit

Permalink
feat(deploy): add ability to specify Secrets Manager policies separat…
Browse files Browse the repository at this point in the history
…e to copying local keys
  • Loading branch information
mmalenic committed Oct 21, 2024
1 parent 4b8c189 commit d63692a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions deploy/lib/htsget-lambda-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,7 @@ export class HtsgetLambdaStack extends Stack {
removalPolicy: RemovalPolicy.RETAIN,
});

s3BucketPolicy.addResources(private_key.secretArn, public_key.secretArn);
}

if (secretPolicy.resources.length !== 0) {
lambdaRole.addToPolicy(secretPolicy);
secretPolicy.addResources(private_key.secretArn, public_key.secretArn);
}

lambdaRole.addManagedPolicy(
Expand All @@ -272,6 +268,9 @@ export class HtsgetLambdaStack extends Stack {
if (s3BucketPolicy.resources.length !== 0) {
lambdaRole.addToPolicy(s3BucketPolicy);
}
if (secretPolicy.resources.length !== 0) {
lambdaRole.addToPolicy(secretPolicy);
}

let features = settings.features ?? [];
features = features
Expand Down

0 comments on commit d63692a

Please sign in to comment.