I use Terraform
and Terragrunt
.
I use inputs
field in terragrunt.hcl
file from where I also call a local module:
include "root" {
path = find_in_parent_folders()
}
terraform {
source = "../../modules/dns"
}
inputs = {
dns_zone_id = "1234"
}
But it seems that I also must declare variables.tf
file:
variable "dns_zone_id" {
description = "Cloudflare DNS zone ID"
type = string
}
If I do not declare variables.tf
file I get errors when running terragrunt plan
:
An input variable with the name "dns_zone_id" has not been
│ declared. This variable can be declared with a variable
│ "dns_zone_id" {} block.
But the problem is that tflint
complains and does not understand that variables is used in inputs
block in terragrunt.hcl
file:
Is there any workaround for this issue besides using tflint ignore
? Am i missing something in terragrunt
? I do not see in terragrunt
docs that they use variables.tf
.
Best regards