@gradientedge/cdk-utils 7.6.0 → 7.7.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.
@@ -137,19 +137,23 @@ class EcsManager {
137
137
  if (!props.taskImageOptions)
138
138
  throw `TaskImageOptions for EcsLoadbalanced Fargate Serivice props undefined`;
139
139
  const fargateService = new ecsPatterns.ApplicationLoadBalancedFargateService(scope, `${id}-ecs-service`, {
140
- cluster: cluster,
141
- desiredCount: props.desiredCount,
142
- enableECSManagedTags: true,
143
- serviceName: `${id}-${scope.props.stage}`,
140
+ assignPublicIp: props.assignPublicIp ?? true,
144
141
  certificate: props.certificate,
142
+ cluster: cluster,
145
143
  cpu: props.cpu,
146
- loadBalancerName: `${id}-${scope.props.stage}`,
144
+ desiredCount: props.desiredCount,
147
145
  domainName: props.domainName,
148
146
  domainZone: props.domainZone,
147
+ enableECSManagedTags: true,
148
+ healthCheckGracePeriod: props.healthCheckGracePeriod ?? cdk.Duration.seconds(60),
149
149
  listenerPort: props.listenerPort,
150
+ loadBalancerName: `${id}-${scope.props.stage}`,
150
151
  memoryLimitMiB: props.memoryLimitMiB,
151
- healthCheckGracePeriod: props.healthCheckGracePeriod ?? cdk.Duration.seconds(60),
152
- assignPublicIp: props.assignPublicIp ?? true,
152
+ runtimePlatform: {
153
+ operatingSystemFamily: props.runtimePlatform?.operatingSystemFamily ?? ecs.OperatingSystemFamily.LINUX,
154
+ cpuArchitecture: props.runtimePlatform?.cpuArchitecture ?? ecs.CpuArchitecture.ARM64,
155
+ },
156
+ serviceName: `${id}-${scope.props.stage}`,
153
157
  taskImageOptions: {
154
158
  enableLogging: props.taskImageOptions?.enableLogging ?? true,
155
159
  logDriver: props.taskImageOptions?.logDriver ??
@@ -168,15 +172,15 @@ class EcsManager {
168
172
  if (props.healthCheck) {
169
173
  fargateService.targetGroup.configureHealthCheck({
170
174
  enabled: props.healthCheck.enabled ?? true,
175
+ healthyGrpcCodes: props.healthCheck.healthyGrpcCodes,
176
+ healthyHttpCodes: props.healthCheck.healthyHttpCodes,
177
+ healthyThresholdCount: props.healthCheck.healthyThresholdCount,
178
+ interval: props.healthCheck.interval ?? cdk.Duration.seconds(props.healthCheck.intervalInSecs),
171
179
  path: props.healthCheck.path ?? '/',
172
180
  port: props.healthCheck.port,
173
- interval: props.healthCheck.interval ?? cdk.Duration.seconds(props.healthCheck.intervalInSecs),
181
+ protocol: props.healthCheck.protocol,
174
182
  timeout: props.healthCheck.timeout ?? cdk.Duration.seconds(props.healthCheck.timeoutInSecs),
175
- healthyThresholdCount: props.healthCheck.healthyThresholdCount,
176
183
  unhealthyThresholdCount: props.healthCheck.unhealthyThresholdCount,
177
- healthyGrpcCodes: props.healthCheck.healthyGrpcCodes,
178
- healthyHttpCodes: props.healthCheck.healthyHttpCodes,
179
- protocol: props.healthCheck.protocol,
180
184
  });
181
185
  }
182
186
  return fargateService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils",
3
- "version": "7.6.0",
3
+ "version": "7.7.0",
4
4
  "description": "Utilities for AWS CDK provisioning",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -139,19 +139,23 @@ export class EcsManager {
139
139
  if (!props.taskImageOptions) throw `TaskImageOptions for EcsLoadbalanced Fargate Serivice props undefined`
140
140
 
141
141
  const fargateService = new ecsPatterns.ApplicationLoadBalancedFargateService(scope, `${id}-ecs-service`, {
142
- cluster: cluster,
143
- desiredCount: props.desiredCount,
144
- enableECSManagedTags: true,
145
- serviceName: `${id}-${scope.props.stage}`,
142
+ assignPublicIp: props.assignPublicIp ?? true,
146
143
  certificate: props.certificate,
144
+ cluster: cluster,
147
145
  cpu: props.cpu,
148
- loadBalancerName: `${id}-${scope.props.stage}`,
146
+ desiredCount: props.desiredCount,
149
147
  domainName: props.domainName,
150
148
  domainZone: props.domainZone,
149
+ enableECSManagedTags: true,
150
+ healthCheckGracePeriod: props.healthCheckGracePeriod ?? cdk.Duration.seconds(60),
151
151
  listenerPort: props.listenerPort,
152
+ loadBalancerName: `${id}-${scope.props.stage}`,
152
153
  memoryLimitMiB: props.memoryLimitMiB,
153
- healthCheckGracePeriod: props.healthCheckGracePeriod ?? cdk.Duration.seconds(60),
154
- assignPublicIp: props.assignPublicIp ?? true,
154
+ runtimePlatform: {
155
+ operatingSystemFamily: props.runtimePlatform?.operatingSystemFamily ?? ecs.OperatingSystemFamily.LINUX,
156
+ cpuArchitecture: props.runtimePlatform?.cpuArchitecture ?? ecs.CpuArchitecture.ARM64,
157
+ },
158
+ serviceName: `${id}-${scope.props.stage}`,
155
159
  taskImageOptions: {
156
160
  enableLogging: props.taskImageOptions?.enableLogging ?? true,
157
161
  logDriver:
@@ -172,15 +176,15 @@ export class EcsManager {
172
176
  if (props.healthCheck) {
173
177
  fargateService.targetGroup.configureHealthCheck({
174
178
  enabled: props.healthCheck.enabled ?? true,
179
+ healthyGrpcCodes: props.healthCheck.healthyGrpcCodes,
180
+ healthyHttpCodes: props.healthCheck.healthyHttpCodes,
181
+ healthyThresholdCount: props.healthCheck.healthyThresholdCount,
182
+ interval: props.healthCheck.interval ?? cdk.Duration.seconds(props.healthCheck.intervalInSecs),
175
183
  path: props.healthCheck.path ?? '/',
176
184
  port: props.healthCheck.port,
177
- interval: props.healthCheck.interval ?? cdk.Duration.seconds(props.healthCheck.intervalInSecs),
185
+ protocol: props.healthCheck.protocol,
178
186
  timeout: props.healthCheck.timeout ?? cdk.Duration.seconds(props.healthCheck.timeoutInSecs),
179
- healthyThresholdCount: props.healthCheck.healthyThresholdCount,
180
187
  unhealthyThresholdCount: props.healthCheck.unhealthyThresholdCount,
181
- healthyGrpcCodes: props.healthCheck.healthyGrpcCodes,
182
- healthyHttpCodes: props.healthCheck.healthyHttpCodes,
183
- protocol: props.healthCheck.protocol,
184
188
  })
185
189
  }
186
190