-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure Terragrunt commands can be configured with -lock=true #788
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sanity check: it doesn't look like you changed anything in RunTerraformCommandE
... So is the fix that -lock=false
is no longer hard-coded and is now read from options
instead? Or is the fix that apply-all
is part of TerraformCommandsWithLockSupport
now?
@brikis98 Yes, the fix is that terratest/modules/terraform/format.go Line 39 in 2114c22
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, got it, thanks for explaining! Changes LGTM. I'll kick off tests now.
@brikis98 I see that a couple of tests failed, but they don't seem to be related to my PR. Is there anything I need to do on my end to sort this out? |
We just merged some test stability fixes. Could you pull in the latest from |
@brikis98 I have merged the latest from the upstream |
Thanks! I just kicked off the tests again. |
There was one test failure, but it looks unrelated/transient, so I'm going to merge. |
This fixes #785
In the current implementation, when using Terragrunt binary instead of Terraform, Terratest explicitly passes
-lock=false
to the CLI.This triggers a bug in Terraform (see issue for details on that), but also doesn't allow us to run integration tests with remote state
backend configured in the same way we would run actual deployment since Terraform uses
-lock=true
by default.This change allows
Options.Lock
to be passed down to the Terragruntapply-all
anddestroy-all
commands.Default behavior in Terratest does not change, since
Options.Lock
is still initialized tofalse
, but at least we can control it now.