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