Skip to content

Commit

Permalink
HACK: Tear down broken resources
Browse files Browse the repository at this point in the history
  • Loading branch information
wking committed Dec 1, 2018
1 parent e92eb99 commit 38bff8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/openshift-install/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ func createCluster(ctx context.Context, assets *assets.Assets, directory string)
stateFile, err := terraform.Apply(tmpDir, platform)
if err != nil {
err = errors.Wrap(err, "run Terraform")

err2 := terraform.Destroy(tmpDir, platform)
if err2 != nil {
logrus.Errorf("Destroying failed resources: %v", err)
}
}

if stateFile != "" {
Expand Down

0 comments on commit 38bff8c

Please sign in to comment.