Skip to content

Commit 20e82e2

Browse files
committed
try destroy without refresh first to avoid invalid tf code blocking destroy
1 parent 904a2b9 commit 20e82e2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

e2etest.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ func destroy(t *testing.T, option terraform.Options) {
3434
option.RetryableTerraformErrors = map[string]string{
3535
".*": "Retry destroy on any error",
3636
}
37-
_, err := terraform.DestroyE(t, &option)
37+
_, err := terraform.RunTerraformCommandE(t, &option, terraform.FormatArgs(&option, "destroy", "-auto-approve", "-input=false", "-refresh=false")...)
3838
if err != nil {
39-
_, err = terraform.RunTerraformCommandE(t, &option, terraform.FormatArgs(&option, "destroy", "-auto-approve", "-input=false", "-refresh=false")...)
39+
_, err = terraform.DestroyE(t, &option)
4040
}
4141
require.NoError(t, err)
4242
}

0 commit comments

Comments
 (0)