-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutputs.tf
More file actions
74 lines (70 loc) · 3.5 KB
/
outputs.tf
File metadata and controls
74 lines (70 loc) · 3.5 KB
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
output "vmanage_urls" {
description = "vManage management public IPs. Use these as the primary HTTPS entry points."
value = {
for key, node in local.vmanage_nodes :
key => {
hostname = node.hostname
management_ip = node.mgmt_ip
management_public_ip = try(stackit_public_ip.controller_management[key].ip, null)
transport_ip = node.transport_ip
transport_public_ip = try(stackit_public_ip.controller_transport[key].ip, null)
cluster_ip = node.cluster_ip
url = try(format("https://%s", coalesce(try(stackit_public_ip.controller_management[key].ip, null), try(stackit_public_ip.controller_transport[key].ip, null))), null)
}
}
}
output "controller_inventory" {
description = "Private and public addressing for controller nodes."
value = {
for key, node in local.controller_nodes :
key => {
hostname = node.hostname
role = node.role
management_ip = node.mgmt_ip
management_public_ip = try(stackit_public_ip.controller_management[key].ip, null)
transport_ip = node.transport_ip
transport_public_ip = try(stackit_public_ip.controller_transport[key].ip, null)
cluster_ip = try(node.cluster_ip, null)
system_ip = node.system_ip
site_id = node.site_id
server_id = try(stackit_server.controller[key].server_id, null)
}
}
}
output "network_inventory" {
description = "Resolved STACKIT network prefixes, gateways, nameservers, and routing properties."
value = {
management = {
prefix = local.management_prefix
gateway = stackit_network.management.ipv4_gateway
nameservers = stackit_network.management.ipv4_nameservers
public_ip = stackit_network.management.public_ip
routed = stackit_network.management.routed
}
transport = {
prefix = local.transport_prefix
gateway = stackit_network.transport.ipv4_gateway
nameservers = stackit_network.transport.ipv4_nameservers
public_ip = stackit_network.transport.public_ip
routed = stackit_network.transport.routed
}
cluster = {
prefix = local.cluster_prefix
gateway = stackit_network.cluster.ipv4_gateway
nameservers = stackit_network.cluster.ipv4_nameservers
public_ip = try(stackit_network.cluster.public_ip, null)
routed = stackit_network.cluster.routed
}
}
}
output "primary_vbond_transport_ip" {
description = "Private transport IP used by the day-0 bootstrap as the initial vBond target."
value = local.primary_vbond_transport_ip
}
output "certificate_flow_notice" {
description = "Post-deploy certificate guidance for the currently selected controller certificate method."
value = var.controller_certificate_method == "cisco_pki" ? format(
"controller_certificate_method is cisco_pki. After terraform apply and data-disk formatting, run ./scripts/stackit_cluster_certificate.py. It will form the vManage cluster first and then continue into the Cisco PKI certificate flow. Have a Cisco Smart Account username/password ready, and ensure the Cisco Smart Account organization matches organization_name=%s.",
var.organization_name
) : "controller_certificate_method is enterprise_local. After terraform apply and data-disk formatting, run ./scripts/stackit_cluster_certificate.py to form the vManage cluster and then complete the enterprise-local controller certificate flow."
}