diff --git a/contrib/terraform/openstack/kubespray.tf b/contrib/terraform/openstack/kubespray.tf index 90aad989c..7628996cc 100644 --- a/contrib/terraform/openstack/kubespray.tf +++ b/contrib/terraform/openstack/kubespray.tf @@ -28,6 +28,7 @@ module "ips" { router_id = module.network.router_id k8s_nodes = var.k8s_nodes k8s_master_fips = var.k8s_master_fips + router_internal_port_id = module.network.router_internal_port_id } module "compute" { diff --git a/contrib/terraform/openstack/modules/ips/main.tf b/contrib/terraform/openstack/modules/ips/main.tf index 9f98df7a5..c7fcf700c 100644 --- a/contrib/terraform/openstack/modules/ips/main.tf +++ b/contrib/terraform/openstack/modules/ips/main.tf @@ -2,6 +2,9 @@ resource "null_resource" "dummy_dependency" { triggers = { dependency_id = var.router_id } + depends_on = [ + var.router_internal_port_id + ] } # If user specifies pre-existing IPs to use in k8s_master_fips, do not create new ones. diff --git a/contrib/terraform/openstack/modules/ips/variables.tf b/contrib/terraform/openstack/modules/ips/variables.tf index d1fb9c5b3..c5fd6b7f4 100644 --- a/contrib/terraform/openstack/modules/ips/variables.tf +++ b/contrib/terraform/openstack/modules/ips/variables.tf @@ -19,3 +19,5 @@ variable "router_id" { variable "k8s_nodes" {} variable "k8s_master_fips" {} + +variable "router_internal_port_id" {} diff --git a/contrib/terraform/openstack/variables.tf b/contrib/terraform/openstack/variables.tf index 5b49b2942..48b2ea88d 100644 --- a/contrib/terraform/openstack/variables.tf +++ b/contrib/terraform/openstack/variables.tf @@ -242,6 +242,11 @@ variable "router_id" { default = null } +variable "router_internal_port_id" { + description = "uuid of the port connection our router to our network" + default = null +} + variable "k8s_nodes" { default = {} }