-
-
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
Implement Terragrunt validate #951
Conversation
@@ -69,6 +82,28 @@ func NewValidationOptions(rootDir string, includeDirs, excludeDirs []string) (*V | |||
return vo, nil | |||
} | |||
|
|||
// NewValidationOptions returns a ValidationOptions struct, with override-able sane defaults, configured to find | |||
// and process all directories containing .tf files | |||
func NewValidationOptions(rootDir string, includeDirs, excludeDirs []string) (*ValidationOptions, error) { |
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.
By splitting NewValidationOptions
into two separate functions, one that configures ValidationOptions
with a FileType
of TF
for Terraform, and one that configures ValidationOptions
with a FileType
of TG
for Terragrunt, we can a backward incompatible release for the tests already calling the NewValidationOptions
function.
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.
Looks like good progress. I have a couple high level thoughts:
- We want to run both
terragrunt validate-inputs
ANDterragrunt validate
. The latter is important to run to ensuregenerate
blocks output valid terraform configuration. - Can you do a speed test to compare if it is faster to run
validate
in this way, or if you runrun-all validate
like we are doing in the service catalog repo smoke test? I have a sneaking suspicion thatrun-all validate
might be significantly faster, but I could be wrong.
e8bfc84
to
be9d3ef
Compare
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.
Updates LGTM!
Thanks for the reviews! Going to merge this in now. |
TODO:
validate-inputs
command via PR