opentofu/terraform/test-fixtures/plan-module-map-literal/child/main.tf
Paul Hinze 559f14c3fa
terraform: allow literal maps to be passed to modules
Passing a literal map to a module looks like this in HCL:

    module "foo" {
      source = "./foo"
      somemap {
        somekey = "somevalue"
      }
    }

The HCL parser always wraps an extra list around the map, so we need to
remove that extra list wrapper when the parameter is indeed of type "map".

Fixes #7140
2016-07-06 09:52:32 -05:00

13 lines
160 B
HCL

variable "amap" {
type = "map"
}
variable "othermap" {
type = "map"
}
resource "aws_instance" "foo" {
tags = "${var.amap}"
meta = "${var.othermap}"
}