From df6b06ff258518483622ea85b2449621d393db53 Mon Sep 17 00:00:00 2001 From: Christian Glombek Date: Thu, 12 Mar 2020 23:51:51 +0100 Subject: [PATCH] Installer vSphere UPI: `terraform destroy` the bootstrap module The current approach of scaling down the instance_count to 0 by applying a variable causes problems with Terraform 0.12.x. Explicitly destroying the bootstrap module after bootstrap has completed should have the same effect. --- .../openshift/installer/cluster-launch-installer-upi-e2e.yaml | 2 +- .../openshift/installer/cluster-launch-installer-upi-src.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml index e6e8b37c02912..22860955c92d0 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml @@ -2075,7 +2075,7 @@ objects: gsutil rb gs://${INFRA_ID}-bootstrap-ignition gcloud deployment-manager deployments delete -q ${CLUSTER_NAME}-bootstrap elif [[ "${CLUSTER_TYPE}" == "vsphere" ]]; then - terraform apply -auto-approve -var 'bootstrap_complete=true' -no-color & + terraform destroy -auto-approve -target module.bootstrap -no-color & wait "$!" elif [[ "${CLUSTER_TYPE}" == "azure4" ]]; then az network nsg rule delete -g $RESOURCE_GROUP --nsg-name ${INFRA_ID}-controlplane-nsg --name bootstrap_ssh_in diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-src.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-src.yaml index bbe7add1af2c7..34638cf4cae6b 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-src.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-src.yaml @@ -1010,7 +1010,7 @@ objects: gsutil rb gs://${INFRA_ID}-bootstrap-ignition gcloud deployment-manager deployments delete -q ${CLUSTER_NAME}-bootstrap elif [[ "${CLUSTER_TYPE}" == "vsphere" ]]; then - terraform apply -auto-approve -var 'bootstrap_complete=true' -no-color & + terraform destroy -auto-approve -target module.bootstrap -no-color & wait "$!" fi