From 43ff2688f648581ca7c0aef0c83f4f3e68d15ba9 Mon Sep 17 00:00:00 2001 From: Andrea Zonca Date: Wed, 1 Mar 2023 17:08:27 -0800 Subject: [PATCH] Revert "use auto allocated network, bypass port creation." This reverts commit 16f011dec5a10b982c912447425f6e30c1f81be5. --- contrib/terraform/openstack/modules/compute/main.tf | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/contrib/terraform/openstack/modules/compute/main.tf b/contrib/terraform/openstack/modules/compute/main.tf index 0333c88e3e0..6c2b8ff186f 100644 --- a/contrib/terraform/openstack/modules/compute/main.tf +++ b/contrib/terraform/openstack/modules/compute/main.tf @@ -336,7 +336,7 @@ resource "openstack_compute_instance_v2" "k8s_master" { } network { - name = "auto_allocated_network" + port = element(openstack_networking_port_v2.k8s_master_port.*.id, count.index) } dynamic "scheduler_hints" { @@ -940,11 +940,10 @@ resource "openstack_networking_floatingip_associate_v2" "bastion" { } -resource "openstack_compute_floatingip_associate_v2" "k8s_master" { +resource "openstack_networking_floatingip_associate_v2" "k8s_master" { count = var.number_of_k8s_masters floating_ip = var.k8s_master_fips[count.index] - instance_id = element(openstack_compute_instance_v2.k8s_master.*.id, count.index) - wait_until_associated = true + port_id = element(openstack_networking_port_v2.k8s_master_port.*.id, count.index) } resource "openstack_networking_floatingip_associate_v2" "k8s_masters" {