diff --git a/pkg/destroy/bootstrap/bootstrap.go b/pkg/destroy/bootstrap/bootstrap.go index fffa3dfa852..19c8229a82b 100644 --- a/pkg/destroy/bootstrap/bootstrap.go +++ b/pkg/destroy/bootstrap/bootstrap.go @@ -2,6 +2,7 @@ package bootstrap import ( + "fmt" "io/ioutil" "os" "path/filepath" @@ -26,14 +27,14 @@ func Destroy(dir string) (err error) { copyNames := []string{terraform.StateFileName, cluster.TfVarsFileName} if platform == "libvirt" { - err = ioutil.WriteFile(filepath.Join(dir, "disable-bootstrap.auto.tfvars"), []byte(`{ + err = ioutil.WriteFile(filepath.Join(dir, "disable-bootstrap.tfvars"), []byte(`{ "bootstrap_dns": false } `), 0666) if err != nil { return err } - copyNames = append(copyNames, "disable-bootstrap.auto.tfvars") + copyNames = append(copyNames, "disable-bootstrap.tfvars") } tempDir, err := ioutil.TempDir("", "openshift-install-") @@ -50,7 +51,7 @@ func Destroy(dir string) (err error) { } if platform == "libvirt" { - _, err = terraform.Apply(tempDir, platform) + _, err = terraform.Apply(tempDir, platform, fmt.Sprintf("-var-file=%s", filepath.Join(tempDir, "disable-bootstrap.tfvars"))) if err != nil { return errors.Wrap(err, "Terraform apply") }