TFlint issues with Terragrunt and modules #1744
Unanswered
clara-rivero
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am having an issue when trying to run Terragrunt with TFLint and a module structure. This is my folder structure:
./infrastructure
./infrastructure/main.tf
./infrastructure/modules
./infrastructure/modules/module_2
./infrastructure/modules/module_1
./deployments
./deployments/dev
./deployments/dev/.tflint.hcl
./deployments/dev/terragrunt.hcl
./deployments/dev/variables.tf
In terragrunt .hcl I have:
terraform {
source = "../../infrastructure//."
before_hook "before_hook" {
commands = ["apply", "plan"]
execute = ["tflint"]
}
In .tflint:
plugin "terraform" {
enabled = true
version = "0.2.2"
source = "github.com/terraform-linters/tflint-ruleset-terraform"
preset = "recommended"
}
config {
module = true
}
For some reason, I get always this error when trying to run terragrunt plan in ./deployments/dev: Failed to load configurations;
module_1
module is not found. Did you runterraform init
?;module_2
module is not found. Did you runterraform init
?; It is weird because even when I set the config module to false I get this error. I can see in ./deployments/dev the .terragrunt-cache with the .terragrunt-cache/modules and .terragrunt-cache/terraform/modules/modules.json correctly set.Does anyone have an idea about what is going on? Thank you!
Terragrunt version: v0.42.5
TFLint version 0.46.0
Beta Was this translation helpful? Give feedback.
All reactions