diff --git a/main.tf b/main.tf index fe659a5..9977cdf 100644 --- a/main.tf +++ b/main.tf @@ -111,6 +111,11 @@ module "support" { bastion_public_ip = var.powervs_bastion_ip cidrs = module.vpc_prepare.mac_vpc_subnets powervs_machine_cidr = var.powervs_machine_cidr + ibmcloud_api_key = var.ibmcloud_api_key + vpc_name = var.vpc_name + vpc_region = var.vpc_region + resource_group = module.vpc.vpc_resource_group + ignition_ip = var.powervs_bastion_private_ip } module "image" { diff --git a/modules/4_pvs_support/files/resolv.sh b/modules/4_pvs_support/files/resolv.sh index 9b5fa2e..74e685c 100644 --- a/modules/4_pvs_support/files/resolv.sh +++ b/modules/4_pvs_support/files/resolv.sh @@ -29,6 +29,13 @@ storage: inline: | search $(hostname --long) nameserver $(hostname -i | awk '{print $NF}') + - path: /etc/NetworkManager/conf.d/90-dns-none.conf + overwrite: true + mode: 0644 + contents: + inline: | + [main] + dns=none EOF chmod +x butane diff --git a/modules/4_pvs_support/pvs_support.tf b/modules/4_pvs_support/pvs_support.tf index 2c0c3d7..a5654dc 100644 --- a/modules/4_pvs_support/pvs_support.tf +++ b/modules/4_pvs_support/pvs_support.tf @@ -130,7 +130,7 @@ EOF } resource "null_resource" "migrate_mcp" { - depends_on = [null_resource.create_resolv_conf_for_intel_workers] + depends_on = [null_resource.limit_csi_arch] connection { type = "ssh" user = var.rhel_username @@ -267,7 +267,7 @@ EOF # Dev Note: do this as the last step so we get a good worker ignition file downloaded. resource "null_resource" "latest_ignition" { - # depends_on = [null_resource.wait_on_mcp] + # depends_on = [null_resource.wait_on_mcp] depends_on = [null_resource.set_routing_via_host] connection { type = "ssh" @@ -288,3 +288,41 @@ EOF ] } } + +# # Dev Note: create the dns lookup +# resource "null_resource" "update_dns_resolver_for_vpc" { +# # depends_on = [null_resource.wait_on_mcp] +# depends_on = [null_resource.latest_ignition] +# connection { +# type = "ssh" +# user = var.rhel_username +# host = var.bastion_public_ip +# private_key = file(var.private_key_file) +# agent = var.ssh_agent +# timeout = "${var.connection_timeout}m" +# } + +# provisioner "remote-exec" { +# inline = [<