@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.mjs CHANGED
@@ -814,7 +814,7 @@ var PreTokenGenerationLambda = class extends Construct3 {
814
814
  // src/components/dynamodb/data-store-historical-archive.ts
815
815
  import fs4 from "fs";
816
816
  import path4 from "path";
817
- import { Duration, RemovalPolicy as RemovalPolicy2, Size } from "aws-cdk-lib";
817
+ import { Duration, RemovalPolicy as RemovalPolicy2, Size, Tags as Tags3 } from "aws-cdk-lib";
818
818
  import * as kinesisfirehose from "aws-cdk-lib/aws-kinesisfirehose";
819
819
  import { Runtime as Runtime4 } from "aws-cdk-lib/aws-lambda";
820
820
  import { NodejsFunction as NodejsFunction4 } from "aws-cdk-lib/aws-lambda-nodejs";
@@ -847,6 +847,17 @@ var DataStoreHistoricalArchive = class extends Construct4 {
847
847
  autoDeleteObjects: props.removalPolicy === RemovalPolicy2.DESTROY,
848
848
  versioned: false
849
849
  }) : void 0;
850
+ if (putEventsFailureDlqBucket) {
851
+ const appName = OpenHiService.of(this).appName;
852
+ Tags3.of(putEventsFailureDlqBucket).add(
853
+ openHiTagKey(appName, "resource-role"),
854
+ "dead-letter-queue"
855
+ );
856
+ Tags3.of(putEventsFailureDlqBucket).add(
857
+ openHiTagKey(appName, "pipeline"),
858
+ "data-replication"
859
+ );
860
+ }
850
861
  this.putEventsFailureDlqBucket = putEventsFailureDlqBucket;
851
862
  this.transformFunction = new NodejsFunction4(this, "FirehoseTransform", {
852
863
  entry: resolveHandlerEntry4(__dirname),
@@ -1332,6 +1343,7 @@ var DataStorePostgresReplica = class extends Construct6 {
1332
1343
  this.databaseName = props.databaseName ?? DEFAULT_DATABASE_NAME;
1333
1344
  this.schemaName = getPostgresReplicaSchemaName(props.branchHash);
1334
1345
  const region = Stack3.of(this).region;
1346
+ const ownsVpc = props.vpc === void 0;
1335
1347
  this.vpc = props.vpc ?? new ec2.Vpc(this, "Vpc", {
1336
1348
  availabilityZones: [`${region}a`, `${region}b`],
1337
1349
  natGateways: 0,
@@ -1343,6 +1355,14 @@ var DataStorePostgresReplica = class extends Construct6 {
1343
1355
  }
1344
1356
  ]
1345
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
+ }
1346
1366
  this.cluster = new rds.DatabaseCluster(this, "Cluster", {
1347
1367
  clusterIdentifier: `openhi-dstore-pg-${props.stackHash}`,
1348
1368
  engine: rds.DatabaseClusterEngine.auroraPostgres({