dcl-ops-lib 8.3.0 → 8.3.1

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.
@@ -35,6 +35,7 @@ export type FargateTaskOptions = {
35
35
  essential?: boolean;
36
36
  command?: string[];
37
37
  extraExposedServiceOptions?: ExtraExposedServiceOptions;
38
+ forceNewDeployment?: boolean;
38
39
  extraPortMappings?: aws.ecs.PortMapping[];
39
40
  extraALBMappings?: ALBMapping[];
40
41
  executionRolePolicies?: Record<string, pulumi.Input<string> | aws.iam.Policy>;
@@ -74,7 +75,7 @@ export type FargateTaskOptions = {
74
75
  * Rate expressions - "rate(value unit)"
75
76
  * Cron expressions - "cron(fields)"
76
77
  * @type {string}
77
- */
78
+ */
78
79
  schedule: string;
79
80
  }[];
80
81
  };
@@ -123,6 +124,7 @@ export type InternalServiceOptions = {
123
124
  taskRole?: aws.iam.Role;
124
125
  containerInfo: aws.ecs.ContainerDefinition;
125
126
  assignPublicIp?: boolean;
127
+ forceNewDeployment?: boolean;
126
128
  dependsOn?: pulumi.Resource[];
127
129
  volumes?: pulumi.Input<aws.types.input.ecs.TaskDefinitionVolume[]>;
128
130
  team: string;
@@ -115,7 +115,7 @@ function getFargateTaskRole(name, policyArnNamedMap) {
115
115
  */
116
116
  function createFargateTask(serviceName, dockerImage, dockerListeningPort, environment, hostname, options) {
117
117
  return __awaiter(this, void 0, void 0, function* () {
118
- let { healthCheck, healthCheckContainer, essential, dontExpose, securityGroups, cluster, memoryReservation, command, version, ephemeralStorageInGB, desiredCount, cpuReservation, extraPortMappings, extraALBMappings, executionRolePolicies, taskRolePolicies, ignoreServiceDiscovery, secrets, metrics, dontAssignPublicIp, dependsOn, volumes, deregistrationDelay, mountPoints, repositoryCredentials, team, appAutoscaling, } = options;
118
+ let { healthCheck, healthCheckContainer, essential, dontExpose, securityGroups, cluster, memoryReservation, command, version, ephemeralStorageInGB, desiredCount, cpuReservation, extraPortMappings, extraALBMappings, executionRolePolicies, taskRolePolicies, ignoreServiceDiscovery, secrets, metrics, forceNewDeployment, dontAssignPublicIp, dependsOn, volumes, deregistrationDelay, mountPoints, repositoryCredentials, team, appAutoscaling, } = options;
119
119
  if (undefined === essential) {
120
120
  essential = true;
121
121
  }
@@ -217,6 +217,7 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
217
217
  taskRole,
218
218
  assignPublicIp: !dontAssignPublicIp,
219
219
  serviceDiscoveryPort,
220
+ forceNewDeployment,
220
221
  ignoreServiceDiscovery,
221
222
  securityGroups: [taskSecurityGroup.id, ...securityGroups],
222
223
  containerInfo: {
@@ -272,6 +273,7 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
272
273
  ephemeralStorageInGB,
273
274
  executionRole,
274
275
  taskRole,
276
+ forceNewDeployment,
275
277
  assignPublicIp: !dontAssignPublicIp,
276
278
  ignoreServiceDiscovery,
277
279
  securityGroups: [taskSecurityGroup.id, ...securityGroups],
@@ -304,7 +306,7 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
304
306
  function createInternalService(config) {
305
307
  return __awaiter(this, void 0, void 0, function* () {
306
308
  var _a, _b;
307
- let { serviceName, cluster, securityGroups, ignoreServiceDiscovery, serviceDiscoveryPort, desiredCount, executionRole, taskRole, containerInfo, assignPublicIp, dependsOn, volumes, team, targetGroups, runtimePlatform, ephemeralStorageInGB, appAutoscaling, } = config;
309
+ let { serviceName, cluster, securityGroups, ignoreServiceDiscovery, serviceDiscoveryPort, desiredCount, executionRole, taskRole, containerInfo, assignPublicIp, dependsOn, volumes, team, targetGroups, runtimePlatform, ephemeralStorageInGB, appAutoscaling, forceNewDeployment, } = config;
308
310
  if (!desiredCount && desiredCount !== 0)
309
311
  desiredCount = 1;
310
312
  assignPublicIp = !!assignPublicIp;
@@ -362,6 +364,7 @@ function createInternalService(config) {
362
364
  desiredCount,
363
365
  launchType: "FARGATE",
364
366
  enableEcsManagedTags: true,
367
+ forceNewDeployment,
365
368
  waitForSteadyState: false,
366
369
  taskDefinition: taskDefinition.arn,
367
370
  loadBalancers: [
@@ -380,7 +383,8 @@ function createInternalService(config) {
380
383
  }
381
384
  function setAutoscaling(service, serviceName, config) {
382
385
  var _a;
383
- if ((!config.appAutoscaling.policy && !config.appAutoscaling.scheduleAction) || (config.appAutoscaling.policy && config.appAutoscaling.scheduleAction)) {
386
+ if ((!config.appAutoscaling.policy && !config.appAutoscaling.scheduleAction) ||
387
+ (config.appAutoscaling.policy && config.appAutoscaling.scheduleAction)) {
384
388
  throw new Error("Invalid autoscaling configuration. You must provide either a policy OR a scheduleAction.");
385
389
  }
386
390
  const ecsTarget = new aws.appautoscaling.Target(`ecs-target-${(0, stack_1.getStackScopedName)(serviceName)}`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcl-ops-lib",
3
- "version": "8.3.0",
3
+ "version": "8.3.1",
4
4
  "scripts": {
5
5
  "build": "tsc && cp bin/* . && node test.js",
6
6
  "clean": "rm *.d.ts *.js *.js.map"