Skip to content

Commit

Permalink
Remove deprecated terraform destroy "-force" flag
Browse files Browse the repository at this point in the history
[#176850008]
  • Loading branch information
gbandres98 committed Jun 17, 2021
1 parent 79c3a03 commit 5335e80
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion terraform/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func (e Executor) Validate(credentials map[string]string) error {
}

func (e Executor) Destroy(credentials map[string]string) error {
args := []string{"destroy", "-force"}
args := []string{"destroy"}
for key, value := range credentials {
arg := fmt.Sprintf("%s=%s", key, value)
args = append(args, "-var", arg)
Expand Down
1 change: 0 additions & 1 deletion terraform/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ var _ = Describe("Executor", func() {
Expect(cli.RunCall.Receives.WorkingDirectory).To(Equal(terraformDir))
Expect(cli.RunCall.Receives.Args).To(ConsistOf([]string{
"destroy",
"-force",
"-var", "some-cert=some-cert-value",
"-state", relativeStatePath,
"-var-file", relativeVarsPath,
Expand Down

0 comments on commit 5335e80

Please sign in to comment.