-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
outputs.tf
102 lines (88 loc) · 3.34 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
output "load_balancers" {
description = "The ARNs (Amazon Resource Name) of the load balancers associated with the target group."
value = aws_lb_target_group.this.load_balancer_arns
}
output "arn" {
description = "The Amazon Resource Name (ARN) of the target group."
value = aws_lb_target_group.this.arn
}
output "arn_suffix" {
description = "The ARN suffix for use with CloudWatch Metrics."
value = aws_lb_target_group.this.arn_suffix
}
output "id" {
description = "The ID of the target group."
value = aws_lb_target_group.this.id
}
output "name" {
description = "The name of the target group."
value = aws_lb_target_group.this.name
}
output "vpc_id" {
description = "The ID of the VPC which the target group belongs to."
value = aws_lb_target_group.this.vpc_id
}
output "type" {
description = "The target type of the target group."
value = upper(aws_lb_target_group.this.target_type)
}
output "ip_address_type" {
description = "The type of IP addresses used by the target group."
value = upper(aws_lb_target_group.this.ip_address_type)
}
output "port" {
description = "The port number on which the target receive trrafic."
value = aws_lb_target_group.this.port
}
output "protocol" {
description = "The protocol to use to connect with the target."
value = aws_lb_target_group.this.protocol
}
output "protocol_version" {
description = "The protocol version to use to send requests to targets."
value = aws_lb_target_group.this.protocol_version
}
output "targets" {
description = "A set of targets in the target group."
value = [
for target in aws_lb_target_group_attachment.this : {
ip_address = target.target_id
port = target.port
is_external = target.availability_zone == "all"
}
]
}
output "attributes" {
description = "Attributes of the Instance target group of network load balancer."
value = {
deregistration_delay = aws_lb_target_group.this.deregistration_delay
load_balancing = {
algorithm = upper(aws_lb_target_group.this.load_balancing_algorithm_type)
anomaly_mitigation_enabled = (var.load_balancing.algorithm == "WEIGHTED_RANDOM"
? var.load_balancing.anomaly_mitigation_enabled
: null
)
cross_zone_strategy = var.load_balancing.cross_zone_strategy
}
slow_start_duration = aws_lb_target_group.this.slow_start
stickiness = {
enabled = aws_lb_target_group.this.stickiness[0].enabled
type = upper(aws_lb_target_group.this.stickiness[0].type)
duration = aws_lb_target_group.this.stickiness[0].cookie_duration
cookie = var.stickiness_cookie
}
}
}
output "health_check" {
description = "Health Check configuration of the target group."
value = {
protocol = aws_lb_target_group.this.health_check[0].protocol
port = aws_lb_target_group.this.health_check[0].port
path = aws_lb_target_group.this.health_check[0].path
success_codes = aws_lb_target_group.this.health_check[0].matcher
healthy_threshold = aws_lb_target_group.this.health_check[0].healthy_threshold
unhealthy_threshold = aws_lb_target_group.this.health_check[0].unhealthy_threshold
interval = aws_lb_target_group.this.health_check[0].interval
timeout = aws_lb_target_group.this.health_check[0].timeout
}
}