@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 CHANGED
@@ -2189,6 +2189,7 @@ var DataStorePostgresReplica = class extends import_constructs6.Construct {
2189
2189
  this.databaseName = props.databaseName ?? DEFAULT_DATABASE_NAME;
2190
2190
  this.schemaName = getPostgresReplicaSchemaName(props.branchHash);
2191
2191
  const region = import_aws_cdk_lib9.Stack.of(this).region;
2192
+ const ownsVpc = props.vpc === void 0;
2192
2193
  this.vpc = props.vpc ?? new ec2.Vpc(this, "Vpc", {
2193
2194
  availabilityZones: [`${region}a`, `${region}b`],
2194
2195
  natGateways: 0,
@@ -2200,6 +2201,14 @@ var DataStorePostgresReplica = class extends import_constructs6.Construct {
2200
2201
  }
2201
2202
  ]
2202
2203
  });
2204
+ if (ownsVpc) {
2205
+ new ec2.InterfaceVpcEndpoint(this, "SecretsManagerEndpoint", {
2206
+ vpc: this.vpc,
2207
+ service: ec2.InterfaceVpcEndpointAwsService.SECRETS_MANAGER,
2208
+ subnets: { subnetType: ec2.SubnetType.PRIVATE_ISOLATED },
2209
+ privateDnsEnabled: true
2210
+ });
2211
+ }
2203
2212
  this.cluster = new rds.DatabaseCluster(this, "Cluster", {
2204
2213
  clusterIdentifier: `openhi-dstore-pg-${props.stackHash}`,
2205
2214
  engine: rds.DatabaseClusterEngine.auroraPostgres({