Skip to content

Commit

Permalink
Merge pull request #5 from Janus-vistaprint/placement
Browse files Browse the repository at this point in the history
add placement strat
  • Loading branch information
jcharette authored May 1, 2017
2 parents c26fcad + 196a57a commit 0b88171
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tf_ecs_default_service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ resource "aws_ecs_service" "svc" {
"aws_iam_role_policy.ecs_service",
"aws_alb_listener.front_end",
]


# We should spread across instances since we scale up or down on resources
placement_strategy {
type = "spread"
field = "instanceId"
}

lifecycle {
create_before_destroy = true
}
Expand Down
6 changes: 6 additions & 0 deletions tf_ecs_service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ resource "aws_ecs_service" "svc" {
"aws_alb_listener.front_end"
]

# We should spread across instances since we scale up or down on resources
placement_strategy {
type = "spread"
field = "instanceId"
}

lifecycle {
create_before_destroy = true
}
Expand Down

0 comments on commit 0b88171

Please sign in to comment.