Skip to content

Commit 778feaf

Browse files
authored
chore(ecs): remove deprecated method from readme (#20246)
This PR replace `cluster.addAutoScalingGroup()` to `cluster.addAsgCapacityProvider()` because `addAutoScalingGroup()` is deprecated. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent d4f96e9 commit 778feaf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/@aws-cdk/aws-ecs/README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ const autoScalingGroup = new autoscaling.AutoScalingGroup(this, 'ASG', {
139139
// ... other options here ...
140140
});
141141

142-
cluster.addAutoScalingGroup(autoScalingGroup);
142+
const capacityProvider = new ecs.AsgCapacityProvider(this, 'AsgCapacityProvider', {
143+
autoScalingGroup,
144+
});
145+
cluster.addAsgCapacityProvider(capacityProvider);
143146
```
144147

145148
If you omit the property `vpc`, the construct will create a new VPC with two AZs.

0 commit comments

Comments
 (0)