Skip to content

Commit 372b677

Browse files
authored
fix: add stack name to exportNames in StacLoader (#162)
1 parent 49b9dd7 commit 372b677

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/stac-loader/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
aws_logs as logs,
99
Duration,
1010
CfnOutput,
11+
Stack,
1112
} from "aws-cdk-lib";
1213
import { Construct } from "constructs";
1314
import { PgStacDatabase } from "../database";
@@ -451,28 +452,29 @@ export class StacLoader extends Construct {
451452
);
452453

453454
// Create outputs
455+
const exportPrefix = Stack.of(this).stackName;
454456
new CfnOutput(this, "TopicArn", {
455457
value: this.topic.topicArn,
456458
description: "ARN of the StacLoader SNS Topic",
457-
exportName: "stac-loader-topic-arn",
459+
exportName: `${exportPrefix}-stac-loader-topic-arn`,
458460
});
459461

460462
new CfnOutput(this, "QueueUrl", {
461463
value: this.queue.queueUrl,
462464
description: "URL of the StacLoader SQS Queue",
463-
exportName: "stac-loader-queue-url",
465+
exportName: `${exportPrefix}-stac-loader-queue-url`,
464466
});
465467

466468
new CfnOutput(this, "DeadLetterQueueUrl", {
467469
value: this.deadLetterQueue.queueUrl,
468470
description: "URL of the StacLoader Dead Letter Queue",
469-
exportName: "stac-loader-deadletter-queue-url",
471+
exportName: `${exportPrefix}-stac-loader-deadletter-queue-url`,
470472
});
471473

472474
new CfnOutput(this, "FunctionName", {
473475
value: this.lambdaFunction.functionName,
474476
description: "Name of the StacLoader Lambda Function",
475-
exportName: "stac-loader-function-name",
477+
exportName: `${exportPrefix}-stac-loader-function-name`,
476478
});
477479
}
478480
}

0 commit comments

Comments
 (0)