aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.11k stars 56 forks source link

AWS::ECS::Service-DesiredCount-should be completely optional #187

Closed pgarbe closed 5 years ago

pgarbe commented 5 years ago
  1. Title -> AWS::ECS::Service-DesiredCount-should be completely optional

  2. Scope of request -> AWS::ECS::Service-DesiredCount is mandatory when the resource gets created. When the resource is updated, it's optional.

The problem is, that if something else of the Resource changes (e.g. tags are modified), CloudFormation overwrites the DesiredCount, even if it was changed due AutoScaling. This leads to situations where the number of running tasks can be scaled down immediately from like 100 to 2.

There's no real workaround , as Cfn does not provide a conditional value based when the stack gets created or updated.

  1. Expected behavior -> DesiredCount should be completely optional. If it's not defined the default should be the min value of the attached autoscaling (or 0 if there's no autoscaling). An alternative could be to introduce another variable InitialDesiredCount which explicitly sets the DesiredCount when the Service gets created.

  2. Links to existing API doc (optional) -> api docs at https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html#ECS-CreateService-request-desiredCount and https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateService.html#ECS-UpdateService-request-desiredCount

  3. Category tag (optional) -> Compute

pgarbe commented 5 years ago

Closed in favor of https://github.com/aws/containers-roadmap/issues/493