@gradientedge/cdk-utils 9.10.1 → 9.12.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/index.d.ts +1 -0
- package/dist/src/lib/aws/common/index.js +1 -0
- 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 +4 -4
- 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 +9 -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 +1 -1
- package/src/lib/aws/common/construct.ts +4 -16
- package/src/lib/aws/common/index.ts +1 -0
- 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 +4 -4
- 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 +9 -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
|
@@ -47,7 +47,7 @@ export class EventManager {
|
|
|
47
47
|
|
|
48
48
|
let eventBusName = props.eventBusName
|
|
49
49
|
if (eventBusName && eventBusName != 'default') {
|
|
50
|
-
eventBusName = scope.resourceNameFormatter(props.eventBusName, props.resourceNameOptions)
|
|
50
|
+
eventBusName = scope.resourceNameFormatter.format(props.eventBusName, props.resourceNameOptions)
|
|
51
51
|
}
|
|
52
52
|
const eventBus = new EventBus(scope, `${id}`, {
|
|
53
53
|
...props,
|
|
@@ -81,7 +81,7 @@ export class EventManager {
|
|
|
81
81
|
const rule = new Rule(scope, `${id}`, {
|
|
82
82
|
...props,
|
|
83
83
|
eventBus,
|
|
84
|
-
ruleName: scope.resourceNameFormatter(props.ruleName, props.resourceNameOptions),
|
|
84
|
+
ruleName: scope.resourceNameFormatter.format(props.ruleName, props.resourceNameOptions),
|
|
85
85
|
})
|
|
86
86
|
|
|
87
87
|
if (targets && !_.isEmpty(targets)) {
|
|
@@ -129,12 +129,12 @@ export class EventManager {
|
|
|
129
129
|
description: 'Rule to send notification to lambda function target',
|
|
130
130
|
eventBusName,
|
|
131
131
|
eventPattern,
|
|
132
|
-
name: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
132
|
+
name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
133
133
|
scheduleExpression,
|
|
134
134
|
targets: [
|
|
135
135
|
{
|
|
136
136
|
arn: lambdaFunction.functionArn,
|
|
137
|
-
id: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
137
|
+
id: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
138
138
|
input: props.input ?? undefined,
|
|
139
139
|
},
|
|
140
140
|
],
|
|
@@ -187,7 +187,7 @@ export class EventManager {
|
|
|
187
187
|
...props,
|
|
188
188
|
description: 'Rule to send notification on new objects in data bucket to ecs task target',
|
|
189
189
|
eventPattern,
|
|
190
|
-
name: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
190
|
+
name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
191
191
|
targets: [
|
|
192
192
|
{
|
|
193
193
|
arn: cluster.clusterArn,
|
|
@@ -199,7 +199,7 @@ export class EventManager {
|
|
|
199
199
|
taskCount: 1,
|
|
200
200
|
taskDefinitionArn: task.taskDefinitionArn,
|
|
201
201
|
},
|
|
202
|
-
id: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
202
|
+
id: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
203
203
|
roleArn: role instanceof Role ? role.roleArn : role.attrArn,
|
|
204
204
|
},
|
|
205
205
|
],
|
|
@@ -238,7 +238,7 @@ export class EventManager {
|
|
|
238
238
|
|
|
239
239
|
const pipe = new CfnPipe(scope, `${id}`, {
|
|
240
240
|
...props,
|
|
241
|
-
name: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
241
|
+
name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
242
242
|
roleArn: pipeRole.roleArn,
|
|
243
243
|
source: sourceQueue.queueArn,
|
|
244
244
|
sourceParameters: {
|
|
@@ -298,7 +298,7 @@ export class EventManager {
|
|
|
298
298
|
|
|
299
299
|
const pipe = new CfnPipe(scope, `${id}`, {
|
|
300
300
|
...props,
|
|
301
|
-
name: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
301
|
+
name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
302
302
|
roleArn: pipeRole.roleArn,
|
|
303
303
|
source: sourceQueue.queueArn,
|
|
304
304
|
sourceParameters: {
|
|
@@ -355,7 +355,7 @@ export class EventManager {
|
|
|
355
355
|
|
|
356
356
|
const pipe = new CfnPipe(scope, `${id}`, {
|
|
357
357
|
...props,
|
|
358
|
-
name: scope.resourceNameFormatter(props.name, props.resourceNameOptions),
|
|
358
|
+
name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
|
|
359
359
|
roleArn: pipeRole.roleArn,
|
|
360
360
|
source: sourceDynamoDbStreamArn,
|
|
361
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
|
|