Skip to content
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

feat: introducing "copy_terraform_lock_file" to fine tune Lock File Handling #2889

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rodrigorfk
Copy link

@rodrigorfk rodrigorfk commented Jan 15, 2024

Description

Fixes #1653.

This PR introduces a new attribute called copy_terraform_lock_file under the terraform block as following:

terraform {
  ...
  copy_terraform_lock_file = false
}

The default value is true and does not change any existing Terragrunt behaviour, once it is defined as false, Terragrunt will stop copying the .terraform.lock.hcl file from the temporary terragrunt directory to the working directory.

TODOs

Read the Gruntwork contribution guidelines.

  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Ensure any 3rd party code adheres with our license policy or delete this line if its not applicable.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

Release Notes (draft)

Added / Removed / Updated [X].

Added "copy_terraform_lock_file" attribute to fine tune Lock File Handling

Migration Guide

…andling

Signed-off-by: Rodrigo Fior Kuntzer <rodrigo@miro.com>
@rodrigorfk
Copy link
Author

Hi @denis256, would you be so kind and provide some feedback about this PR? Thanks in advance.

@denis256
Copy link
Member

Hi, yes, it is in my queue to check... ⌛

@rodrigorfk
Copy link
Author

Hi @denis256 , sorry to bother you once again, but is there anything I could help you to expedite the review of this PR? I would love to hear from you if this change is something the project is willing to accept. Thanks once again.

@Josephuss
Copy link

hello @rodrigorfk @denis256 , hope you're doing well. Can I ask if this merge can be completed sometime soon?

my team found this merge request and we could all use this feature since we're trying to create a remote and client setup for terragrunt and versioning could become an issue if there are locks on both remote and client side.

# Conflicts:
#	cli/commands/terraform/action.go
@rodrigorfk
Copy link
Author

Hi @Josephuss , thanks for your message, I'm happy to see that your team also thought this change would be useful, I have updated the branch and fixed the outstanding conflicts.

@james-masson
Copy link

We've also come across this PR, it's exactly the functionality we need, for the same reasons as the others mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lock file handling strategy is not best practice?
4 participants