-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
outputs.tf
84 lines (72 loc) · 2.67 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
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 "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 "targets" {
description = "A list of targets in the target group. The ALB target group is limited to a single Application Load Balancer target."
value = [
for idx, target in aws_lb_target_group_attachment.this : {
alb = {
arn = target.target_id
name = split("/", target.target_id)[2]
}
port = target.port
}
]
}
output "attributes" {
description = "Attributes of the ALB target group of network load balancer."
value = {
deregistration_delay = aws_lb_target_group.this.deregistration_delay
preserve_client_ip = aws_lb_target_group.this.preserve_client_ip
stickiness = {
enabled = aws_lb_target_group.this.stickiness[0].enabled
type = upper(aws_lb_target_group.this.stickiness[0].type)
}
}
}
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
}
}