-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathoutputs.tf
98 lines (87 loc) · 2.86 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
# Copyright (c) 2020 Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
#########################
## LB
#########################
output "lb" {
description = "The returned resource attributes for the LB."
value = oci_load_balancer_load_balancer.this
}
output "lb_protocols" {
description = "The available protocols."
value = data.oci_load_balancer_protocols.this
}
output "lb_shapes" {
description = "Available LB shapes."
value = data.oci_load_balancer_shapes.this
}
output "certificates" {
description = "Certificates created/managed."
value = {
for x in oci_load_balancer_certificate.this:
x.certificate_name => x
}
}
output "backend_sets" {
description = "All of the Backend Sets created/managed."
value = merge(
{
for x in oci_load_balancer_backend_set.this_no_persistency_no_ssl:
x.name => merge( x, { backends = [ for i in oci_load_balancer_backend.this : i if i.backendset_name == x.name ] } )
},
{
for x in oci_load_balancer_backend_set.this_no_persistency_ssl:
x.name => merge( x, { backends = [ for i in oci_load_balancer_backend.this : i if i.backendset_name == x.name ] } )
},
{
for x in oci_load_balancer_backend_set.this_persistency_no_ssl:
x.name => merge( x, { backends = [ for i in oci_load_balancer_backend.this : i if i.backendset_name == x.name ] } )
},
{
for x in oci_load_balancer_backend_set.this_persistency_ssl:
# x.name => x
x.name => merge( x, { backends = [ for i in oci_load_balancer_backend.this : i if i.backendset_name == x.name ] } )
}
)
}
output "backends" {
description = "Backends created/managed."
value = {
for x in oci_load_balancer_backend.this:
"${x.ip_address}_${x.port}" => x
}
}
output "path_route_sets" {
description = "Path Route Sets created/managed."
value = {
for x in oci_load_balancer_path_route_set.this:
x.name => x
}
}
output "rule_sets" {
description = "Rule Sets created/managed."
value = {
for x in oci_load_balancer_rule_set.this:
x.name => x
}
}
output "listeners" {
description = "All of the Listeners created/managed."
value = merge(
{
for x in oci_load_balancer_listener.this_no_ssl:
x.name => merge( x, { hostnames = concat( [ for i in oci_load_balancer_hostname.this : i.hostname if i.name == "${x.name}_${i.hostname}" ] ) } )
},
{
for x in oci_load_balancer_listener.this_ssl:
x.name => merge( x, { hostnames = concat( [ for i in oci_load_balancer_hostname.this : i.hostname if i.name == "${x.name}_${i.hostname}" ] ) } )
}
)
}
output "hostnames" {
description = "Hostnames created/managed."
value = {
for x in oci_load_balancer_hostname.this:
x.name => x
}
}