I'm probably just missing something.. but I have a...
# general
a
I'm probably just missing something.. but I have an
aws.appautoscaling.Target
, an
aws.appautoscaling.Policy
that's set to
StepScaling
and a
aws.cloudwatch.MetricAlarm
that has its
alarmActions
set to the ARN of the policy... pulumi compiles just fine, I see the resources in the stack.. but like.. I DONT see the autoscaling policy attached to the cluster in the AWS console and I'm not totally sure why. I've been staring at this for a couple hours, so I'm just kinda stepping away to clear my head before I jump back to it.
b
attached to which cluster?
a
The
aws.appautoscaling.Target
sets the resourceId (service/cluster_name/service_name) and the
aws.appautoscaling.Policy
references that as well
b
sorry, i should have been clearer. This is an ECS cluster?
EKS?
a
Sorry yes, it's an ECS (Fargate) cluster
b
can you share your
aws.appautoscaling.Target
resource code?
a
Copy code
const cpuStepScalingTarget = new aws.appautoscaling.Target("ecsTarget", {
  maxCapacity: 5,
  minCapacity: 1,
  serviceNamespace: "ecs",
  resourceId: pulumi.interpolate`service/${app.cluster.cluster.name}/${app.service.name}`,
  scalableDimension: "ecs:service:DesiredCount",
});
Where
app
is
awsx.ecs.FargateService
that is successfully being created.
b
hmm, I can't see any immediate issue...I'll see if I can find some time to repro later
a
Thanks! I really appreciate it. I'm going to step away from my computer for a bit cause I have no idea why this isn't working =p so I'm just going to try and clear my head and come back to it. At this point I'm convinced it's something silly 😄