fix(aws-ecs): make Cluster.addAsgCapacityProvider() not need specify machineImageType
.
#16360
Closed
2 tasks
Labels
@aws-cdk/aws-ecs
Related to Amazon Elastic Container
feature-request
A feature should be added or improved.
Now
Cluster.addAsgCapacityProvider()
need to be specifiedmachineImageType
to determine whether it isMachineImageType.AMAZON_LINUX_2
orMachineImageType.BOTTLEROCKET
.But this approach is not very intuitive.
Because when you create
AsgCapacityProvider
, you already can specify themachineImageType
.But now you have to specify
machineImageType
once atCluster.addAsgCapacityProvider(capacityProviderBottlerocket, { machineImageType: ecs.MachineImageType.BOTTLEROCKET, })
again, which is very unintuitive.And if you create
Bottlerocket
autoscaling provider, but forgot to specifymachineImageType
atCluster.addAsgCapacityProvider()
,Bottlerocket
Node will failed to register to ecs cluster.root case is:
aws-cdk/packages/@aws-cdk/aws-ecs/lib/cluster.ts
Lines 357 to 388 in 174b066
Proposed Solution
Let
Cluster.addAsgCapacityProvider()
not need to specifymachineImageType
.Other
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: