Skip to content

Commit f943ae7

Browse files
committed
fix: 워크플로에서 필요한 output 값 정의
1 parent 546072b commit f943ae7

File tree

5 files changed

+35
-1
lines changed

5 files changed

+35
-1
lines changed

terraform/dev/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.dev : k => v.name
4+
}
5+
}

terraform/dev/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.dev : k => v.family
11+
}
12+
}

terraform/dev/outputs.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,16 @@ output "ecs_task_definitions_check" {
44

55
output "ecr_repository_name" {
66
value = data.terraform_remote_state.bootstrap.outputs.ecr_repo_names["dev"]
7+
}
8+
9+
output "ecs_cluster_name" {
10+
value = module.ecs.cluster_name
11+
}
12+
13+
output "ecs_api_service_name" {
14+
value = module.ecs.service_names["api-dev"]
15+
}
16+
17+
output "ecs_api_container_name" {
18+
value = module.ecs.container_names["api-dev"]
719
}

terraform/prod/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
output "ecr_repository_name" {
2-
value = data.terraform_remote_state.bootstrap.outputs.ecr_repo_name["prod"]
2+
value = data.terraform_remote_state.bootstrap.outputs.ecr_repo_names["prod"]
33
}

0 commit comments

Comments
 (0)