@openhi/constructs 0.0.119 → 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 +20 -0
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +21 -1
- package/lib/index.mjs.map +1 -1
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -1698,6 +1698,17 @@ var DataStoreHistoricalArchive = class extends import_constructs4.Construct {
|
|
|
1698
1698
|
autoDeleteObjects: props.removalPolicy === import_aws_cdk_lib6.RemovalPolicy.DESTROY,
|
|
1699
1699
|
versioned: false
|
|
1700
1700
|
}) : void 0;
|
|
1701
|
+
if (putEventsFailureDlqBucket) {
|
|
1702
|
+
const appName = OpenHiService.of(this).appName;
|
|
1703
|
+
import_aws_cdk_lib6.Tags.of(putEventsFailureDlqBucket).add(
|
|
1704
|
+
openHiTagKey(appName, "resource-role"),
|
|
1705
|
+
"dead-letter-queue"
|
|
1706
|
+
);
|
|
1707
|
+
import_aws_cdk_lib6.Tags.of(putEventsFailureDlqBucket).add(
|
|
1708
|
+
openHiTagKey(appName, "pipeline"),
|
|
1709
|
+
"data-replication"
|
|
1710
|
+
);
|
|
1711
|
+
}
|
|
1701
1712
|
this.putEventsFailureDlqBucket = putEventsFailureDlqBucket;
|
|
1702
1713
|
this.transformFunction = new import_aws_lambda_nodejs4.NodejsFunction(this, "FirehoseTransform", {
|
|
1703
1714
|
entry: resolveHandlerEntry4(__dirname),
|
|
@@ -2178,6 +2189,7 @@ var DataStorePostgresReplica = class extends import_constructs6.Construct {
|
|
|
2178
2189
|
this.databaseName = props.databaseName ?? DEFAULT_DATABASE_NAME;
|
|
2179
2190
|
this.schemaName = getPostgresReplicaSchemaName(props.branchHash);
|
|
2180
2191
|
const region = import_aws_cdk_lib9.Stack.of(this).region;
|
|
2192
|
+
const ownsVpc = props.vpc === void 0;
|
|
2181
2193
|
this.vpc = props.vpc ?? new ec2.Vpc(this, "Vpc", {
|
|
2182
2194
|
availabilityZones: [`${region}a`, `${region}b`],
|
|
2183
2195
|
natGateways: 0,
|
|
@@ -2189,6 +2201,14 @@ var DataStorePostgresReplica = class extends import_constructs6.Construct {
|
|
|
2189
2201
|
}
|
|
2190
2202
|
]
|
|
2191
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
|
+
}
|
|
2192
2212
|
this.cluster = new rds.DatabaseCluster(this, "Cluster", {
|
|
2193
2213
|
clusterIdentifier: `openhi-dstore-pg-${props.stackHash}`,
|
|
2194
2214
|
engine: rds.DatabaseClusterEngine.auroraPostgres({
|