feat: Speedup terraform_validate - firstly try run validate without checking is .terraform/ is valid#524
Merged
MaxymVlasov merged 3 commits intoantonbabenko:masterfrom Jun 12, 2023
Conversation
Closed
4 tasks
MaxymVlasov
reviewed
May 15, 2023
MaxymVlasov
reviewed
May 15, 2023
MaxymVlasov
reviewed
May 15, 2023
MaxymVlasov
reviewed
May 15, 2023
MaxymVlasov
approved these changes
May 15, 2023
Contributor
Author
|
Is there anything i can to to help get this merged :)? |
Collaborator
|
@yermulnik please review |
yermulnik
approved these changes
Jun 12, 2023
terraform_validate - firstly try run validate without checking is .terraform/ is valid
Collaborator
|
@smelchior Sorry for delay |
antonbabenko
pushed a commit
that referenced
this pull request
Jun 12, 2023
# [1.81.0](v1.80.0...v1.81.0) (2023-06-12) ### Features * Speedup `terraform_validate` - firstly try run validate without checking is `.terraform/` is valid ([#524](#524)) ([d0d08ac](d0d08ac))
Owner
|
This PR is included in version 1.81.0 🎉 |
Contributor
Author
|
Thanks for merging this! That makes my life a lot easier :)! |
Owner
|
@bryantbiggs I think it is expected behavior since there are recoverable errors. After it runs, there should be no errors and it should "pass". |
Collaborator
|
We can add |
Collaborator
|
I can't reproduce. In any case, open a issue in case you'll need anything |
Repository owner
locked as resolved and limited conversation to collaborators
Jul 14, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Put an
xinto the box if that apply:Description of your changes
As discussed in #509 (comment) i would like to introduce a change to run terraform validate in the hook first without running the checks if terraform init is needed.
This helps in situations where there is no
.terraform/modulesor.terraform/providersdirectory as terraform init would be called every time.How can we test changes
Run the terraform_validate.sh hook against your test repositories, if
terraform validateshould run first without any additional checks. If it fails, the normal workflow continues.