@gradientedge/cdk-utils 8.37.0 → 8.39.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/construct/site-with-ecs-backend/main.js +2 -0
- package/dist/src/lib/manager/aws/ecs-manager.js +4 -0
- package/dist/src/lib/types/aws/index.d.ts +3 -1
- package/package.json +1 -1
- package/src/lib/construct/site-with-ecs-backend/main.ts +2 -0
- package/src/lib/manager/aws/ecs-manager.ts +4 -0
- package/src/lib/types/aws/index.ts +5 -2
|
@@ -239,6 +239,8 @@ class SiteWithEcsBackend extends common_1.CommonConstruct {
|
|
|
239
239
|
logDriver: ecs.LogDriver.awsLogs({
|
|
240
240
|
logGroup: this.siteEcsLogGroup,
|
|
241
241
|
streamPrefix: `${this.id}-${this.props.stage}/ecs`,
|
|
242
|
+
multilinePattern: this.props.siteTask.logging?.multilinePattern,
|
|
243
|
+
logRetention: this.props.siteTask.logging?.logRetention,
|
|
242
244
|
}),
|
|
243
245
|
image: this.siteEcsContainerImage,
|
|
244
246
|
executionRole: this.siteEcsRole,
|
|
@@ -116,6 +116,8 @@ class EcsManager {
|
|
|
116
116
|
logging: ecs.LogDriver.awsLogs({
|
|
117
117
|
logGroup: logGroup,
|
|
118
118
|
streamPrefix: `${id}`,
|
|
119
|
+
multilinePattern: props.logging?.multilinePattern,
|
|
120
|
+
logRetention: props.logging?.logRetention,
|
|
119
121
|
}),
|
|
120
122
|
memoryLimitMiB: props.memoryMiB ? parseInt(props.memoryMiB) : undefined,
|
|
121
123
|
privileged: false,
|
|
@@ -162,6 +164,8 @@ class EcsManager {
|
|
|
162
164
|
ecs.LogDriver.awsLogs({
|
|
163
165
|
logGroup: logGroup,
|
|
164
166
|
streamPrefix: `${id}-${scope.props.stage}/ecs`,
|
|
167
|
+
multilinePattern: props.logging?.multilinePattern,
|
|
168
|
+
logRetention: props.logging?.logRetention,
|
|
165
169
|
}),
|
|
166
170
|
image: props.taskImageOptions.image,
|
|
167
171
|
executionRole: props.taskImageOptions?.executionRole,
|
|
@@ -73,7 +73,7 @@ export interface SiteWithEcsBackendProps extends CommonStackProps {
|
|
|
73
73
|
siteLogBucket: S3BucketProps;
|
|
74
74
|
siteRecordName?: string;
|
|
75
75
|
siteSubDomain: string;
|
|
76
|
-
siteTask:
|
|
76
|
+
siteTask: EcsApplicationLoadBalancedFargateServiceProps;
|
|
77
77
|
siteVpc: ec2.VpcProps;
|
|
78
78
|
useExistingHostedZone: boolean;
|
|
79
79
|
nodeEnv: string;
|
|
@@ -600,6 +600,7 @@ export interface EcsClusterProps extends ecs.ClusterProps {
|
|
|
600
600
|
* @subcategory Properties
|
|
601
601
|
*/
|
|
602
602
|
export interface EcsTaskProps extends ecs.TaskDefinitionProps {
|
|
603
|
+
logging?: ecs.AwsLogDriverProps;
|
|
603
604
|
}
|
|
604
605
|
/**
|
|
605
606
|
* @category cdk-utils.ecs-manager
|
|
@@ -607,6 +608,7 @@ export interface EcsTaskProps extends ecs.TaskDefinitionProps {
|
|
|
607
608
|
*/
|
|
608
609
|
export interface EcsApplicationLoadBalancedFargateServiceProps extends ecsPatterns.ApplicationLoadBalancedFargateServiceProps {
|
|
609
610
|
healthCheck?: HealthCheck;
|
|
611
|
+
logging?: ecs.AwsLogDriverProps;
|
|
610
612
|
}
|
|
611
613
|
/**
|
|
612
614
|
* @category cdk-utils.eks-manager
|
package/package.json
CHANGED
|
@@ -261,6 +261,8 @@ export class SiteWithEcsBackend extends CommonConstruct {
|
|
|
261
261
|
logDriver: ecs.LogDriver.awsLogs({
|
|
262
262
|
logGroup: this.siteEcsLogGroup,
|
|
263
263
|
streamPrefix: `${this.id}-${this.props.stage}/ecs`,
|
|
264
|
+
multilinePattern: this.props.siteTask.logging?.multilinePattern,
|
|
265
|
+
logRetention: this.props.siteTask.logging?.logRetention,
|
|
264
266
|
}),
|
|
265
267
|
image: this.siteEcsContainerImage,
|
|
266
268
|
executionRole: this.siteEcsRole,
|
|
@@ -111,6 +111,8 @@ export class EcsManager {
|
|
|
111
111
|
logging: ecs.LogDriver.awsLogs({
|
|
112
112
|
logGroup: logGroup,
|
|
113
113
|
streamPrefix: `${id}`,
|
|
114
|
+
multilinePattern: props.logging?.multilinePattern,
|
|
115
|
+
logRetention: props.logging?.logRetention,
|
|
114
116
|
}),
|
|
115
117
|
memoryLimitMiB: props.memoryMiB ? parseInt(props.memoryMiB) : undefined,
|
|
116
118
|
privileged: false,
|
|
@@ -166,6 +168,8 @@ export class EcsManager {
|
|
|
166
168
|
ecs.LogDriver.awsLogs({
|
|
167
169
|
logGroup: logGroup,
|
|
168
170
|
streamPrefix: `${id}-${scope.props.stage}/ecs`,
|
|
171
|
+
multilinePattern: props.logging?.multilinePattern,
|
|
172
|
+
logRetention: props.logging?.logRetention,
|
|
169
173
|
}),
|
|
170
174
|
image: props.taskImageOptions.image,
|
|
171
175
|
executionRole: props.taskImageOptions?.executionRole,
|
|
@@ -76,7 +76,7 @@ export interface SiteWithEcsBackendProps extends CommonStackProps {
|
|
|
76
76
|
siteLogBucket: S3BucketProps
|
|
77
77
|
siteRecordName?: string
|
|
78
78
|
siteSubDomain: string
|
|
79
|
-
siteTask:
|
|
79
|
+
siteTask: EcsApplicationLoadBalancedFargateServiceProps
|
|
80
80
|
siteVpc: ec2.VpcProps
|
|
81
81
|
useExistingHostedZone: boolean
|
|
82
82
|
nodeEnv: string
|
|
@@ -635,7 +635,9 @@ export interface EcsClusterProps extends ecs.ClusterProps {}
|
|
|
635
635
|
* @category cdk-utils.ecs-manager
|
|
636
636
|
* @subcategory Properties
|
|
637
637
|
*/
|
|
638
|
-
export interface EcsTaskProps extends ecs.TaskDefinitionProps {
|
|
638
|
+
export interface EcsTaskProps extends ecs.TaskDefinitionProps {
|
|
639
|
+
logging?: ecs.AwsLogDriverProps
|
|
640
|
+
}
|
|
639
641
|
|
|
640
642
|
/**
|
|
641
643
|
* @category cdk-utils.ecs-manager
|
|
@@ -644,6 +646,7 @@ export interface EcsTaskProps extends ecs.TaskDefinitionProps {}
|
|
|
644
646
|
export interface EcsApplicationLoadBalancedFargateServiceProps
|
|
645
647
|
extends ecsPatterns.ApplicationLoadBalancedFargateServiceProps {
|
|
646
648
|
healthCheck?: HealthCheck
|
|
649
|
+
logging?: ecs.AwsLogDriverProps
|
|
647
650
|
}
|
|
648
651
|
|
|
649
652
|
/**
|