Title -> AWS::ECS::Service-DesiredCount-should be completely optional
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.
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.
Title -> AWS::ECS::Service-DesiredCount-should be completely optional
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.
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.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
Category tag (optional) -> Compute