We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've got some HCL code that looks like this:
subnet_cidr_blocks = "${var.subnet_cidr_blocks["staging1"]}"
var.subnet_cidr_blocks is a map of lists with assigned CIDR blocks. It looks like this:
var.subnet_cidr_blocks
variable "subnet_cidr_blocks" { description = "Two subnets per environment" type = "map" default = { production = ["10.0.7.0/24", "10.0.8.0/24"] staging1 = ["10.0.9.0/24", "10.0.10.0/24"] } }
When I run tflint I get the following error:
tflint
Evaluation error: 1:31: unknown variable accessed: staging1 in staging1.tf:9
The only thing that works is lookup(), but you can't use that function on maps of lists. Only maps of strings.
lookup()
The text was updated successfully, but these errors were encountered:
Oops, I noticed that I made a very basic mistake. I will fix this problem soon and release the fixed version.
Sorry, something went wrong.
strings.Trim
strings.Replace
No branches or pull requests
I've got some HCL code that looks like this:
var.subnet_cidr_blocks
is a map of lists with assigned CIDR blocks. It looks like this:When I run
tflint
I get the following error:The only thing that works is
lookup()
, but you can't use that function on maps of lists. Only maps of strings.The text was updated successfully, but these errors were encountered: