Skip to content

Commit c1e5cb8

Browse files
committed
fix: 워크플로에서 output 참조하도록 수정
1 parent fcf42b7 commit c1e5cb8

File tree

4 files changed

+34
-0
lines changed

4 files changed

+34
-0
lines changed

terraform/prod/ecs/outputs.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
output "cluster_name" {
2+
value = module.cluster.cluster_name
3+
}
4+
5+
output "service_names" {
6+
value = module.service.ecs_service_names
7+
}
8+
9+
output "container_names" {
10+
value = module.task.container_names
11+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
output "ecs_service_names" {
2+
value = {
3+
for k, v in aws_ecs_service.prod : k => v.name
4+
}
5+
}

terraform/prod/ecs/task/outputs.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ output "task_definition_arns" {
44
k => task.arn
55
}
66
}
7+
8+
output "container_names" {
9+
value = {
10+
for k, v in aws_ecs_task_definition.prod : k => v.family
11+
}
12+
}

terraform/prod/outputs.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
output "ecr_repository_name" {
22
value = data.terraform_remote_state.bootstrap.outputs.ecr_repo_names["prod"]
3+
}
4+
5+
output "ecs_cluster_name" {
6+
value = module.ecs.cluster_name
7+
}
8+
9+
output "ecs_api_service_name" {
10+
value = module.ecs.service_names["api-prod"]
11+
}
12+
13+
output "ecs_api_container_name" {
14+
value = module.ecs.container_names["api-prod"]
315
}

0 commit comments

Comments
 (0)