Skip to content

Commit

Permalink
sst.aws.Postgres: do not assign empty permission if secrets manager s…
Browse files Browse the repository at this point in the history
…ecret is disabled
  • Loading branch information
thdxr committed Sep 2, 2024
1 parent 71c7774 commit 4c0708e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion platform/src/components/aws/postgres.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,11 @@ export class Postgres extends Component implements Link.Linkable {
include: [
permission({
actions: ["secretsmanager:GetSecretValue"],
resources: [this.cluster.masterUserSecrets[0].secretArn],
resources: [
this.cluster.masterUserSecrets[0].secretArn.apply(
(v) => v ?? "arn:aws:iam::rdsdoesnotusesecretmanager",
),
],
}),
permission({
actions: [
Expand Down

0 comments on commit 4c0708e

Please sign in to comment.