From 99c5f3f0b1860b3b47145d4919ab3ec83fb58cd3 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Thu, 8 Jul 2021 11:45:34 -0700 Subject: [PATCH] remove -lock and -lock-timeout for terraform init https://www.terraform.io/upgrade-guides/0-15.html#other-minor-command-line-behavior-changes > The -lock and -lock-timeout options are no longer available for the terraform init command. Locking applies to operations that can potentially change remote objects, to help ensure that two concurrent Terraform processes don't try to run conflicting operations, but terraform init does not interact with any providers in order to possibly effect such changes. > These options didn't do anything in the terraform init command before, and so you can remove them from any automated calls with no change in behavior. --- plugin.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/plugin.go b/plugin.go index e89e373..6646fcf 100644 --- a/plugin.go +++ b/plugin.go @@ -225,16 +225,6 @@ func initCommand(config InitOptions) *exec.Cmd { args = append(args, fmt.Sprintf("-backend-config=%s", v)) } - // True is default in TF - if config.Lock != nil { - args = append(args, fmt.Sprintf("-lock=%t", *config.Lock)) - } - - // "0s" is default in TF - if config.LockTimeout != "" { - args = append(args, fmt.Sprintf("-lock-timeout=%s", config.LockTimeout)) - } - // Fail Terraform execution on prompt args = append(args, "-input=false")