Skip to content

Commit

Permalink
Replace tf "-force" flag with "-auto-approve"
Browse files Browse the repository at this point in the history
[#176850008]
  • Loading branch information
gbandres98 committed Jun 17, 2021
1 parent 5335e80 commit bf1dd3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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"}
args := []string{"destroy", "-auto-approve"}
for key, value := range credentials {
arg := fmt.Sprintf("%s=%s", key, value)
args = append(args, "-var", arg)
Expand Down
1 change: 1 addition & 0 deletions terraform/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ var _ = Describe("Executor", func() {
Expect(cli.RunCall.Receives.WorkingDirectory).To(Equal(terraformDir))
Expect(cli.RunCall.Receives.Args).To(ConsistOf([]string{
"destroy",
"-auto-approve",
"-var", "some-cert=some-cert-value",
"-state", relativeStatePath,
"-var-file", relativeVarsPath,
Expand Down

0 comments on commit bf1dd3f

Please sign in to comment.