Skip to content

Commit

Permalink
Update service.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
georgepstaylor committed Nov 20, 2024
1 parent b9df1d4 commit 8ff4006
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions service/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
output "service_arn" {
value = var.ignore_changes ? aws_ecs_service.ignore_changes[0].id : aws_ecs_service.default[0].id
value = aws_ecs_service.default.id
description = "The ARN for the ECS Service"
}

output "task_definition_arn" {
value = var.ignore_changes ? aws_ecs_task_definition.ignore_changes[*].arn : aws_ecs_task_definition.default[*].arn
value = aws_ecs_task_definition.defaults.arn
description = "The ARN for the ECS Task Definition"
}

output "task_definition_string" {
value = var.ignore_changes ? "${aws_ecs_task_definition.ignore_changes[0].id}:${aws_ecs_task_definition.ignore_changes[0].revision}" : "${aws_ecs_task_definition.default[0].id}:${aws_ecs_task_definition.default[0].revision}"
value = "${aws_ecs_task_definition.default.id}:${aws_ecs_task_definition.default.revision}"
description = "The JSON formatted container definition"
}

2 changes: 1 addition & 1 deletion service/service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resource "aws_ecs_service" "default" {

cluster = var.cluster_arn

task_definition = var.ignore_changes ? aws_ecs_task_definition.ignore_changes[0].arn : aws_ecs_task_definition.default[0].arn
task_definition = aws_ecs_task_definition.default.arn

launch_type = "FARGATE"
network_configuration {
Expand Down

0 comments on commit 8ff4006

Please sign in to comment.