-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
outputs.tf
76 lines (64 loc) · 2.03 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
output "arn" {
description = "The Amazon Resource Name (ARN) of the load balancer."
value = aws_lb.this.arn
}
output "arn_suffix" {
description = "The ARN suffix for use with CloudWatch Metrics."
value = aws_lb.this.arn_suffix
}
output "id" {
description = "The ID of the load balancer."
value = aws_lb.this.id
}
output "name" {
description = "The name of the load balancer."
value = aws_lb.this.name
}
output "type" {
description = "The type of the load balancer. Always return `GATEWAY`."
value = local.load_balancer_type
}
output "availability_zone_ids" {
description = "A list of the Availability Zone IDs which are used by the load balancer."
value = local.availability_zone_ids
}
output "vpc_id" {
description = "The VPC ID of the load balancer."
value = aws_lb.this.vpc_id
}
output "subnets" {
description = "A list of subnet IDs attached to the load balancer."
value = aws_lb.this.subnets
}
output "network_mapping" {
description = "The configuration for the load balancer how routes traffic to targets in which subnets and IP address settings."
value = local.network_mapping
}
output "attributes" {
description = "Load Balancer Attributes that applied to the gateway load balancer."
value = {
cross_zone_load_balancing_enabled = aws_lb.this.enable_cross_zone_load_balancing
deletion_protection_enabled = aws_lb.this.enable_deletion_protection
}
}
output "listeners" {
description = "Listeners of the load balancer."
value = length(var.listeners) > 0 ? {
(var.listeners[0].port) = {
id = aws_lb_listener.this[0].id
arn = aws_lb_listener.this[0].arn
name = "${var.name}/GENEVE:${var.listeners[0].port}"
port = var.listeners[0].port
protocol = "GENEVE"
default_action = {
type = "FORWARD"
forward = {
target_group = {
arn = var.listeners[0].target_group
name = split("/", var.listeners[0].target_group)[1]
}
}
}
}
} : {}
}