Skip to content

Commit 1b0c145

Browse files
committed
Fix security group rule and add custom resource property
- Fix security group rule direction for setup function (allowDefaultPortFrom instead of allowDefaultPortTo) - Add test property to custom resource to force update on deployment
1 parent 12ac58d commit 1b0c145

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

typescript/postgres-lambda/lib/postgres-lambda-stack.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export class PostgresLambdaStack extends cdk.Stack {
134134
});
135135

136136
// Grant setup function access to the DB and secrets
137-
dbCluster.connections.allowDefaultPortTo(setupFunction);
137+
dbCluster.connections.allowDefaultPortFrom(setupFunction);
138138
dbCluster.secret?.grantRead(setupFunction);
139139

140140
// Create custom resource to trigger setup
@@ -144,6 +144,9 @@ export class PostgresLambdaStack extends cdk.Stack {
144144

145145
new cdk.CustomResource(this, 'PostgresSetupResource', {
146146
serviceToken: setupProvider.serviceToken,
147+
properties: {
148+
test: 'yo'
149+
},
147150
});
148151

149152
// Output the database endpoint and secret ARN

0 commit comments

Comments
 (0)