@gradientedge/cdk-utils 9.10.0 → 9.11.0
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/dist/src/lib/aws/common/construct.d.ts +3 -8
- package/dist/src/lib/aws/common/construct.js +3 -14
- package/dist/src/lib/aws/common/resource-name-formatter.d.ts +13 -0
- package/dist/src/lib/aws/common/resource-name-formatter.js +26 -0
- package/dist/src/lib/aws/construct/api-to-any-target/main.js +1 -1
- package/dist/src/lib/aws/construct/api-to-eventbridge-target/main.js +7 -6
- package/dist/src/lib/aws/construct/api-to-eventbridge-target-with-sns/main.js +2 -2
- package/dist/src/lib/aws/construct/api-to-lambda-target/main.js +2 -2
- package/dist/src/lib/aws/construct/application-configuration/main.js +1 -1
- package/dist/src/lib/aws/construct/lambda-with-iam-access/main.js +3 -3
- package/dist/src/lib/aws/construct/site-with-ecs-backend/main.js +7 -7
- package/dist/src/lib/aws/construct/site-with-lambda-backend/main.js +3 -3
- package/dist/src/lib/aws/services/api-gateway/main.js +1 -1
- package/dist/src/lib/aws/services/appconfig/main.js +2 -2
- package/dist/src/lib/aws/services/cloudfront/main.js +2 -2
- package/dist/src/lib/aws/services/cloudtrail/main.js +1 -1
- package/dist/src/lib/aws/services/dynamodb/main.js +1 -1
- package/dist/src/lib/aws/services/elastic-container-service/main.js +2 -2
- package/dist/src/lib/aws/services/elastic-file-system/main.js +1 -1
- package/dist/src/lib/aws/services/elastic-kubernetes-service/main.js +1 -1
- package/dist/src/lib/aws/services/elasticache/main.js +1 -1
- package/dist/src/lib/aws/services/eventbridge/main.js +13 -9
- package/dist/src/lib/aws/services/evidently/main.js +4 -4
- package/dist/src/lib/aws/services/identity-access-management/main.js +10 -10
- package/dist/src/lib/aws/services/lambda/main.js +2 -2
- package/dist/src/lib/aws/services/secrets-manager/main.js +1 -1
- package/dist/src/lib/aws/services/simple-notification-service/main.js +4 -4
- package/dist/src/lib/aws/services/simple-queue-service/main.js +1 -1
- package/dist/src/lib/aws/services/simple-storage-service/main.js +1 -1
- package/dist/src/lib/aws/services/step-function/main.js +1 -1
- package/dist/src/lib/aws/services/virtual-private-cloud/main.js +3 -3
- package/dist/src/lib/aws/services/web-application-firewall/main.js +2 -2
- package/package.json +2 -2
- package/src/lib/aws/common/construct.ts +4 -16
- package/src/lib/aws/common/resource-name-formatter.ts +26 -0
- package/src/lib/aws/construct/api-to-any-target/main.ts +1 -1
- package/src/lib/aws/construct/api-to-eventbridge-target/main.ts +7 -6
- package/src/lib/aws/construct/api-to-eventbridge-target-with-sns/main.ts +2 -2
- package/src/lib/aws/construct/api-to-lambda-target/main.ts +2 -2
- package/src/lib/aws/construct/application-configuration/main.ts +1 -1
- package/src/lib/aws/construct/lambda-with-iam-access/main.ts +3 -3
- package/src/lib/aws/construct/site-with-ecs-backend/main.ts +9 -7
- package/src/lib/aws/construct/site-with-lambda-backend/main.ts +5 -3
- package/src/lib/aws/services/api-gateway/main.ts +1 -1
- package/src/lib/aws/services/appconfig/main.ts +2 -2
- package/src/lib/aws/services/cloudfront/main.ts +2 -2
- package/src/lib/aws/services/cloudtrail/main.ts +1 -1
- package/src/lib/aws/services/dynamodb/main.ts +1 -1
- package/src/lib/aws/services/elastic-container-service/main.ts +2 -2
- package/src/lib/aws/services/elastic-file-system/main.ts +1 -1
- package/src/lib/aws/services/elastic-kubernetes-service/main.ts +1 -1
- package/src/lib/aws/services/elasticache/main.ts +1 -1
- package/src/lib/aws/services/eventbridge/main.ts +13 -9
- package/src/lib/aws/services/evidently/main.ts +4 -4
- package/src/lib/aws/services/identity-access-management/main.ts +10 -10
- package/src/lib/aws/services/lambda/main.ts +2 -2
- package/src/lib/aws/services/secrets-manager/main.ts +1 -1
- package/src/lib/aws/services/simple-notification-service/main.ts +4 -4
- package/src/lib/aws/services/simple-queue-service/main.ts +1 -1
- package/src/lib/aws/services/simple-storage-service/main.ts +1 -1
- package/src/lib/aws/services/step-function/main.ts +1 -1
- package/src/lib/aws/services/virtual-private-cloud/main.ts +3 -3
- package/src/lib/aws/services/web-application-firewall/main.ts +2 -2
|
@@ -45,9 +45,13 @@ export class EventManager {
|
|
|
45
45
|
if (!props) throw `EventBus props undefined for ${id}`
|
|
46
46
|
if (!props.eventBusName) throw `EventBus eventBusName undefined for ${id}`
|
|
47
47
|
|
|
48
|
+
let eventBusName = props.eventBusName
|
|
49
|
+
if (eventBusName && eventBusName != 'default') {
|
|
50
|
+
eventBusName = scope.resourceNameFormatter.format(props.eventBusName, props.resourceNameOptions)
|
|
51
|
+
}
|
|
48
52
|
const eventBus = new EventBus(scope, `${id}`, {
|
|
49
53
|
...props,
|
|
50
|
-
eventBusName
|
|
54
|
+
eventBusName,
|
|
51
55
|
})
|
|
52
56
|
|
|
53
57
|
createCfnOutput(`${id}-eventBusName`, scope, `${props.eventBusName}-${scope.props.stage}`)
|
|
@@ -77,7 +81,7 @@ export class EventManager {
|
|
|
77
81
|
const rule = new Rule(scope, `${id}`, {
|
|
78
82
|
...props,
|
|
79
83
|
eventBus,
|
|
80
|
-
ruleName: scope.resourceNameFormatter(props.ruleName, props.resourceNameOptions),
|
|
84
|
+
ruleName: scope.resourceNameFormatter.format(props.ruleName, props.resourceNameOptions),
|
|
81
85
|
})
|
|
82
86
|
|
|
83
87
|
if (targets && !_.isEmpty(targets)) {
|
|
@@ -125,12 +129,12 @@ export class EventManager {
|
|
|
125
129
|
description: 'Rule to send notification to lambda function target',
|
|
126
130
|
eventBusName,
|
|
127
131
|
eventPattern,
|
|
128
|
-
name: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
132
|
+
name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
129
133
|
scheduleExpression,
|
|
130
134
|
targets: [
|
|
131
135
|
{
|
|
132
136
|
arn: lambdaFunction.functionArn,
|
|
133
|
-
id: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
137
|
+
id: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
134
138
|
input: props.input ?? undefined,
|
|
135
139
|
},
|
|
136
140
|
],
|
|
@@ -183,7 +187,7 @@ export class EventManager {
|
|
|
183
187
|
...props,
|
|
184
188
|
description: 'Rule to send notification on new objects in data bucket to ecs task target',
|
|
185
189
|
eventPattern,
|
|
186
|
-
name: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
190
|
+
name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
187
191
|
targets: [
|
|
188
192
|
{
|
|
189
193
|
arn: cluster.clusterArn,
|
|
@@ -195,7 +199,7 @@ export class EventManager {
|
|
|
195
199
|
taskCount: 1,
|
|
196
200
|
taskDefinitionArn: task.taskDefinitionArn,
|
|
197
201
|
},
|
|
198
|
-
id: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
202
|
+
id: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
199
203
|
roleArn: role instanceof Role ? role.roleArn : role.attrArn,
|
|
200
204
|
},
|
|
201
205
|
],
|
|
@@ -234,7 +238,7 @@ export class EventManager {
|
|
|
234
238
|
|
|
235
239
|
const pipe = new CfnPipe(scope, `${id}`, {
|
|
236
240
|
...props,
|
|
237
|
-
name: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
241
|
+
name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
238
242
|
roleArn: pipeRole.roleArn,
|
|
239
243
|
source: sourceQueue.queueArn,
|
|
240
244
|
sourceParameters: {
|
|
@@ -294,7 +298,7 @@ export class EventManager {
|
|
|
294
298
|
|
|
295
299
|
const pipe = new CfnPipe(scope, `${id}`, {
|
|
296
300
|
...props,
|
|
297
|
-
name: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
301
|
+
name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
298
302
|
roleArn: pipeRole.roleArn,
|
|
299
303
|
source: sourceQueue.queueArn,
|
|
300
304
|
sourceParameters: {
|
|
@@ -351,7 +355,7 @@ export class EventManager {
|
|
|
351
355
|
|
|
352
356
|
const pipe = new CfnPipe(scope, `${id}`, {
|
|
353
357
|
...props,
|
|
354
|
-
name: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
358
|
+
name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
355
359
|
roleArn: pipeRole.roleArn,
|
|
356
360
|
source: sourceDynamoDbStreamArn,
|
|
357
361
|
sourceParameters: {
|
|
@@ -39,7 +39,7 @@ export class EvidentlyManager {
|
|
|
39
39
|
const project = new CfnProject(scope, `${id}`, {
|
|
40
40
|
...props,
|
|
41
41
|
description: `${props.description} ${scope.props.stage}`,
|
|
42
|
-
name: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
42
|
+
name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
43
43
|
})
|
|
44
44
|
createCfnOutput(`${id}-projectArn`, scope, project.attrArn)
|
|
45
45
|
createCfnOutput(`${id}-projectName`, scope, project.name)
|
|
@@ -74,7 +74,7 @@ export class EvidentlyManager {
|
|
|
74
74
|
const launch = new CfnLaunch(scope, `${id}`, {
|
|
75
75
|
...props,
|
|
76
76
|
description: `${props.description} ${scope.props.stage}`,
|
|
77
|
-
name: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
77
|
+
name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
78
78
|
})
|
|
79
79
|
createCfnOutput(`${id}-launchArn`, scope, launch.attrArn)
|
|
80
80
|
createCfnOutput(`${id}-launchName`, scope, launch.name)
|
|
@@ -94,7 +94,7 @@ export class EvidentlyManager {
|
|
|
94
94
|
const experiment = new CfnExperiment(scope, `${id}`, {
|
|
95
95
|
...props,
|
|
96
96
|
description: `${props.description} ${scope.props.stage}`,
|
|
97
|
-
name: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
97
|
+
name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
98
98
|
})
|
|
99
99
|
createCfnOutput(`${id}-experimentArn`, scope, experiment.attrArn)
|
|
100
100
|
createCfnOutput(`${id}-experimentName`, scope, experiment.name)
|
|
@@ -114,7 +114,7 @@ export class EvidentlyManager {
|
|
|
114
114
|
const segment = new CfnSegment(scope, `${id}`, {
|
|
115
115
|
...props,
|
|
116
116
|
description: `${props.description} ${scope.props.stage}`,
|
|
117
|
-
name: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
117
|
+
name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
118
118
|
})
|
|
119
119
|
createCfnOutput(`${id}-segmentArn`, scope, segment.attrArn)
|
|
120
120
|
createCfnOutput(`${id}-segmentName`, scope, segment.name)
|
|
@@ -461,10 +461,10 @@ export class IamManager {
|
|
|
461
461
|
policies: [
|
|
462
462
|
{
|
|
463
463
|
policyDocument: policy,
|
|
464
|
-
policyName: scope.resourceNameFormatter(`${id}-policy`),
|
|
464
|
+
policyName: scope.resourceNameFormatter.format(`${id}-policy`),
|
|
465
465
|
},
|
|
466
466
|
],
|
|
467
|
-
roleName: scope.resourceNameFormatter(id),
|
|
467
|
+
roleName: scope.resourceNameFormatter.format(id),
|
|
468
468
|
})
|
|
469
469
|
|
|
470
470
|
createCfnOutput(`${id}Arn`, scope, role.attrArn)
|
|
@@ -489,7 +489,7 @@ export class IamManager {
|
|
|
489
489
|
assumedBy: new ServicePrincipal('events.amazonaws.com'),
|
|
490
490
|
description: `Role for ${id} ECS Task execution from EventBridge`,
|
|
491
491
|
inlinePolicies: { policy },
|
|
492
|
-
roleName: scope.resourceNameFormatter(id),
|
|
492
|
+
roleName: scope.resourceNameFormatter.format(id),
|
|
493
493
|
})
|
|
494
494
|
|
|
495
495
|
createCfnOutput(`${id}Arn`, scope, role.roleArn)
|
|
@@ -516,7 +516,7 @@ export class IamManager {
|
|
|
516
516
|
'arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy'
|
|
517
517
|
),
|
|
518
518
|
],
|
|
519
|
-
roleName: scope.resourceNameFormatter(id),
|
|
519
|
+
roleName: scope.resourceNameFormatter.format(id),
|
|
520
520
|
})
|
|
521
521
|
|
|
522
522
|
createCfnOutput(`${id}Arn`, scope, role.roleArn)
|
|
@@ -549,7 +549,7 @@ export class IamManager {
|
|
|
549
549
|
'arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'
|
|
550
550
|
),
|
|
551
551
|
],
|
|
552
|
-
roleName: scope.resourceNameFormatter(id),
|
|
552
|
+
roleName: scope.resourceNameFormatter.format(id),
|
|
553
553
|
})
|
|
554
554
|
|
|
555
555
|
createCfnOutput(`${id}Arn`, scope, role.roleArn)
|
|
@@ -575,7 +575,7 @@ export class IamManager {
|
|
|
575
575
|
assumedBy: servicePrincipal ?? new ServicePrincipal('appconfig.amazonaws.com'),
|
|
576
576
|
description: `Role for ${id} AppConfig Secrets`,
|
|
577
577
|
inlinePolicies: { policy },
|
|
578
|
-
roleName: scope.resourceNameFormatter(id),
|
|
578
|
+
roleName: scope.resourceNameFormatter.format(id),
|
|
579
579
|
})
|
|
580
580
|
|
|
581
581
|
createCfnOutput(`${id}Arn`, scope, role.roleArn)
|
|
@@ -608,7 +608,7 @@ export class IamManager {
|
|
|
608
608
|
'arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'
|
|
609
609
|
),
|
|
610
610
|
],
|
|
611
|
-
roleName: scope.resourceNameFormatter(id),
|
|
611
|
+
roleName: scope.resourceNameFormatter.format(id),
|
|
612
612
|
})
|
|
613
613
|
|
|
614
614
|
createCfnOutput(`${id}Arn`, scope, role.roleArn)
|
|
@@ -628,7 +628,7 @@ export class IamManager {
|
|
|
628
628
|
const role = new Role(scope, `${id}`, {
|
|
629
629
|
assumedBy: new ServicePrincipal('pipes.amazonaws.com'),
|
|
630
630
|
description: `Role for ${id} Pipe`,
|
|
631
|
-
roleName: scope.resourceNameFormatter(id),
|
|
631
|
+
roleName: scope.resourceNameFormatter.format(id),
|
|
632
632
|
})
|
|
633
633
|
|
|
634
634
|
role.addToPolicy(this.statementForPollQueue([queueArn]))
|
|
@@ -651,7 +651,7 @@ export class IamManager {
|
|
|
651
651
|
const role = new Role(scope, `${id}`, {
|
|
652
652
|
assumedBy: new ServicePrincipal('pipes.amazonaws.com'),
|
|
653
653
|
description: `Role for ${id} Pipe`,
|
|
654
|
-
roleName: scope.resourceNameFormatter(id),
|
|
654
|
+
roleName: scope.resourceNameFormatter.format(id),
|
|
655
655
|
})
|
|
656
656
|
|
|
657
657
|
role.addToPolicy(this.statementForPollQueue([queueArn]))
|
|
@@ -711,7 +711,7 @@ export class IamManager {
|
|
|
711
711
|
const role = new Role(scope, `${id}`, {
|
|
712
712
|
assumedBy: new ServicePrincipal('pipes.amazonaws.com'),
|
|
713
713
|
description: `Role for ${id} Pipe`,
|
|
714
|
-
roleName: scope.resourceNameFormatter(id),
|
|
714
|
+
roleName: scope.resourceNameFormatter.format(id),
|
|
715
715
|
})
|
|
716
716
|
|
|
717
717
|
role.addToPolicy(this.statementFordynamoDbStream([dynamoDbStreamArn]))
|
|
@@ -110,7 +110,7 @@ export class LambdaManager {
|
|
|
110
110
|
if (!props) throw `Lambda props undefined for ${id}`
|
|
111
111
|
if (!props.functionName) throw `Lambda functionName undefined for ${id}`
|
|
112
112
|
|
|
113
|
-
const functionName = scope.resourceNameFormatter(props.functionName, props.resourceNameOptions)
|
|
113
|
+
const functionName = scope.resourceNameFormatter.format(props.functionName, props.resourceNameOptions)
|
|
114
114
|
|
|
115
115
|
let deadLetterQueue
|
|
116
116
|
if (props.deadLetterQueueEnabled) {
|
|
@@ -268,7 +268,7 @@ export class LambdaManager {
|
|
|
268
268
|
if (!props) throw `Lambda props undefined for ${id}`
|
|
269
269
|
if (!props.functionName) throw `Lambda functionName undefined for ${id}`
|
|
270
270
|
|
|
271
|
-
const functionName = scope.resourceNameFormatter(props.functionName, props.resourceNameOptions)
|
|
271
|
+
const functionName = scope.resourceNameFormatter.format(props.functionName, props.resourceNameOptions)
|
|
272
272
|
|
|
273
273
|
let deadLetterQueue
|
|
274
274
|
if (props.deadLetterQueueEnabled) {
|
|
@@ -34,7 +34,7 @@ export class SecretsManager {
|
|
|
34
34
|
|
|
35
35
|
const secret = new Secret(scope, `${id}`, {
|
|
36
36
|
...props,
|
|
37
|
-
secretName: scope.resourceNameFormatter(props.secretName, props.resourceNameOptions),
|
|
37
|
+
secretName: scope.resourceNameFormatter.format(props.secretName, props.resourceNameOptions),
|
|
38
38
|
})
|
|
39
39
|
|
|
40
40
|
createCfnOutput(`${id}-secretName`, scope, secret.secretName)
|
|
@@ -41,8 +41,8 @@ export class SnsManager {
|
|
|
41
41
|
|
|
42
42
|
const topic = new Topic(scope, id, {
|
|
43
43
|
...props,
|
|
44
|
-
displayName: scope.resourceNameFormatter(props.topicName, props.resourceNameOptions),
|
|
45
|
-
topicName: scope.resourceNameFormatter(props.topicName, props.resourceNameOptions),
|
|
44
|
+
displayName: scope.resourceNameFormatter.format(props.topicName, props.resourceNameOptions),
|
|
45
|
+
topicName: scope.resourceNameFormatter.format(props.topicName, props.resourceNameOptions),
|
|
46
46
|
})
|
|
47
47
|
|
|
48
48
|
if (emails && !_.isEmpty(emails)) {
|
|
@@ -73,8 +73,8 @@ export class SnsManager {
|
|
|
73
73
|
|
|
74
74
|
const topic = new Topic(scope, id, {
|
|
75
75
|
...props,
|
|
76
|
-
displayName: scope.resourceNameFormatter(props.topicName, props.resourceNameOptions),
|
|
77
|
-
topicName: scope.resourceNameFormatter(props.topicName, props.resourceNameOptions),
|
|
76
|
+
displayName: scope.resourceNameFormatter.format(props.topicName, props.resourceNameOptions),
|
|
77
|
+
topicName: scope.resourceNameFormatter.format(props.topicName, props.resourceNameOptions),
|
|
78
78
|
})
|
|
79
79
|
|
|
80
80
|
topic.addSubscription(new LambdaSubscription(lambdaFunction))
|
|
@@ -34,7 +34,7 @@ export class SqsManager {
|
|
|
34
34
|
if (!props) throw `Queue props undefined for ${id}`
|
|
35
35
|
if (!props.queueName) throw `Queue queueName undefined for ${id}`
|
|
36
36
|
|
|
37
|
-
let queueName = scope.resourceNameFormatter(props.queueName, props.resourceNameOptions)
|
|
37
|
+
let queueName = scope.resourceNameFormatter.format(props.queueName, props.resourceNameOptions)
|
|
38
38
|
if (props.fifo) queueName += '.fifo'
|
|
39
39
|
|
|
40
40
|
const queue = new Queue(scope, id, {
|
|
@@ -78,7 +78,7 @@ export class S3Manager {
|
|
|
78
78
|
if (!scope.props.excludeAccountNumberForBuckets) {
|
|
79
79
|
return S3Manager.determineBucketNameByAccountAndRegion(scope, bucketName)
|
|
80
80
|
}
|
|
81
|
-
return scope.resourceNameFormatter(bucketName, props.resourceNameOptions)
|
|
81
|
+
return scope.resourceNameFormatter.format(bucketName, props.resourceNameOptions)
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/**
|
|
@@ -485,7 +485,7 @@ export class SfnManager {
|
|
|
485
485
|
level: props.logs?.level ?? LogLevel.ALL,
|
|
486
486
|
},
|
|
487
487
|
role,
|
|
488
|
-
stateMachineName: scope.resourceNameFormatter(props.stateMachineName, props.resourceNameOptions),
|
|
488
|
+
stateMachineName: scope.resourceNameFormatter.format(props.stateMachineName, props.resourceNameOptions),
|
|
489
489
|
})
|
|
490
490
|
|
|
491
491
|
createCfnOutput(`${id}-stateMachineName`, scope, stateMachine.stateMachineName)
|
|
@@ -37,7 +37,7 @@ export class VpcManager {
|
|
|
37
37
|
if (!props) throw `Vpc props undefined for ${id}`
|
|
38
38
|
if (!props.vpcName) throw `Vpc vpcName undefined for ${id}`
|
|
39
39
|
|
|
40
|
-
const vpcName = scope.resourceNameFormatter(props.vpcName, props.resourceNameOptions)
|
|
40
|
+
const vpcName = scope.resourceNameFormatter.format(props.vpcName, props.resourceNameOptions)
|
|
41
41
|
let vpc
|
|
42
42
|
if (props.isIPV6) {
|
|
43
43
|
vpc = new Ipv6Vpc(scope, `${id}`, {
|
|
@@ -91,9 +91,9 @@ export class VpcManager {
|
|
|
91
91
|
* @param vpcIdentifier optional identifier for VPC
|
|
92
92
|
*/
|
|
93
93
|
public retrieveCommonVpc(id: string, scope: CommonConstruct, vpcIdentifier?: string) {
|
|
94
|
-
const vpcName = scope.resourceNameFormatter(vpcIdentifier ?? CommonVpcIdentifier)
|
|
94
|
+
const vpcName = scope.resourceNameFormatter.format(vpcIdentifier ?? CommonVpcIdentifier)
|
|
95
95
|
return Vpc.fromLookup(scope, `${id}`, {
|
|
96
|
-
vpcName: scope.resourceNameFormatter(vpcIdentifier ?? CommonVpcIdentifier),
|
|
96
|
+
vpcName: scope.resourceNameFormatter.format(vpcIdentifier ?? CommonVpcIdentifier),
|
|
97
97
|
})
|
|
98
98
|
}
|
|
99
99
|
}
|
|
@@ -33,7 +33,7 @@ export class WafManager {
|
|
|
33
33
|
const ipSet = new CfnIPSet(scope, `${id}`, {
|
|
34
34
|
...props,
|
|
35
35
|
description: `IP Set for ${id} - ${scope.props.stage} stage`,
|
|
36
|
-
name: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
36
|
+
name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
37
37
|
})
|
|
38
38
|
|
|
39
39
|
createCfnOutput(`${id}-ipSetId`, scope, ipSet.attrId)
|
|
@@ -55,7 +55,7 @@ export class WafManager {
|
|
|
55
55
|
const webAcl = new CfnWebACL(scope, `${id}`, {
|
|
56
56
|
...props,
|
|
57
57
|
description: `Web Acl for ${id} - ${scope.props.stage} stage`,
|
|
58
|
-
name: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
58
|
+
name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
59
59
|
tags: [{ key: 'service', value: scope.props.name }],
|
|
60
60
|
})
|
|
61
61
|
|