(aws-ecs): ecs.Cluster.fromClusterAttributes: Allow adding capacity providers on imported clusters
See original GitHub issueAdd capacity providers from another stack.
Use Case
The cluster can receive more than one capacity provider, so it may be necessary during the cluster lifetime to add these capacity providers from other stacks.
Proposed Solution
When using the fromClusterAttributes method, the returned object, ImportedCluster, must allow the addition of capacity providers.
Other
const cluster = ecs.Cluster.fromClusterAttributes(this, 'EcsCluster', {
vpc,
clusterName: props.clusterName,
securityGroups: [asgSecurityGroup]
});
const capacityProvider = new ecs.AsgCapacityProvider(this, 'AsgCapacityProvider', {
autoScalingGroup,
});
cluster.addAsgCapacityProvider(capacityProvider);
Obs.: Similar to https://github.com/aws/aws-cdk/issues/5383
- 👋 I may be able to implement this feature request
- ⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:5 (1 by maintainers)
Top Results From Across the Web
class Cluster (construct) · AWS CDK
This method adds compute capacity to a cluster by creating an AutoScalingGroup with the specified options. Returns the AutoScalingGroup so you can add...
Read more >Deploy Fargate Capacity Provider Strategy
Enable Fargate capacity provider on existing cluster. First, we will update our ECS cluster to enable the fargate capacity provider.
Read more >aws_ecs_cluster | Resources | hashicorp/aws
Provides an ECS cluster. NOTE on Clusters and Cluster Capacity Providers: Terraform provides both a standalone aws_ecs_cluster_capacity_providers resource, ...
Read more >awsecs - Go Packages
An Auto Scaling Group Capacity Provider. This allows an ECS cluster to target a specific EC2 Auto Scaling Group for the placement of...
Read more >@aws-cdk/aws-ecs | Yarn - Package Manager
declare const vpc: ec2.Vpc; // Create an ECS cluster const cluster = new ecs.Cluster(this, 'Cluster', { vpc, }); // Add capacity to it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not sure why this was closed…
+1 Would be nice to have this feature. cc @uttarasridhar @drigos