Skip to content

Commit 5f5d88b

Browse files
authored
fix: add unique prefix to stactools-item-generator export names (#164)
1 parent 0e7c816 commit 5f5d88b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/stactools-item-generator/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 { Platform } from "aws-cdk-lib/aws-ecr-assets";
@@ -351,28 +352,29 @@ export class StactoolsItemGenerator extends Construct {
351352
// The consuming construct should handle this permission
352353

353354
// Create outputs
355+
const exportPrefix = Stack.of(this).stackName;
354356
new CfnOutput(this, "TopicArn", {
355357
value: this.topic.topicArn,
356358
description: "ARN of the StactoolsItemGenerator SNS Topic",
357-
exportName: "stactools-item-generator-topic-arn",
359+
exportName: `${exportPrefix}-stactools-item-generator-topic-arn`,
358360
});
359361

360362
new CfnOutput(this, "QueueUrl", {
361363
value: this.queue.queueUrl,
362364
description: "URL of the StactoolsItemGenerator SQS Queue",
363-
exportName: "stactools-item-generator-queue-url",
365+
exportName: `${exportPrefix}-stactools-item-generator-queue-url`,
364366
});
365367

366368
new CfnOutput(this, "DeadLetterQueueUrl", {
367369
value: this.deadLetterQueue.queueUrl,
368370
description: "URL of the StactoolsItemGenerator Dead Letter Queue",
369-
exportName: "stactools-item-generator-deadletter-queue-url",
371+
exportName: `${exportPrefix}-stactools-item-generator-deadletter-queue-url`,
370372
});
371373

372374
new CfnOutput(this, "FunctionName", {
373375
value: this.lambdaFunction.functionName,
374376
description: "Name of the StactoolsItemGenerator Lambda Function",
375-
exportName: "stactools-item-generator-function-name",
377+
exportName: `${exportPrefix}-stactools-item-generator-function-name`,
376378
});
377379
}
378380
}

0 commit comments

Comments
 (0)