Skip to content

Commit

Permalink
Merge pull request #10 from egarbi/ordered_placement_strategy
Browse files Browse the repository at this point in the history
This fixes strategies order also proper module notation in task
  • Loading branch information
egarbi authored May 21, 2018
2 parents 4a4a0a0 + 78e35f8 commit 54679bf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,17 @@ resource "aws_ecs_service" "main" {
desired_count = "${var.desired_count}"
iam_role = "${var.iam_role}"

placement_strategy {
ordered_placement_strategy {
type = "spread"
field = "attribute:ecs.availability-zone"
}

placement_strategy {
ordered_placement_strategy {
type = "binpack"
field = "cpu"
}

placement_strategy {
ordered_placement_strategy {
type = "binpack"
field = "memory"
}
Expand All @@ -178,7 +178,8 @@ resource "aws_ecs_service" "main" {
}

module "task" {
source = "git::https://github.com/egarbi/terraform-aws-task-definition?ref=1.0.0"
source = "egarbi/task-definition/aws"
version = "1.0.0"
name = "${var.name}-${var.environment}"
task_role = "${aws_iam_role.main.arn}"
container_definitions = "${var.container_definitions}"
Expand Down

0 comments on commit 54679bf

Please sign in to comment.