-
-
Notifications
You must be signed in to change notification settings - Fork 518
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
Add terragrunt_providers_lock
hook
#630
Comments
What is the rationale behind this request? Please elaborate on the difference you're encompassing within this request. |
You are correct, |
Ah, I just realised |
I had another thought about it and realised
Usually, I run |
@Tensho I'm not familiar with TG and hence what you're saying contradicts to me with what is explained at https://terragrunt.gruntwork.io/docs/features/lock-file-handling/#how-terragrunt-solves-this-problem
Not sure whether @MaxymVlasov uses TG though. If he doesn't, I think it would make sense for you to try and contribute by copying over the terragrunt_validate.sh hook and adjusting it for the |
I even can recall that some person was recently spamming some issue(s?) with their own repo with TG(?) hooks that they forked from this repo and didn't seem to will to contribute back to this repo. I cannot find that issue(s?) now I don't know why though 🤷🏻 But GH search gives me e.g. this: https://github.com/kiecan/terragrunt-pre-commit/blob/main/hooks/terragrunt_providers_lock.sh — as of look of it that repo is based off of |
The main culprit I can see though is that, given the use case you outlined, it requires the hook to run in the different folder rather than the one where the files have changed. And this is what the logic has to be written around and… and that might be a bit of a toil as the hook needs to cover not just the specific use case, but also be applicable for others. |
A friend of mine has already prototyped the hook code and it works like a charm:
I guess he will open PR with these changes rather sooner than later. cc @wzooff |
This issue has been resolved in version 1.88.0 🎉 |
FOSS like a boss 😎 Thank you, chaps. |
What problem are you facing?
There is no
terraform_providers_lock
analogue for Terragrunt. Unfortunately, the official Gruntworks pre-commit hooks repo doesn't provide it either.How could pre-commit-terraform help solve your problem?
Introduce
terragrunt_providers_lock
hook which does pretty much the same as its Terraform counterpart – locks provider versions for specific platforms.The text was updated successfully, but these errors were encountered: