dcl-ops-lib 6.8.9 → 6.8.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.
- package/createFargateTask.js +7 -6
- package/package.json +1 -1
package/createFargateTask.js
CHANGED
|
@@ -379,11 +379,12 @@ function createInternalService(config) {
|
|
|
379
379
|
return service;
|
|
380
380
|
});
|
|
381
381
|
}
|
|
382
|
-
function setAutoscaling(
|
|
383
|
-
const
|
|
382
|
+
function setAutoscaling(service, config) {
|
|
383
|
+
const serviceId = service.id.apply((id) => id);
|
|
384
|
+
const ecsTarget = new aws.appautoscaling.Target(`ecs-target-${serviceId}`, {
|
|
384
385
|
maxCapacity: config.maxCapacity,
|
|
385
386
|
minCapacity: config.desiredCount,
|
|
386
|
-
resourceId:
|
|
387
|
+
resourceId: serviceId,
|
|
387
388
|
scalableDimension: "ecs:service:DesiredCount",
|
|
388
389
|
serviceNamespace: "ecs",
|
|
389
390
|
});
|
|
@@ -393,7 +394,7 @@ function setAutoscaling(_, config) {
|
|
|
393
394
|
dimensions: [
|
|
394
395
|
{
|
|
395
396
|
name: "QueueName",
|
|
396
|
-
value: config.metricDimensionValue
|
|
397
|
+
value: config.metricDimensionValue,
|
|
397
398
|
},
|
|
398
399
|
],
|
|
399
400
|
statistic: config.statistic,
|
|
@@ -406,8 +407,8 @@ function setAutoscaling(_, config) {
|
|
|
406
407
|
return new aws.appautoscaling.Policy(`ecs-autoscaling-policy-asset-bundle-converter-dev`, {
|
|
407
408
|
policyType: "TargetTrackingScaling",
|
|
408
409
|
resourceId: ecsTarget.resourceId,
|
|
409
|
-
scalableDimension:
|
|
410
|
-
serviceNamespace:
|
|
410
|
+
scalableDimension: ecsTarget.scalableDimension,
|
|
411
|
+
serviceNamespace: ecsTarget.serviceNamespace,
|
|
411
412
|
targetTrackingScalingPolicyConfiguration: {
|
|
412
413
|
targetValue: config.targetValue,
|
|
413
414
|
customizedMetricSpecification: TTS_CustomizedMetricSpecification,
|