forked from terraform-aws-modules/terraform-aws-alb
-
Notifications
You must be signed in to change notification settings - Fork 6
/
outputs.tf
132 lines (108 loc) · 4.38 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
//
// LB attributes
//
output "arn" {
description = "ARN of the LB itself. Useful for debug output, for example when attaching a WAF."
value = "${element(concat(aws_lb.application.*.arn, aws_lb.network.*.arn, list("")), 0)}"
}
output "arn_suffix" {
description = "ARN suffix of the LB itself. Useful for debug output, for example when attaching a WAF."
value = "${element(concat(aws_lb.application.*.arn_suffix, aws_lb.network.*.arn_suffix, list("")), 0)}"
}
output "dns_name" {
description = "The DNS name of the LB presumably to be used with a friendlier CNAME."
value = "${element(concat(aws_lb.application.*.dns_name, aws_lb.network.*.dns_name, list("")), 0)}"
}
output "id" {
description = "The ID of the LB we created."
value = "${element(concat(aws_lb.application.*.id, aws_lb.network.*.id, list("")), 0)}"
}
output "zone_id" {
description = "The zone_id of the LB to assist with creating DNS records."
value = "${element(concat(aws_lb.application.*.zone_id, aws_lb.network.*.zone_id, list("")), 0)}"
}
# arn_suffix
# canonical_hosted_zone_id
//
// LB Listener attributes
//
output "listener_http_arns" {
description = "The ARNs of the HTTP LB Listeners"
value = "${aws_lb_listener.http.*.arn}"
}
output "listener_http_ids" {
description = "The IDs of the HTTP LB Listeners"
value = "${aws_lb_listener.http.*.id}"
}
output "listener_https_arns" {
description = "The ARNs of the HTTPS LB Listeners"
value = "${aws_lb_listener.https.*.arn}"
}
output "listener_https_ids" {
description = "The IDs of the HTTPS LB Listeners"
value = "${aws_lb_listener.https.*.id}"
}
output "listener_tcp_arns" {
description = "The ARNs of the network TCP LB Listeners"
value = "${aws_lb_listener.network.*.arn}"
}
output "listener_tcp_ids" {
description = "The IDs of the network TCP LB Listeners"
value = "${aws_lb_listener.network.*.id}"
}
output "listener_arns" {
description = "ARNs of all the LB Listeners"
value = "${compact(concat(aws_lb_listener.http.*.arn,aws_lb_listener.https.*.arn,aws_lb_listener.network.*.arn))}"
}
output "listener_ids" {
description = "IDs of all the LB Listeners"
value = "${compact(concat(aws_lb_listener.http.*.id,aws_lb_listener.https.*.id,aws_lb_listener.network.*.id))}"
}
//
// LB Target Group attributes
//
output "target_group_http_arns" {
description = "ARNs of the HTTP target groups. Useful for passing to your Auto Scaling group module."
value = "${aws_lb_target_group.application-http.*.arn}"
}
output "target_group_https_arns" {
description = "ARNs of the HTTPS target groups. Useful for passing to your Auto Scaling group module."
value = "${aws_lb_target_group.application-https.*.arn}"
}
output "target_group_tcp_arns" {
description = "ARNs of the TCP target groups. Useful for passing to your Auto Scaling group module."
value = "${aws_lb_target_group.network.*.arn}"
}
output "target_group_arns" {
description = "ARNs of all the target groups. Useful for passing to your Auto Scaling group module."
value = "${compact(concat(aws_lb_target_group.application-http.*.arn,aws_lb_target_group.application-https.*.arn,aws_lb_target_group.network.*.arn))}"
}
output "target_group_arns_suffix" {
description = "ARNs suffix of all the target groups. Useful for passing to your Auto Scaling group module."
value = "${compact(concat(aws_lb_target_group.application-http.*.arn_suffix,aws_lb_target_group.application-https.*.arn_suffix,aws_lb_target_group.network.*.arn_suffix))}"
}
output "target_group_http_ids" {
description = "IDs of the HTTP target groups"
value = "${aws_lb_target_group.application-http.*.id}"
}
output "target_group_https_ids" {
description = "IDs of the HTTPS target groups"
value = "${aws_lb_target_group.application-https.*.id}"
}
output "target_group_tcp_ids" {
description = "IDs of the TCP target groups"
value = "${aws_lb_target_group.network.*.id}"
}
output "target_group_ids" {
description = "IDs of all the target groups"
value = "${compact(concat(aws_lb_target_group.application-http.*.id,aws_lb_target_group.application-https.*.id,aws_lb_target_group.network.*.id))}"
}
# arn_suffix
# name
//
// Misc
//
output "principal_account_id" {
description = "The AWS-owned account given permissions to write your LB logs to S3."
value = "${data.aws_elb_service_account.main.id}"
}