From f4daf5856eb56b1f492e7fc080b14685d6fe6eee Mon Sep 17 00:00:00 2001 From: Robin Ramquist <80628178+robinelastisys@users.noreply.github.com> Date: Thu, 18 Aug 2022 09:56:43 +0200 Subject: [PATCH] Subnet setup order fix & Number of master nodes syntax fix (#9159) * Subnet setup order fix & Number of master nodes syntax fix * Mistake fix! * Formatting --- contrib/terraform/openstack/kubespray.tf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/terraform/openstack/kubespray.tf b/contrib/terraform/openstack/kubespray.tf index 8e09c0d95..92c4394da 100644 --- a/contrib/terraform/openstack/kubespray.tf +++ b/contrib/terraform/openstack/kubespray.tf @@ -96,6 +96,10 @@ module "compute" { network_router_id = module.network.router_id network_id = module.network.network_id use_existing_network = var.use_existing_network + + depends_on = [ + module.network.subnet_id + ] } output "private_subnet_id" { @@ -111,7 +115,7 @@ output "router_id" { } output "k8s_master_fips" { - value = concat(module.ips.k8s_master_fips, module.ips.k8s_master_no_etcd_fips) + value = var.number_of_k8s_masters + var.number_of_k8s_masters_no_etcd > 0 ? concat(module.ips.k8s_master_fips, module.ips.k8s_master_no_etcd_fips) : [for key, value in module.ips.k8s_masters_fips : value.address] } output "k8s_node_fips" {