~damien/infrastructure

ref: 41e11f7d9d43ebc929aa90dbe0827d12a680ae64 infrastructure/terraform/outputs.tf -rw-r--r-- 830 bytes
41e11f7d — Damien Radtke Use blue-green terraform strategy for cluster upgrades a month ago
                                                                                
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
// TODO: standardize output names?

output "consul_server_ips" {
  value = compact(flatten([
		[for ip in module.cluster-blue.consul-servers[*].ipv6 : split("/", ip)[0]],
	]))
}

output "nomad_server_ips" {
  value = compact(flatten([
		[for ip in module.cluster-blue.nomad-servers[*].ipv6 : split("/", ip)[0]],
	]))
}

output "nomad_client_ips" {
  /*
	value = concat(
		[for ip in module.nomad-client.instances[*].ipv6: split("/", ip)[0]],
		[for ip in module.nomad-client-load-balancer.instances[*].ipv6: split("/", ip)[0]],
	)
	*/
  value = flatten(concat(
    module.cluster-blue.nomad-clients[*].ip_address,
    module.cluster-blue.nomad-client-load-balancers[*].ip_address,
  ))
}

output "vault_server_ips" {
  value = compact(flatten([
		[for ip in module.cluster-blue.vault-servers[*].ipv6 : split("/", ip)[0]],
	]))
}