Skip to content

Commit

Permalink
try destroy without refresh first to avoid invalid tf code blocking d…
Browse files Browse the repository at this point in the history
…estroy
  • Loading branch information
lonegunmanb committed Jan 13, 2023
1 parent 904a2b9 commit 20e82e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions e2etest.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ func destroy(t *testing.T, option terraform.Options) {
option.RetryableTerraformErrors = map[string]string{
".*": "Retry destroy on any error",
}
_, err := terraform.DestroyE(t, &option)
_, err := terraform.RunTerraformCommandE(t, &option, terraform.FormatArgs(&option, "destroy", "-auto-approve", "-input=false", "-refresh=false")...)
if err != nil {
_, err = terraform.RunTerraformCommandE(t, &option, terraform.FormatArgs(&option, "destroy", "-auto-approve", "-input=false", "-refresh=false")...)
_, err = terraform.DestroyE(t, &option)
}
require.NoError(t, err)
}
Expand Down

0 comments on commit 20e82e2

Please sign in to comment.