-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
terragrunt validate not working with root.hcl #3710
Comments
Hey @sirantd , Could you give me more details on how you're setting things up? $ eza -T
.
├── root.hcl
├── unit1
│ ├── main.tf
│ └── terragrunt.hcl
├── unit2
│ ├── main.tf
│ └── terragrunt.hcl
└── unit3
├── main.tf
└── terragrunt.hcl fd -tf -x bash -c 'echo "# {}" && cat {} && echo'
# ./root.hcl
# ./unit1/main.tf
# ./unit1/terragrunt.hcl
include "root" {
path = find_in_parent_folders("root.hcl")
} # unit1
$ terragrunt validate
09:21:31.470 INFO tofu: Initializing the backend...
09:21:31.470 INFO tofu: Initializing provider plugins...
09:21:31.470 INFO tofu: OpenTofu has been successfully initialized!
09:21:31.470 INFO tofu:
09:21:31.470 INFO tofu: You may now begin working with OpenTofu. Try running "tofu plan" to see
09:21:31.470 INFO tofu: any changes that are required for your infrastructure. All OpenTofu commands
09:21:31.470 INFO tofu: should now work.
09:21:31.470 INFO tofu: If you ever set or change modules or backend configuration for OpenTofu,
09:21:31.470 INFO tofu: rerun this command to reinitialize your working directory. If you forget, other
09:21:31.470 INFO tofu: commands will detect it and remind you to do so if necessary.
09:21:31.489 STDOUT tofu: Success! The configuration is valid. |
@sirantd , friendly reminder of this request for more details so that the issue doesn't go stale. |
@yhakbar thank you for double checking, I tested with your example and it works for me properly. I guess it's some problem in my structure but I have no time to dive deep into it right now. Feel free to close it as false-positive. |
Thanks for following up @sirantd ! |
Describe the bug
There is a new recommendation to use
root.hcl
for the root Terragrunt file, but it breaksterragrunt validate
(which I run as a pre-commit hook).Steps To Reproduce
Rename terragrunt.hcl according to instructions
Workaround
Place empty
terragrunt.hcl
in the root directory next to root.hclVersions
The text was updated successfully, but these errors were encountered: