forked from devops-workflow/terraform-aws-ecs-service
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoutputs.tf
142 lines (117 loc) · 3.83 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
//
// LB
//
output "lb_arn" {
description = "ARN of the LB"
value = "${module.lb.arn}"
}
output "lb_dns_aliases" {
description = "List of DNS aliases add for ALB"
value = "${module.route53-aliases.hostnames}"
}
output "lb_dns_name" {
description = "FQDN of ALB provisioned for service (if present)"
value = "${module.lb.dns_name}"
}
output "lb_zone_id" {
description = "Route 53 zone ID of ALB provisioned for service (if present)"
value = "${module.lb.zone_id}"
}
//
// LB Listener attributes
//
output "lb_listener_http_arns" {
description = "The ARNs of the HTTP LB Listeners"
value = "${module.lb.listener_http_arns}"
}
output "lb_listener_https_arns" {
description = "The ARNs of the HTTPS LB Listeners"
value = "${module.lb.listener_https_arns}"
}
output "lb_listener_tcp_arns" {
description = "The ARNs of the network TCP LB Listeners"
value = "${module.lb.listener_tcp_arns}"
}
output "lb_listener_arns" {
description = "ARNs of all the LB Listeners"
value = "${module.lb.listener_arns}"
}
//
// LB Target Group attributes
//
output "lb_target_group_http_arns" {
description = "ARNs of the HTTP target groups. Useful for passing to your Auto Scaling group module."
value = "${module.lb.target_group_http_arns}"
}
output "lb_target_group_https_arns" {
description = "ARNs of the HTTPS target groups. Useful for passing to your Auto Scaling group module."
value = "${module.lb.target_group_https_arns}"
}
output "lb_target_group_tcp_arns" {
description = "ARNs of the TCP target groups. Useful for passing to your Auto Scaling group module."
value = "${module.lb.target_group_tcp_arns}"
}
output "lb_target_group_arns" {
description = "ARNs of all the target groups. Useful for passing to your Auto Scaling group module."
value = "${module.lb.target_group_arns}"
}
output "lb_target_group_arns_suffix" {
description = "ARNs suffix of all the target groups. Useful for passing to your Auto Scaling group module."
value = "${module.lb.target_group_arns_suffix}"
}
//
output "log_group_name" {
description = "Cloudwatch log group name for service"
value = "${local.log_group_name}"
}
output "task_iam_role_arn" {
description = "ARN of the IAM Role for the ECS Task"
value = "${element(concat(aws_iam_role.task.*.arn, list("")), 0)}"
}
output "task_iam_role_name" {
description = "Name of the IAM Role for the ECS Task"
value = "${element(concat(aws_iam_role.task.*.name, list("")), 0)}"
}
output "service_iam_role_arn" {
description = "ARN of the IAM Role for the ECS Service"
value = "${element(concat(aws_iam_role.service.*.arn, list("")), 0)}"
}
output "service_iam_role_name" {
description = "Name of the IAM Role for the ECS Task"
value = "${element(concat(aws_iam_role.service.*.name, list("")), 0)}"
}
output "cluster_arn" {
description = "ECS cluster ARN"
value = "${element(concat(
aws_ecs_service.service-no-lb.*.cluster,
aws_ecs_service.service.*.cluster,
aws_ecs_service.service-no-lb-net.*.cluster,
aws_ecs_service.service-lb-net.*.cluster,
list("")), 0)}"
}
output "service_arn" {
description = "ECS service ARN"
value = "${element(concat(
aws_ecs_service.service-no-lb.*.id,
aws_ecs_service.service.*.id,
aws_ecs_service.service-no-lb-net.*.id,
aws_ecs_service.service-lb-net.*.id,
list("")), 0)}"
}
output "service_name" {
description = "ECS service name"
value = "${element(concat(
aws_ecs_service.service-no-lb.*.name,
aws_ecs_service.service.*.name,
aws_ecs_service.service-no-lb-net.*.name,
aws_ecs_service.service-lb-net.*.name,
list("")), 0)}"
}
output "container_json" {
description = ""
value = "${local.container_definitions}"
}
output "label" {
description = ""
value = "${module.label.tags}"
}