terraform icon indicating copy to clipboard operation
terraform copied to clipboard

Support -lock for "console" command

Open phyzical opened this issue 1 year ago • 3 comments

Simply align console command to plan and apply ect allow lock to be disabled.

My usecase is to generate template files given a json blob without locking the context.

Fixes #23655

Target Release

next once merged?

Draft CHANGELOG entry

ENHANCEMENTS

  • added abuility to provide -lock=boolean to terraform console

image image

phyzical avatar Jun 07 '24 07:06 phyzical

CLA assistant check
All committers have signed the CLA.

hashicorp-cla-app[bot] avatar Jun 07 '24 07:06 hashicorp-cla-app[bot]

im not sure what todo in regards to the tests, as the existing tests for command dont seem to test arguments.

if you have an easy ref ill give it a go

phyzical avatar Jun 07 '24 07:06 phyzical

Thanks for this submission!

crw avatar Jun 10 '24 23:06 crw

@crw Any news on this PR? This feature is useful. thank you.

gtranchant-decathlon avatar Apr 04 '25 07:04 gtranchant-decathlon

In general, behind the scenes, the maintainers have gone back and forth on this one. In general the thinking from https://github.com/hashicorp/terraform/issues/23655#issuecomment-1301492880 still stands, particularly about not adding new command line flags (there are various reasons for this, in general there is a strong preference to avoid new flags whenever possible). There is some thinking that this flagged behavior should just be the default behavior, however, no maintainer is signed up to design or review such a change at this time. So unfortunately this is in limbo right now. I'll re-raise it at triage to see if we want to continue to have this PR open, ask for changes, or continue to defer on this issue.

crw avatar Apr 04 '25 17:04 crw