0
0
mirror of https://github.com/thegeeklab/wp-opentofu.git synced 2024-11-24 03:10:39 +00:00

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.
This commit is contained in:
Tony Li 2021-07-08 11:45:34 -07:00 committed by GitHub
parent 4efa5651dc
commit 99c5f3f0b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")