-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathoutputs.tf
45 lines (36 loc) · 1.11 KB
/
outputs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
Module: ECS-Fargate-APPMESH
Version: 1.0.0
This file defines the output variables for this module
*/
// ECS output variables
output "ecs_cluster_arn" {
description = "ECS cluster arn"
value = aws_ecs_cluster.main.arn
}
output "ecs_service_arn" {
description = "ECS service arn"
value = aws_ecs_service.main.id
}
// ECR output variables
output "ecr_repo_url" {
description = "ECR repo url"
value = length(aws_ecr_repository.ecr_repo) == 1 ? aws_ecr_repository.ecr_repo[0].repository_url : ""
}
output "ecr_repo_name" {
description = "ECR repo name"
value = length(aws_ecr_repository.ecr_repo) == 1 ? aws_ecr_repository.ecr_repo[0].repository_url : ""
}
// load balancer variables
output "nlb_arn" {
value = var.virtual_gateway_arn == "none" ? "" : aws_lb.main[0].arn
}
output "nlb_dns_name" {
value = var.virtual_gateway_arn == "none" ? "" : aws_lb.main[0].dns_name
}
output "nlb_zone_id" {
value = var.virtual_gateway_arn == "none" ? "" : aws_lb.main[0].zone_id
}
output "target_group_arn" {
value = var.virtual_gateway_arn == "none" ? "" : aws_lb_target_group.main[0].arn
}