File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ resource "aws_ecs_service" "service" {
212212 ]
213213 name = var. name_prefix
214214 cluster = var. cluster_id
215- task_definition = aws_ecs_task_definition. task . arn
215+ task_definition = var . task_definition != " " ? var . task_definition : aws_ecs_task_definition. task . arn
216216 desired_count = var. desired_count
217217 launch_type = " FARGATE"
218218 deployment_minimum_healthy_percent = var. deployment_minimum_healthy_percent
Original file line number Diff line number Diff line change @@ -84,6 +84,12 @@ variable "task_container_protocol" {
8484 type = string
8585}
8686
87+ variable "task_definition" {
88+ description = " Provided task definition for the service."
89+ default = " "
90+ type = string
91+ }
92+
8793variable "task_definition_cpu" {
8894 description = " Amount of CPU to reserve for the task."
8995 default = 256
You can’t perform that action at this time.
0 commit comments