Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #7 from dxw/feature/allow-setting-deployment-minim…
Browse files Browse the repository at this point in the history
…um-healthy-percent

(Feature) Allow setting deployment minimum healthy percent
  • Loading branch information
Stretch96 authored Jun 28, 2019
2 parents 82dfde9 + cd23957 commit 33d7e48
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ resource "aws_ecs_service" "main" {
cluster = "${var.ecs_cluster_id}"
task_definition = "${aws_ecs_task_definition.main.arn}"

deployment_minimum_healthy_percent = "${var.deployment_minimum_healthy_percent}"

health_check_grace_period_seconds = 30

load_balancer {
Expand All @@ -39,6 +41,8 @@ resource "aws_ecs_service" "main_awsvpc" {
cluster = "${var.ecs_cluster_id}"
task_definition = "${aws_ecs_task_definition.main.arn}"

deployment_minimum_healthy_percent = "${var.deployment_minimum_healthy_percent}"

health_check_grace_period_seconds = 30

load_balancer {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,9 @@ variable "container_port" {
type = "string"
default = ""
}

variable "deployment_minimum_healthy_percent" {
description = "The lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment."
type = "string"
default = "50"
}

0 comments on commit 33d7e48

Please sign in to comment.