forked from terraform-aws-modules/terraform-aws-alb
-
Notifications
You must be signed in to change notification settings - Fork 1
/
outputs.tf
78 lines (63 loc) · 2.47 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
output "lb_id" {
description = "The ID and ARN of the load balancer we created"
value = try(aws_lb.this[0].id, "")
}
output "lb_arn" {
description = "The ID and ARN of the load balancer we created"
value = try(aws_lb.this[0].arn, "")
}
output "lb_dns_name" {
description = "The DNS name of the load balancer"
value = try(aws_lb.this[0].dns_name, "")
}
output "lb_arn_suffix" {
description = "ARN suffix of our load balancer - can be used with CloudWatch"
value = try(aws_lb.this[0].arn_suffix, "")
}
output "lb_zone_id" {
description = "The zone_id of the load balancer to assist with creating DNS records"
value = try(aws_lb.this[0].zone_id, "")
}
output "http_tcp_listener_arns" {
description = "The ARN of the TCP and HTTP load balancer listeners created"
value = aws_lb_listener.frontend_http_tcp[*].arn
}
output "http_tcp_listener_ids" {
description = "The IDs of the TCP and HTTP load balancer listeners created"
value = aws_lb_listener.frontend_http_tcp[*].id
}
output "https_listener_arns" {
description = "The ARNs of the HTTPS load balancer listeners created"
value = aws_lb_listener.frontend_https[*].arn
}
output "https_listener_ids" {
description = "The IDs of the load balancer listeners created"
value = aws_lb_listener.frontend_https[*].id
}
output "target_group_arns" {
description = "ARNs of the target groups. Useful for passing to your Auto Scaling group"
value = aws_lb_target_group.main[*].arn
}
output "target_group_arn_suffixes" {
description = "ARN suffixes of our target groups - can be used with CloudWatch"
value = aws_lb_target_group.main[*].arn_suffix
}
output "target_group_names" {
description = "Name of the target group. Useful for passing to your CodeDeploy Deployment Group"
value = aws_lb_target_group.main[*].name
}
output "target_group_attachments" {
description = "ARNs of the target group attachment IDs"
value = { for k, v in aws_lb_target_group_attachment.this : k => v.id }
}
################################################################################
# Security Group
################################################################################
output "security_group_arn" {
description = "Amazon Resource Name (ARN) of the security group"
value = try(aws_security_group.this[0].arn, null)
}
output "security_group_id" {
description = "ID of the security group"
value = try(aws_security_group.this[0].id, null)
}