Skip to content

Commit

Permalink
change inner logic for existant cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
ToROxI committed Feb 22, 2019
1 parent a0e6918 commit 570877a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ecs-cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resource "aws_ecs_cluster" "this" {

data "aws_ecs_cluster" "this" {
count = "${ var.use_existant_cluster ? 1 : 0 }"
cluster_name = "${var.project}-${var.environment}"
cluster_name = "${var.ecs_cluster_name}"
}

locals {
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ variable "ecs_cluster_id" {
default = "none"
}

variable "ecs_cluster_name" {
description = "Name of existing ECS cluster (if want to attach service and etc to existing cluster)"
default = "none"
}

variable "container_cpu" {
description = "Amount of cpu used by the task"
default = "512"
Expand Down

0 comments on commit 570877a

Please sign in to comment.