Skip to content

Commit

Permalink
add placement strat.
Browse files Browse the repository at this point in the history
  • Loading branch information
TerribleDev committed May 1, 2017
1 parent c26fcad commit 196a57a
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 196a57a

Please sign in to comment.