-
-
Notifications
You must be signed in to change notification settings - Fork 540
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: Add terragrunt_validate_inputs
hook to check unused and undefined inputs
#677
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.
LGTM (apart from unrelated formatting changes to README — please revert those unrelated changes, that were presumably applied automatically by your IDE)
ps: you may try and add the below to the config file of your VSCode to stop it from removing trailing dots from markdown
"[markdown]": {
"files.trimTrailingWhitespace": false
}
Or just install https://editorconfig.org/ plugin to your favorite editor. I'll add it to the contrib article |
Ah, right! Thanks, Max. I always miss that we have |
If you merge the last changes to your branch, you'll be able to use extensions settings too. Sorry for the inconvenience, that should have been added a long time ago. |
Thanks for comments, I’ll get the formatting fixed up. |
I think I got reformatted properly 🤞 |
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.
LGTM
Leaving final review to @MaxymVlasov
README.md
Outdated
``` | ||
|
||
> [!NOTE] | ||
> This hooks requires authentication to a given account if defined by config in order to work properly. |
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.
Can we provide here link to docs about authentication or provide more details?
I not sure which authentification is mentioned here. valid creds in ~/.aws/
~/.azure/
etc? Or if not Cloud account, which account then?
Are there any terragrunt docs or issues about that?
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.
I was considering opening an issue, in my testing I am using AWS and iam_role. I will see if I can find a relevant link.
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.
Updated. I will look at opening an issue separately in the Terragrunt project and update the note here if I get an answer.
I have a highly customized setup so most folks may not ever run into this.
terragrunt_validate_inputs
hook to check unused and undefined inputs
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.
LGTM
# [1.92.0](v1.91.0...v1.92.0) (2024-06-19) ### Features * Add `terragrunt_validate_inputs` hook to check unused and undefined inputs ([#677](#677)) ([a139b71](a139b71))
This PR is included in version 1.92.0 🎉 |
Put an
x
into the box if that apply:Description of your changes
Adds the ability to define a new
terragrunt_validate_inputs
hook for checking for unused and undefined variables in terragrunt.hcl configuration files.Note: This does seem to require auth. I haven't found a way to get the hook to work without first authenticating to the cloud provider I was testing with. Please let me know if there is a way around this.
Fixes #675
How can we test changes
Add the new pre-commit config:
Intentionally introduce a misconfiguration in a terragrunt.hcl configuration.
Run the pre-comit hook and note the failure.