purple-shampoo-2675
05/03/2022, 3:08 PMawsx
to deploy EC2-backed ECS services (not Fargate_)_ and having trouble setting them up with proper capacity providers. They have an ASG (via cluster.createAutoScalingGroup(...)
) but by default the group doesn't scale for new deploys. I thought the answer might be to create an explicit aws.ecs.CapacityProvider
which will respond to task placement failures by provisioning new instances, but there seems to be a circular dependency between the different elements like so:
• awsx.ecs.Cluster
takes a capacityProviders
array on creation, but
• aws.ecs.CapacityProvider
needs the ARN of an autoscalingGroup
, but
• the autoscalingGroup
is created via cluster.createAutoScalingGroup(...)
which is not available until after the cluster is created.
I hope that's enough context! I can provide more code if that would be useful. Basically where I want to get to is an ASG with n
instances in, where every time a pulumi up
happens the group scales up to 2n
instances to place new tasks, then scales back down to n
instances, getting rid of the old ones. Right now pulumi up
completes successfully but new tasks don't happen unless I specify the ASG should be permanently twice as big as it needs to be.No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by