@openhi/constructs 0.0.120 → 0.0.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +9 -0
- package/lib/index.mjs.map +1 -1
- package/package.json +3 -3
package/lib/index.mjs
CHANGED
|
@@ -1343,6 +1343,7 @@ var DataStorePostgresReplica = class extends Construct6 {
|
|
|
1343
1343
|
this.databaseName = props.databaseName ?? DEFAULT_DATABASE_NAME;
|
|
1344
1344
|
this.schemaName = getPostgresReplicaSchemaName(props.branchHash);
|
|
1345
1345
|
const region = Stack3.of(this).region;
|
|
1346
|
+
const ownsVpc = props.vpc === void 0;
|
|
1346
1347
|
this.vpc = props.vpc ?? new ec2.Vpc(this, "Vpc", {
|
|
1347
1348
|
availabilityZones: [`${region}a`, `${region}b`],
|
|
1348
1349
|
natGateways: 0,
|
|
@@ -1354,6 +1355,14 @@ var DataStorePostgresReplica = class extends Construct6 {
|
|
|
1354
1355
|
}
|
|
1355
1356
|
]
|
|
1356
1357
|
});
|
|
1358
|
+
if (ownsVpc) {
|
|
1359
|
+
new ec2.InterfaceVpcEndpoint(this, "SecretsManagerEndpoint", {
|
|
1360
|
+
vpc: this.vpc,
|
|
1361
|
+
service: ec2.InterfaceVpcEndpointAwsService.SECRETS_MANAGER,
|
|
1362
|
+
subnets: { subnetType: ec2.SubnetType.PRIVATE_ISOLATED },
|
|
1363
|
+
privateDnsEnabled: true
|
|
1364
|
+
});
|
|
1365
|
+
}
|
|
1357
1366
|
this.cluster = new rds.DatabaseCluster(this, "Cluster", {
|
|
1358
1367
|
clusterIdentifier: `openhi-dstore-pg-${props.stackHash}`,
|
|
1359
1368
|
engine: rds.DatabaseClusterEngine.auroraPostgres({
|