Closed samba2 closed 1 year ago
Hi,
tried to define the terraform
plugin in .tflint.hcl
?
plugin "terraform" {
enabled = true
preset = "recommended"
version = "0.1.0"
source = "github.com/terraform-linters/tflint-ruleset-terraform"
}
Reference: https://github.com/gruntwork-io/terragrunt/pull/2362#issuecomment-1319753875
@denis256 Good that you mention that. Yes, I also tried this and it worked. So the issue seems to be related with terragrunt + tflint + the azure rules plugin.
I had some time looking into that issue. I admit that I was confused by which plugins are actually needed although it was always mentioned, but as a terragrunt/ tflint beginner I did not bring together the puzzle pieces.
This made terragrunt v0.45.0 working with the tflint hook:
# explicit "terraform" plugin with version + source
plugin "terraform" {
enabled = true
version = "0.2.2"
source = "github.com/terraform-linters/tflint-ruleset-terraform"
}
# ...and the "azurerm" plugin
plugin "azurerm" {
enabled = true
version = "0.22.0"
source = "github.com/terraform-linters/tflint-ruleset-azurerm"
}
# rules follow here
...
Sorry for the confusion caused. I'll close the issue.
When running the tflint hook with terragrunt, I receive the following error:
I am aware of the troubleshooting notice in the docs, but I believe I've set things up correctly.
Here is my
.tflint.hcl
:When I run
tflint --init --config /home/***/azure/.tflint.hcl /home/***/.terragrunt cache/GUnzcwgY_Z12Iod7V0cXm90Mr3Q/V9u4X1WhUCaqO6kHtHpod5iHxOc/rg
directly, things work.Versions: