Skip to content

Commit 9328bce

Browse files
committed
fix(lunchbot): added tags to lex
1 parent f08b519 commit 9328bce

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

src/main.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export class LunchBotStack extends Stack {
1717
props: Readonly<StackProps> = {},
1818
) {
1919
super(scope, id, props)
20+
const stack = Stack.of(this)
2021
const lexBotRole = new iam.Role(this, 'LexBotRole', {
2122
assumedBy: new iam.ServicePrincipal('lexv2.amazonaws.com'),
2223
inlinePolicies: {
@@ -59,6 +60,16 @@ export class LunchBotStack extends Stack {
5960
roleArn: lexBotRole.roleArn,
6061
autoBuildBotLocales: true,
6162
botLocales,
63+
botTags: [
64+
{
65+
key: 'AppManagerCFNStackKey',
66+
value: stack.stackName,
67+
},
68+
{
69+
key: 'Environment',
70+
value: 'dev',
71+
},
72+
],
6273
testBotAliasSettings: {
6374
botAliasLocaleSettings: [
6475
{
@@ -112,7 +123,6 @@ export class LunchBotStack extends Stack {
112123
principal: new iam.ServicePrincipal('lexv2.amazonaws.com'),
113124
sourceArn: `arn:aws:lex:${Stack.of(this).region}:${Stack.of(this).account}:bot-alias/${lunchBot.attrId}/*`,
114125
})
115-
const stack = Stack.of(this)
116126
Tags.of(this).add('AppManagerCFNStackKey', stack.stackName)
117127
Tags.of(this).add('Environment', 'dev')
118128
// const eventLambda = new nodejs.NodejsFunction(this, 'events', {

test/__snapshots__/main.test.ts.snap

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)