From e3c8b18dbd25bcf15aa3e2a5307a431d0cdc417c Mon Sep 17 00:00:00 2001 From: Paul Bastide Date: Tue, 31 Oct 2023 09:14:31 -0400 Subject: [PATCH] OCTOPUS-526: iface on RHEL bastions aren't picked correctly Signed-off-by: Paul Bastide --- modules/4_pvs_support/pvs_support.tf | 13 ++++++++++--- .../{route-env3.sh.tpl => route-env.sh.tpl} | 11 ++++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) rename modules/4_pvs_support/templates/{route-env3.sh.tpl => route-env.sh.tpl} (59%) diff --git a/modules/4_pvs_support/pvs_support.tf b/modules/4_pvs_support/pvs_support.tf index de8323b..9832c08 100644 --- a/modules/4_pvs_support/pvs_support.tf +++ b/modules/4_pvs_support/pvs_support.tf @@ -19,6 +19,13 @@ locals { cidrs_ipv4 = var.cidrs gateway = cidrhost(var.powervs_machine_cidr, 1) } + + cidrs_dyna_iface = { + cidrs_ipv4 = var.cidrs + gateway = cidrhost(var.powervs_machine_cidr, 1) + bastion_ip = var.ignition_ip + } + } resource "null_resource" "setup" { @@ -57,8 +64,8 @@ resource "null_resource" "setup" { # Copies the custom route for env3 provisioner "file" { - content = templatefile("${path.module}/templates/route-env3.sh.tpl", local.cidrs) - destination = "ocp4-upi-compute-powervs-ibmcloud/intel/support/route-env3.sh" + content = templatefile("${path.module}/templates/route-env.sh.tpl", local.cidrs_dyna_iface) + destination = "ocp4-upi-compute-powervs-ibmcloud/intel/support/route-env.sh" } # Copies the custom routes for dhcp @@ -76,7 +83,7 @@ resource "null_resource" "setup" { provisioner "remote-exec" { inline = [<