dcl-ops-lib 6.10.5 → 6.10.7

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.
@@ -379,12 +379,14 @@ function createInternalService(config) {
379
379
  });
380
380
  }
381
381
  function setAutoscaling(service, config) {
382
- const ecsTarget = new aws.appautoscaling.Target(`ecs-target-asset-bundle-windows-converter-dev`, {
382
+ const serviceId = service.id.apply((id) => {
383
+ return id.split(':').pop();
384
+ });
385
+ console.log({ serviceId });
386
+ const ecsTarget = new aws.appautoscaling.Target(`ecs-target-${serviceId}`, {
383
387
  maxCapacity: config.maxCapacity,
384
388
  minCapacity: config.desiredCount,
385
- resourceId: service.id.apply((id) => {
386
- return id.split(':').pop();
387
- }),
389
+ resourceId: serviceId,
388
390
  scalableDimension: "ecs:service:DesiredCount",
389
391
  serviceNamespace: "ecs",
390
392
  });
@@ -404,13 +406,10 @@ function setAutoscaling(service, config) {
404
406
  if (config.metricName === "ApproximateNumberOfMessagesVisible") {
405
407
  TTS_CustomizedMetricSpecification = CSM_ApproximateNumberOfMessagesVisible;
406
408
  }
407
- return new aws.appautoscaling.Policy(`ecs-autoscaling-policy-asset-bundle-converter-windows-dev`, {
409
+ return new aws.appautoscaling.Policy(`ecs-autoscaling-policy-${serviceId}`, {
408
410
  policyType: "TargetTrackingScaling",
409
411
  resourceId: ecsTarget.resourceId,
410
- scalableDimension: ecsTarget.scalableDimension.apply((value) => {
411
- console.log({ scalableDimension: value });
412
- return value;
413
- }),
412
+ scalableDimension: pulumi.interpolate `${ecsTarget.scalableDimension}`,
414
413
  serviceNamespace: "ecs",
415
414
  targetTrackingScalingPolicyConfiguration: {
416
415
  targetValue: config.targetValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcl-ops-lib",
3
- "version": "6.10.5",
3
+ "version": "6.10.7",
4
4
  "scripts": {
5
5
  "build": "tsc && cp bin/* . && node test.js",
6
6
  "clean": "rm *.d.ts *.js *.js.map"