@gradientedge/cdk-utils 9.13.0 → 9.15.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.
Files changed (107) hide show
  1. package/dist/src/lib/aws/common/stack.d.ts +1 -0
  2. package/dist/src/lib/aws/common/stack.js +1 -0
  3. package/dist/src/lib/aws/common/types.d.ts +3 -0
  4. package/dist/src/lib/aws/construct/api-to-any-target/main.js +2 -2
  5. package/dist/src/lib/aws/construct/api-to-eventbridge-target/main.js +4 -4
  6. package/dist/src/lib/aws/construct/api-to-eventbridge-target-with-sns/main.js +4 -4
  7. package/dist/src/lib/aws/construct/api-to-lambda-target/main.js +1 -1
  8. package/dist/src/lib/aws/services/api-gateway/main.js +1 -1
  9. package/dist/src/lib/aws/services/api-gateway/types.d.ts +0 -3
  10. package/dist/src/lib/aws/services/appconfig/main.js +2 -2
  11. package/dist/src/lib/aws/services/appconfig/types.d.ts +0 -2
  12. package/dist/src/lib/aws/services/cloudfront/main.js +2 -2
  13. package/dist/src/lib/aws/services/cloudfront/types.d.ts +0 -2
  14. package/dist/src/lib/aws/services/cloudtrail/main.js +1 -1
  15. package/dist/src/lib/aws/services/cloudtrail/types.d.ts +0 -2
  16. package/dist/src/lib/aws/services/cloudwatch/logs.js +6 -2
  17. package/dist/src/lib/aws/services/cloudwatch/main.js +3 -0
  18. package/dist/src/lib/aws/services/codebuild/main.js +1 -1
  19. package/dist/src/lib/aws/services/dynamodb/main.js +2 -2
  20. package/dist/src/lib/aws/services/dynamodb/types.d.ts +0 -3
  21. package/dist/src/lib/aws/services/elastic-container-service/main.js +2 -2
  22. package/dist/src/lib/aws/services/elastic-container-service/types.d.ts +0 -2
  23. package/dist/src/lib/aws/services/elastic-file-system/main.js +1 -1
  24. package/dist/src/lib/aws/services/elastic-file-system/types.d.ts +0 -2
  25. package/dist/src/lib/aws/services/elastic-kubernetes-service/main.js +1 -1
  26. package/dist/src/lib/aws/services/elastic-kubernetes-service/types.d.ts +0 -2
  27. package/dist/src/lib/aws/services/elasticache/main.js +1 -1
  28. package/dist/src/lib/aws/services/elasticache/types.d.ts +0 -2
  29. package/dist/src/lib/aws/services/eventbridge/main.js +10 -10
  30. package/dist/src/lib/aws/services/eventbridge/types.d.ts +0 -7
  31. package/dist/src/lib/aws/services/evidently/main.js +4 -4
  32. package/dist/src/lib/aws/services/evidently/types.d.ts +0 -5
  33. package/dist/src/lib/aws/services/identity-access-management/main.d.ts +20 -20
  34. package/dist/src/lib/aws/services/identity-access-management/main.js +71 -70
  35. package/dist/src/lib/aws/services/key-management-service/main.js +1 -1
  36. package/dist/src/lib/aws/services/key-management-service/types.d.ts +0 -2
  37. package/dist/src/lib/aws/services/lambda/main.js +7 -8
  38. package/dist/src/lib/aws/services/lambda/types.d.ts +0 -3
  39. package/dist/src/lib/aws/services/secrets-manager/main.js +1 -1
  40. package/dist/src/lib/aws/services/secrets-manager/types.d.ts +0 -2
  41. package/dist/src/lib/aws/services/simple-notification-service/main.js +4 -4
  42. package/dist/src/lib/aws/services/simple-notification-service/types.d.ts +0 -2
  43. package/dist/src/lib/aws/services/simple-queue-service/main.js +1 -1
  44. package/dist/src/lib/aws/services/simple-queue-service/types.d.ts +0 -2
  45. package/dist/src/lib/aws/services/simple-storage-service/main.js +1 -1
  46. package/dist/src/lib/aws/services/simple-storage-service/types.d.ts +0 -2
  47. package/dist/src/lib/aws/services/step-function/main.js +1 -1
  48. package/dist/src/lib/aws/services/step-function/types.d.ts +0 -2
  49. package/dist/src/lib/aws/services/systems-manager/main.js +1 -1
  50. package/dist/src/lib/aws/services/systems-manager/types.d.ts +0 -2
  51. package/dist/src/lib/aws/services/virtual-private-cloud/main.js +2 -2
  52. package/dist/src/lib/aws/services/virtual-private-cloud/types.d.ts +0 -2
  53. package/dist/src/lib/aws/services/web-application-firewall/main.js +2 -2
  54. package/dist/src/lib/aws/services/web-application-firewall/types.d.ts +0 -3
  55. package/package.json +6 -6
  56. package/src/lib/aws/common/stack.ts +1 -0
  57. package/src/lib/aws/common/types.ts +1 -0
  58. package/src/lib/aws/construct/api-to-any-target/main.ts +2 -2
  59. package/src/lib/aws/construct/api-to-eventbridge-target/main.ts +7 -4
  60. package/src/lib/aws/construct/api-to-eventbridge-target-with-sns/main.ts +4 -4
  61. package/src/lib/aws/construct/api-to-lambda-target/main.ts +1 -1
  62. package/src/lib/aws/services/api-gateway/main.ts +1 -1
  63. package/src/lib/aws/services/api-gateway/types.ts +1 -4
  64. package/src/lib/aws/services/appconfig/main.ts +5 -2
  65. package/src/lib/aws/services/appconfig/types.ts +0 -1
  66. package/src/lib/aws/services/cloudfront/main.ts +2 -2
  67. package/src/lib/aws/services/cloudfront/types.ts +0 -1
  68. package/src/lib/aws/services/cloudtrail/main.ts +1 -1
  69. package/src/lib/aws/services/cloudtrail/types.ts +1 -3
  70. package/src/lib/aws/services/cloudwatch/logs.ts +4 -2
  71. package/src/lib/aws/services/cloudwatch/main.ts +5 -0
  72. package/src/lib/aws/services/codebuild/main.ts +1 -1
  73. package/src/lib/aws/services/dynamodb/main.ts +2 -2
  74. package/src/lib/aws/services/dynamodb/types.ts +0 -2
  75. package/src/lib/aws/services/elastic-container-service/main.ts +5 -2
  76. package/src/lib/aws/services/elastic-container-service/types.ts +0 -1
  77. package/src/lib/aws/services/elastic-file-system/main.ts +1 -1
  78. package/src/lib/aws/services/elastic-file-system/types.ts +0 -1
  79. package/src/lib/aws/services/elastic-kubernetes-service/main.ts +1 -1
  80. package/src/lib/aws/services/elastic-kubernetes-service/types.ts +0 -1
  81. package/src/lib/aws/services/elasticache/main.ts +1 -1
  82. package/src/lib/aws/services/elasticache/types.ts +1 -3
  83. package/src/lib/aws/services/eventbridge/main.ts +13 -10
  84. package/src/lib/aws/services/eventbridge/types.ts +1 -8
  85. package/src/lib/aws/services/evidently/main.ts +4 -4
  86. package/src/lib/aws/services/evidently/types.ts +4 -12
  87. package/src/lib/aws/services/identity-access-management/main.ts +80 -79
  88. package/src/lib/aws/services/key-management-service/main.ts +1 -1
  89. package/src/lib/aws/services/key-management-service/types.ts +1 -3
  90. package/src/lib/aws/services/lambda/main.ts +13 -7
  91. package/src/lib/aws/services/lambda/types.ts +0 -2
  92. package/src/lib/aws/services/secrets-manager/main.ts +1 -1
  93. package/src/lib/aws/services/secrets-manager/types.ts +1 -3
  94. package/src/lib/aws/services/simple-notification-service/main.ts +4 -4
  95. package/src/lib/aws/services/simple-notification-service/types.ts +1 -3
  96. package/src/lib/aws/services/simple-queue-service/main.ts +1 -1
  97. package/src/lib/aws/services/simple-queue-service/types.ts +0 -1
  98. package/src/lib/aws/services/simple-storage-service/main.ts +1 -1
  99. package/src/lib/aws/services/simple-storage-service/types.ts +0 -1
  100. package/src/lib/aws/services/step-function/main.ts +4 -1
  101. package/src/lib/aws/services/step-function/types.ts +1 -3
  102. package/src/lib/aws/services/systems-manager/main.ts +1 -1
  103. package/src/lib/aws/services/systems-manager/types.ts +1 -3
  104. package/src/lib/aws/services/virtual-private-cloud/main.ts +2 -2
  105. package/src/lib/aws/services/virtual-private-cloud/types.ts +0 -1
  106. package/src/lib/aws/services/web-application-firewall/main.ts +2 -2
  107. package/src/lib/aws/services/web-application-firewall/types.ts +2 -6
@@ -111,7 +111,7 @@ export class ApiToAnyTarget extends CommonConstruct {
111
111
 
112
112
  protected createApiToAnyTargetRestApiLogGroup() {
113
113
  this.apiToAnyTargetRestApi.accessLogGroup = this.logManager.createLogGroup(`${this.id}-rest-api-access-log`, this, {
114
- logGroupName: `/custom/api/${this.id}-rest-api-access`,
114
+ logGroupName: `${this.id}-access`,
115
115
  removalPolicy: RemovalPolicy.DESTROY,
116
116
  })
117
117
  }
@@ -156,7 +156,7 @@ export class ApiToAnyTarget extends CommonConstruct {
156
156
  ...this.props.api.restApi,
157
157
  restApiName: this.resourceNameFormatter.format(
158
158
  this.props.api.restApi?.restApiName,
159
- this.props.api.restApi?.resourceNameOptions
159
+ this.props.resourceNameOptions?.apigateway
160
160
  ),
161
161
  })
162
162
  this.addCfnOutput(`${this.id}-restApiId`, this.apiToAnyTargetRestApi.api.restApiId)
@@ -159,7 +159,10 @@ export class ApiToEventBridgeTarget extends CommonConstruct {
159
159
  this.apiEvent.eventBus = EventBus.fromEventBusName(
160
160
  this,
161
161
  `${this.id}-event-bus`,
162
- this.resourceNameFormatter.format(this.props.event.eventBusName ?? 'default')
162
+ this.resourceNameFormatter.format(
163
+ this.props.event.eventBusName ?? 'default',
164
+ this.props.resourceNameOptions?.eventbridgeBus
165
+ )
163
166
  )
164
167
  return
165
168
  }
@@ -175,7 +178,7 @@ export class ApiToEventBridgeTarget extends CommonConstruct {
175
178
  if (this.props.api.useExisting) return
176
179
  this.apiEvent.logGroup = this.logManager.createLogGroup(`${this.id}-log`, this, {
177
180
  ...{
178
- logGroupName: `/${this.resourceNameFormatter.format(this.id)}/events/api-to-eventbridge-target`,
181
+ logGroupName: `${this.id}-api-to-event-bridge-target`,
179
182
  },
180
183
  ...this.props.event.logGroup,
181
184
  })
@@ -356,7 +359,7 @@ export class ApiToEventBridgeTarget extends CommonConstruct {
356
359
  `${this.id}-rest-api-access-log`,
357
360
  this,
358
361
  {
359
- logGroupName: `/custom/api/${this.resourceNameFormatter.format(this.id)}-rest-api-access`,
362
+ logGroupName: `${this.id}-access`,
360
363
  removalPolicy: RemovalPolicy.DESTROY,
361
364
  }
362
365
  )
@@ -408,7 +411,7 @@ export class ApiToEventBridgeTarget extends CommonConstruct {
408
411
  ...this.props.api.restApi,
409
412
  restApiName: this.resourceNameFormatter.format(
410
413
  this.props.api.restApi?.restApiName,
411
- this.props.api.restApi?.resourceNameOptions
414
+ this.props.resourceNameOptions?.apigateway
412
415
  ),
413
416
  })
414
417
 
@@ -274,7 +274,7 @@ export class ApiToEventBridgeTargetWithSns extends CommonConstruct {
274
274
  protected createApiDestinationLogGroupSuccess() {
275
275
  if (this.props.api.useExisting) return
276
276
  this.apiEvent.logGroupSuccess = this.logManager.createLogGroup(`${this.id}-destination-success-log`, this, {
277
- logGroupName: `/${this.id}/events/api-destination-success`,
277
+ logGroupName: `${this.id}-destination`,
278
278
  ...this.props.event.logGroupSuccess,
279
279
  })
280
280
  }
@@ -314,7 +314,7 @@ export class ApiToEventBridgeTargetWithSns extends CommonConstruct {
314
314
  protected createApiDestinationLogGroupFailure() {
315
315
  if (this.props.api.useExisting) return
316
316
  this.apiEvent.logGroupFailure = this.logManager.createLogGroup(`${this.id}-destination-failure-log`, this, {
317
- logGroupName: `/${this.id}/events/api-destination-failure`,
317
+ logGroupName: `${this.id}-destination-failure`,
318
318
  ...this.props.event.logGroupFailure,
319
319
  })
320
320
  }
@@ -509,7 +509,7 @@ export class ApiToEventBridgeTargetWithSns extends CommonConstruct {
509
509
  }
510
510
 
511
511
  const accessLogGroup = this.logManager.createLogGroup(`${this.id}-sns-rest-api-access-log`, this, {
512
- logGroupName: `/custom/api/${this.id}-destined-rest-api-access`,
512
+ logGroupName: `${this.id}-access`,
513
513
  removalPolicy: RemovalPolicy.DESTROY,
514
514
  })
515
515
 
@@ -540,7 +540,7 @@ export class ApiToEventBridgeTargetWithSns extends CommonConstruct {
540
540
  ...this.props.api,
541
541
  restApiName: this.resourceNameFormatter.format(
542
542
  this.props.api.restApi?.restApiName,
543
- this.props.api.restApi?.resourceNameOptions
543
+ this.props.resourceNameOptions?.apigateway
544
544
  ),
545
545
  })
546
546
  this.addCfnOutput(`${this.id}-restApiId`, this.apiDestinedRestApi.api.restApiId)
@@ -156,7 +156,7 @@ export class ApiToLambdaTarget extends CommonConstruct {
156
156
  }
157
157
 
158
158
  const accessLogGroup = this.logManager.createLogGroup(`${this.id}-rest-api-access-log`, this, {
159
- logGroupName: `/custom/api/${this.resourceNameFormatter.format(this.id)}-rest-api-access`,
159
+ logGroupName: `${this.id}-access`,
160
160
  removalPolicy: RemovalPolicy.DESTROY,
161
161
  })
162
162
 
@@ -65,7 +65,7 @@ export class ApiManager {
65
65
  handler: lambdaFunction,
66
66
  minCompressionSize: props.minCompressionSizeInBytes ? Size.bytes(props.minCompressionSizeInBytes) : undefined,
67
67
  proxy: props.proxy ?? true,
68
- restApiName: scope.resourceNameFormatter.format(props.restApiName, props.resourceNameOptions),
68
+ restApiName: scope.resourceNameFormatter.format(props.restApiName, scope.props.resourceNameOptions?.apigateway),
69
69
  })
70
70
 
71
71
  if (props.tags && !_.isEmpty(props.tags)) {
@@ -7,9 +7,6 @@ import { TagProps } from '../../types'
7
7
  export interface LambdaRestApiProps extends LambdaRestApigProps {
8
8
  tags?: TagProps[]
9
9
  minCompressionSizeInBytes?: number
10
- resourceNameOptions?: ResourceNameFormatterProps
11
10
  }
12
11
 
13
- export interface RestApigProps extends RestApiProps {
14
- resourceNameOptions?: ResourceNameFormatterProps
15
- }
12
+ export interface RestApigProps extends RestApiProps {}
@@ -51,7 +51,7 @@ export class AppConfigManager {
51
51
 
52
52
  const application = new CfnApplication(scope, `${id}`, {
53
53
  ...props.application,
54
- name: scope.resourceNameFormatter.format(props.application.name, props.resourceNameOptions),
54
+ name: scope.resourceNameFormatter.format(props.application.name, scope.props.resourceNameOptions?.appconfig),
55
55
  })
56
56
 
57
57
  createCfnOutput(`${id}-ApplicationId`, scope, Fn.ref(application.logicalId))
@@ -109,7 +109,10 @@ export class AppConfigManager {
109
109
  ...props.configurationProfile,
110
110
  applicationId,
111
111
  locationUri: props.configurationProfile.locationUri || 'hosted',
112
- name: scope.resourceNameFormatter.format(props.configurationProfile.name, props.resourceNameOptions),
112
+ name: scope.resourceNameFormatter.format(
113
+ props.configurationProfile.name,
114
+ scope.props.resourceNameOptions?.appconfig
115
+ ),
113
116
  })
114
117
 
115
118
  createCfnOutput(`${id}-configurationProfileId`, scope, Fn.ref(profile.logicalId))
@@ -16,5 +16,4 @@ export interface AppConfigProps {
16
16
  deploymentStrategy: CfnDeploymentStrategyProps
17
17
  environment: CfnEnvironmentProps
18
18
  id: string
19
- resourceNameOptions?: ResourceNameFormatterProps
20
19
  }
@@ -284,7 +284,7 @@ export class CloudFrontManager {
284
284
  ...environment,
285
285
  },
286
286
  filesystem: accessPoint ? FileSystem.fromEfsAccessPoint(accessPoint, mountPath ?? '/mnt/msg') : undefined,
287
- functionName: scope.resourceNameFormatter.format(props.functionName, props.resourceNameOptions),
287
+ functionName: scope.resourceNameFormatter.format(props.functionName, scope.props.resourceNameOptions?.cloudfront),
288
288
  handler: props.handler ?? 'index.handler',
289
289
  layers: layers,
290
290
  logRetention: props.logRetention,
@@ -360,7 +360,7 @@ export class CloudFrontManager {
360
360
  filePath: props.functionFilePath,
361
361
  }),
362
362
  comment: props.comment,
363
- functionName: scope.resourceNameFormatter.format(props.functionName, props.resourceNameOptions),
363
+ functionName: scope.resourceNameFormatter.format(props.functionName, scope.props.resourceNameOptions?.cloudfront),
364
364
  })
365
365
 
366
366
  createCfnOutput(`${id}-functionArn`, scope, cloudfrontFunction.functionArn)
@@ -23,5 +23,4 @@ export interface DistributionProps extends CfDistributionProps {
23
23
  export interface CloudfrontFunctionProps extends FunctionProps {
24
24
  eventType: string
25
25
  functionFilePath: string
26
- resourceNameOptions?: ResourceNameFormatterProps
27
26
  }
@@ -72,7 +72,7 @@ export class CloudTrailManager {
72
72
  s3BucketName: logBucket.bucketName,
73
73
  s3KeyPrefix: `logs-${props.trailName}`,
74
74
  tags: [{ key: 'service', value: scope.props.name }],
75
- trailName: scope.resourceNameFormatter.format(props.trailName, props.resourceNameOptions),
75
+ trailName: scope.resourceNameFormatter.format(props.trailName, scope.props.resourceNameOptions?.cloudtrail),
76
76
  })
77
77
 
78
78
  cloudTrail.addDependency(logBucketPolicy)
@@ -3,6 +3,4 @@ import { ResourceNameFormatterProps } from '../../common'
3
3
 
4
4
  /**
5
5
  */
6
- export interface CloudTrailProps extends CfnTrailProps {
7
- resourceNameOptions?: ResourceNameFormatterProps
8
- }
6
+ export interface CloudTrailProps extends CfnTrailProps {}
@@ -60,10 +60,11 @@ export class LogManager {
60
60
  */
61
61
  public createCfnLogGroup(id: string, scope: CommonConstruct, props: LogProps) {
62
62
  if (!props) throw `Logs props undefined for ${id}`
63
+ if (!props.logGroupName) throw `Logs logGroupName undefined for ${id}`
63
64
 
64
65
  const logGroup = new logs.CfnLogGroup(scope, `${id}`, {
65
66
  ...props,
66
- logGroupName: `${props.logGroupName}-${scope.props.stage}`,
67
+ logGroupName: `/${scope.resourceNameFormatter.format(props.logGroupName, scope.props.resourceNameOptions?.logs)}`,
67
68
  retentionInDays: props.retention,
68
69
  })
69
70
 
@@ -86,10 +87,11 @@ export class LogManager {
86
87
  */
87
88
  public createLogGroup(id: string, scope: CommonConstruct, props: LogProps) {
88
89
  if (!props) throw `Logs props undefined for ${id}`
90
+ if (!props.logGroupName) throw `Logs logGroupName undefined for ${id}`
89
91
 
90
92
  const logGroup = new logs.LogGroup(scope, `${id}`, {
91
93
  ...props,
92
- logGroupName: `${props.logGroupName}-${scope.props.stage}`,
94
+ logGroupName: `/${scope.resourceNameFormatter.format(props.logGroupName, scope.props.resourceNameOptions?.logs)}`,
93
95
  removalPolicy: props.removalPolicy ?? cdk.RemovalPolicy.DESTROY,
94
96
  retention: props.retention,
95
97
  })
@@ -107,9 +107,14 @@ export class CloudWatchManager {
107
107
  */
108
108
  public createDashboard(id: string, scope: CommonConstruct, props: DashboardProps, widgets?: watch.IWidget[][]) {
109
109
  if (!props) throw `Dashboard props undefined for ${id}`
110
+ if (!props.dashboardName) throw `Dashboard dashboardName undefined for ${id}`
110
111
 
111
112
  const dashboard = new watch.Dashboard(scope, `${id}`, {
112
113
  ...props,
114
+ dashboardName: scope.resourceNameFormatter.format(
115
+ props.dashboardName,
116
+ scope.props.resourceNameOptions?.cloudwatch
117
+ ),
113
118
  end: CloudWatchManager.determineTimeRange(props.end),
114
119
  start: CloudWatchManager.determineTimeRange(props.start),
115
120
  widgets,
@@ -71,7 +71,7 @@ export class CodeBuildManager {
71
71
  }),
72
72
  },
73
73
  },
74
- role: scope.iamManager.roleForCloudfrontInvalidation(id, scope),
74
+ role: scope.iamManager.createRoleForCloudfrontInvalidation(id, scope),
75
75
  timeout: Duration.minutes(5),
76
76
  })
77
77
  }
@@ -34,7 +34,7 @@ export class DynamodbManager {
34
34
 
35
35
  const table = new Table(scope, `${id}`, {
36
36
  ...props,
37
- tableName: scope.resourceNameFormatter.format(props.tableName, props.resourceNameOptions),
37
+ tableName: scope.resourceNameFormatter.format(props.tableName, scope.props.resourceNameOptions?.table),
38
38
  })
39
39
 
40
40
  if (props.tags && !_.isEmpty(props.tags)) {
@@ -61,7 +61,7 @@ export class DynamodbManager {
61
61
 
62
62
  const table = new TableV2(scope, `${id}`, {
63
63
  ...props,
64
- tableName: scope.resourceNameFormatter.format(props.tableName, props.resourceNameOptions),
64
+ tableName: scope.resourceNameFormatter.format(props.tableName, scope.props.resourceNameOptions?.table),
65
65
  })
66
66
 
67
67
  if (props.tags && !_.isEmpty(props.tags)) {
@@ -5,11 +5,9 @@ import { TagProps } from '../../types'
5
5
  /**
6
6
  */
7
7
  export interface TableProps extends dynamodb.TableProps {
8
- resourceNameOptions?: ResourceNameFormatterProps
9
8
  tags?: TagProps[]
10
9
  }
11
10
 
12
11
  export interface TablePropsV2 extends dynamodb.TablePropsV2 {
13
- resourceNameOptions?: ResourceNameFormatterProps
14
12
  tags?: TagProps[]
15
13
  }
@@ -159,12 +159,15 @@ export class EcsManager {
159
159
  cluster,
160
160
  enableECSManagedTags: true,
161
161
  healthCheckGracePeriod: props.healthCheckGracePeriod ?? Duration.seconds(60),
162
- loadBalancerName: scope.resourceNameFormatter.format(props.loadBalancerName, props.resourceNameOptions),
162
+ loadBalancerName: scope.resourceNameFormatter.format(
163
+ props.loadBalancerName,
164
+ scope.props.resourceNameOptions?.ecs
165
+ ),
163
166
  runtimePlatform: {
164
167
  cpuArchitecture: props.runtimePlatform?.cpuArchitecture ?? CpuArchitecture.X86_64,
165
168
  operatingSystemFamily: props.runtimePlatform?.operatingSystemFamily ?? OperatingSystemFamily.LINUX,
166
169
  },
167
- serviceName: scope.resourceNameFormatter.format(props.serviceName, props.resourceNameOptions),
170
+ serviceName: scope.resourceNameFormatter.format(props.serviceName, scope.props.resourceNameOptions?.ecs),
168
171
  taskImageOptions: {
169
172
  ...props.taskImageOptions,
170
173
  enableLogging: props.taskImageOptions?.enableLogging ?? true,
@@ -55,5 +55,4 @@ export interface EcsApplicationLoadBalancedFargateServiceProps extends Applicati
55
55
  logging?: AwsLogDriverProps
56
56
  mountPoints?: MountPoint[]
57
57
  siteScaling?: EcsScalingProps
58
- resourceNameOptions?: ResourceNameFormatterProps
59
58
  }
@@ -59,7 +59,7 @@ export class EfsManager {
59
59
  const fileSystemId = props.provisionNewOnDeployment ? `${id}-${new Date().getMilliseconds()}` : `${id}`
60
60
  const fileSystem = new FileSystem(scope, `${fileSystemId}`, {
61
61
  ...props,
62
- fileSystemName: scope.resourceNameFormatter.format(props.fileSystemName, props.resourceNameOptions),
62
+ fileSystemName: scope.resourceNameFormatter.format(props.fileSystemName, scope.props.resourceNameOptions?.efs),
63
63
  lifecyclePolicy: props.lifecyclePolicy ?? LifecyclePolicy.AFTER_7_DAYS,
64
64
  outOfInfrequentAccessPolicy: props.outOfInfrequentAccessPolicy ?? OutOfInfrequentAccessPolicy.AFTER_1_ACCESS,
65
65
  performanceMode: props.performanceMode ?? PerformanceMode.GENERAL_PURPOSE,
@@ -10,7 +10,6 @@ export interface EfsFileSystemProps extends FileSystemProps {
10
10
  rootDirectory?: string
11
11
  transitEncryption?: string
12
12
  transitEncryptionPort?: number
13
- resourceNameOptions?: ResourceNameFormatterProps
14
13
  }
15
14
 
16
15
  /**
@@ -82,7 +82,7 @@ export class EksManager {
82
82
  }
83
83
 
84
84
  const cluster = new Cluster(scope, `${id}Cluster`, {
85
- clusterName: scope.resourceNameFormatter.format(props.clusterName, props.resourceNameOptions),
85
+ clusterName: scope.resourceNameFormatter.format(props.clusterName, scope.props.resourceNameOptions?.eks),
86
86
  defaultCapacity: props.appCapacity,
87
87
  defaultCapacityInstance: InstanceType.of(InstanceClass.T3, InstanceSize.LARGE),
88
88
  version: KubernetesVersion.V1_27,
@@ -6,5 +6,4 @@ import { ResourceNameFormatterProps } from '../../common'
6
6
  export interface EksClusterProps extends ClusterProps {
7
7
  appCapacity: number
8
8
  appContainerPort: number
9
- resourceNameOptions?: ResourceNameFormatterProps
10
9
  }
@@ -61,7 +61,7 @@ export class ElastiCacheManager {
61
61
  const elasticacheCluster = new CfnCacheCluster(scope, `${id}`, {
62
62
  ...props,
63
63
  cacheSubnetGroupName: subnetGroup.cacheSubnetGroupName,
64
- clusterName: scope.resourceNameFormatter.format(props.clusterName, props.resourceNameOptions),
64
+ clusterName: scope.resourceNameFormatter.format(props.clusterName, scope.props.resourceNameOptions?.elasticache),
65
65
  logDeliveryConfigurations,
66
66
  vpcSecurityGroupIds: securityGroupIds,
67
67
  })
@@ -3,9 +3,7 @@ import { ResourceNameFormatterProps } from '../../common'
3
3
 
4
4
  /**
5
5
  */
6
- export interface ElastiCacheProps extends CfnCacheClusterProps {
7
- resourceNameOptions?: ResourceNameFormatterProps
8
- }
6
+ export interface ElastiCacheProps extends CfnCacheClusterProps {}
9
7
 
10
8
  /**
11
9
  */
@@ -46,8 +46,11 @@ export class EventManager {
46
46
  if (!props.eventBusName) throw `EventBus eventBusName undefined for ${id}`
47
47
 
48
48
  let eventBusName = props.eventBusName
49
- if (eventBusName && eventBusName != 'default') {
50
- eventBusName = scope.resourceNameFormatter.format(props.eventBusName, props.resourceNameOptions)
49
+ if (eventBusName != 'default') {
50
+ eventBusName = scope.resourceNameFormatter.format(
51
+ props.eventBusName,
52
+ scope.props.resourceNameOptions?.eventbridgeBus
53
+ )
51
54
  }
52
55
  const eventBus = new EventBus(scope, `${id}`, {
53
56
  ...props,
@@ -81,7 +84,7 @@ export class EventManager {
81
84
  const rule = new Rule(scope, `${id}`, {
82
85
  ...props,
83
86
  eventBus,
84
- ruleName: scope.resourceNameFormatter.format(props.ruleName, props.resourceNameOptions),
87
+ ruleName: scope.resourceNameFormatter.format(props.ruleName, scope.props.resourceNameOptions?.eventbridgeRule),
85
88
  })
86
89
 
87
90
  if (targets && !_.isEmpty(targets)) {
@@ -129,12 +132,12 @@ export class EventManager {
129
132
  description: 'Rule to send notification to lambda function target',
130
133
  eventBusName,
131
134
  eventPattern,
132
- name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
135
+ name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.eventbridgeRule),
133
136
  scheduleExpression,
134
137
  targets: [
135
138
  {
136
139
  arn: lambdaFunction.functionArn,
137
- id: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
140
+ id: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.eventbridgeRule),
138
141
  input: props.input ?? undefined,
139
142
  },
140
143
  ],
@@ -187,7 +190,7 @@ export class EventManager {
187
190
  ...props,
188
191
  description: 'Rule to send notification on new objects in data bucket to ecs task target',
189
192
  eventPattern,
190
- name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
193
+ name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.eventbridgeRule),
191
194
  targets: [
192
195
  {
193
196
  arn: cluster.clusterArn,
@@ -199,7 +202,7 @@ export class EventManager {
199
202
  taskCount: 1,
200
203
  taskDefinitionArn: task.taskDefinitionArn,
201
204
  },
202
- id: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
205
+ id: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.eventbridgeRule),
203
206
  roleArn: role instanceof Role ? role.roleArn : role.attrArn,
204
207
  },
205
208
  ],
@@ -238,7 +241,7 @@ export class EventManager {
238
241
 
239
242
  const pipe = new CfnPipe(scope, `${id}`, {
240
243
  ...props,
241
- name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
244
+ name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.eventbridgePipe),
242
245
  roleArn: pipeRole.roleArn,
243
246
  source: sourceQueue.queueArn,
244
247
  sourceParameters: {
@@ -298,7 +301,7 @@ export class EventManager {
298
301
 
299
302
  const pipe = new CfnPipe(scope, `${id}`, {
300
303
  ...props,
301
- name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
304
+ name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.eventbridgePipe),
302
305
  roleArn: pipeRole.roleArn,
303
306
  source: sourceQueue.queueArn,
304
307
  sourceParameters: {
@@ -355,7 +358,7 @@ export class EventManager {
355
358
 
356
359
  const pipe = new CfnPipe(scope, `${id}`, {
357
360
  ...props,
358
- name: scope.resourceNameFormatter.format(props.name, props.resourceNameOptions),
361
+ name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.eventbridgePipe),
359
362
  roleArn: pipeRole.roleArn,
360
363
  source: sourceDynamoDbStreamArn,
361
364
  sourceParameters: {
@@ -11,7 +11,6 @@ export interface SqsToSfnPipeProps extends CfnPipeProps {
11
11
  sfnInvocationType?: string
12
12
  sqsBatchSize?: number
13
13
  sqsMaximumBatchingWindowInSeconds?: number
14
- resourceNameOptions?: ResourceNameFormatterProps
15
14
  }
16
15
 
17
16
  /**
@@ -21,13 +20,11 @@ export interface SqsToLambdaPipeProps extends CfnPipeProps {
21
20
  sqsBatchSize?: number
22
21
  lambdaInputTemplate?: string
23
22
  sqsMaximumBatchingWindowInSeconds?: number
24
- resourceNameOptions?: ResourceNameFormatterProps
25
23
  }
26
24
 
27
25
  /**
28
26
  */
29
27
  export interface EventRuleProps extends EBRuleProps {
30
- resourceNameOptions?: ResourceNameFormatterProps
31
28
  tags?: TagProps[]
32
29
  }
33
30
 
@@ -35,15 +32,12 @@ export interface EventRuleProps extends EBRuleProps {
35
32
  */
36
33
  export interface RuleProps extends CfnRuleProps {
37
34
  input?: string
38
- resourceNameOptions?: ResourceNameFormatterProps
39
35
  tags?: TagProps[]
40
36
  }
41
37
 
42
38
  /**
43
39
  */
44
- export interface EventBusProps extends EBProps {
45
- resourceNameOptions?: ResourceNameFormatterProps
46
- }
40
+ export interface EventBusProps extends EBProps {}
47
41
 
48
42
  /**
49
43
  }
@@ -52,5 +46,4 @@ export interface DynamoDbToLambdaPipeProps extends CfnPipeProps {
52
46
  pipeFilterPattern?: any
53
47
  dynamoDbBatchSize?: number
54
48
  dynamoDbStartingPosition: string
55
- resourceNameOptions?: ResourceNameFormatterProps
56
49
  }
@@ -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.format(props.name, props.resourceNameOptions),
42
+ name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.evidentlyProject),
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.format(props.name, props.resourceNameOptions),
77
+ name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.evidentlyLaunch),
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.format(props.name, props.resourceNameOptions),
97
+ name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.evidentlyExperiment),
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.format(props.name, props.resourceNameOptions),
117
+ name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.evidentlySegment),
118
118
  })
119
119
  createCfnOutput(`${id}-segmentArn`, scope, segment.attrArn)
120
120
  createCfnOutput(`${id}-segmentName`, scope, segment.name)
@@ -9,9 +9,7 @@ import { ResourceNameFormatterProps } from '../../common'
9
9
 
10
10
  /**
11
11
  */
12
- export interface EvidentlyProjectProps extends CfnProjectProps {
13
- resourceNameOptions?: ResourceNameFormatterProps
14
- }
12
+ export interface EvidentlyProjectProps extends CfnProjectProps {}
15
13
 
16
14
  /**
17
15
  */
@@ -19,18 +17,12 @@ export interface EvidentlyFeatureProps extends CfnFeatureProps {}
19
17
 
20
18
  /**
21
19
  */
22
- export interface EvidentlyLaunchProps extends CfnLaunchProps {
23
- resourceNameOptions?: ResourceNameFormatterProps
24
- }
20
+ export interface EvidentlyLaunchProps extends CfnLaunchProps {}
25
21
 
26
22
  /**
27
23
  */
28
- export interface EvidentlyExperimentProps extends CfnExperimentProps {
29
- resourceNameOptions?: ResourceNameFormatterProps
30
- }
24
+ export interface EvidentlyExperimentProps extends CfnExperimentProps {}
31
25
 
32
26
  /**
33
27
  */
34
- export interface EvidentlySegmentProps extends CfnSegmentProps {
35
- resourceNameOptions?: ResourceNameFormatterProps
36
- }
28
+ export interface EvidentlySegmentProps extends CfnSegmentProps {}