dcl-ops-lib 6.10.9 → 6.10.10

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.
@@ -373,23 +373,16 @@ function createInternalService(config) {
373
373
  ],
374
374
  }, Object.assign(Object.assign({}, extraOpts), { dependsOn }));
375
375
  if (!!appAutoscaling) {
376
- setAutoscaling(service, Object.assign(Object.assign({}, appAutoscaling), { desiredCount }));
376
+ setAutoscaling(service, serviceName, Object.assign(Object.assign({}, appAutoscaling), { desiredCount }));
377
377
  }
378
378
  return service;
379
379
  });
380
380
  }
381
- function setAutoscaling(service, config) {
382
- let serviceId = pulumi.interpolate `${service.id}`;
383
- console.log({
384
- serviceId,
385
- serviceIdType: typeof serviceId,
386
- serviceIdCasted: serviceId,
387
- serviceIdCastedType: typeof serviceId,
388
- });
389
- const ecsTarget = new aws.appautoscaling.Target(`ecs-target-${(serviceId)}`, {
381
+ function setAutoscaling(service, serviceName, config) {
382
+ const ecsTarget = new aws.appautoscaling.Target(`ecs-target-${(0, stack_1.getStackScopedName)(serviceName)}`, {
390
383
  maxCapacity: config.maxCapacity,
391
384
  minCapacity: config.desiredCount,
392
- resourceId: pulumi.interpolate `${serviceId}`,
385
+ resourceId: service.id,
393
386
  scalableDimension: "ecs:service:DesiredCount",
394
387
  serviceNamespace: "ecs",
395
388
  });
@@ -409,7 +402,7 @@ function setAutoscaling(service, config) {
409
402
  if (config.metricName === "ApproximateNumberOfMessagesVisible") {
410
403
  TTS_CustomizedMetricSpecification = CSM_ApproximateNumberOfMessagesVisible;
411
404
  }
412
- return new aws.appautoscaling.Policy(`ecs-autoscaling-policy-${(serviceId)}`, {
405
+ return new aws.appautoscaling.Policy(`ecs-autoscaling-policy-${(0, stack_1.getStackScopedName)(serviceName)}`, {
413
406
  policyType: "TargetTrackingScaling",
414
407
  resourceId: ecsTarget.resourceId,
415
408
  scalableDimension: pulumi.interpolate `${ecsTarget.scalableDimension}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcl-ops-lib",
3
- "version": "6.10.9",
3
+ "version": "6.10.10",
4
4
  "scripts": {
5
5
  "build": "tsc && cp bin/* . && node test.js",
6
6
  "clean": "rm *.d.ts *.js *.js.map"