From 7d916541769de02218f112a982e681273fa0bb6e Mon Sep 17 00:00:00 2001 From: Allan Denot Date: Mon, 2 Jul 2018 17:07:01 +1000 Subject: [PATCH] Adding max and min health percent for ECS deployments (no LB services for now) --- scripts/ecs-cluster-application-version.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/ecs-cluster-application-version.yml b/scripts/ecs-cluster-application-version.yml index 59e3786..8e3793c 100644 --- a/scripts/ecs-cluster-application-version.yml +++ b/scripts/ecs-cluster-application-version.yml @@ -83,6 +83,14 @@ Parameters: - None - ALB - NLB + DeploymentMaximum: + Description: ECS deployment maximum healthy percent + Type: Number + Default: 100 + DeploymentMinimum: + Description: ECS deployment minimum healthy percent + Type: Number + Default: 0 Conditions: isAutoscaling: !Equals [ !Ref Autoscaling, 'Enable'] @@ -153,6 +161,9 @@ Resources: Properties: TaskDefinition: !Ref TaskDefinitionArn DesiredCount: 1 + DeploymentConfiguration: + MaximumPercent: !Ref DeploymentMaximum + MinimumHealthyPercent: !Ref DeploymentMinimum Cluster: Fn::ImportValue: !Sub "ecs-${ClusterName}-ECSClusterArn"