Closed guilhermeblanco closed 6 years ago
Terraform supports defining tags as a map instead of a list of maps (like shown in the example usage).
This means situations like this are valid:
module "kubernetes" { tags = "${merge( map("Name", format("%v-kubernetes", var.vpc_name)), map("Country", substr(var.region, 0, 2)), map("DataCenter", substr(var.region, 3, length(var.region) - 5)), var.tags )}" tags2 = { Name = "${var.vpc_name}-kubernetes" Country = "ca" DataCenter = "central" } }
However, trying these situations does not work and complains returning:
* module.management.module.kubernetes.var.tags2: variable tags2 in module management.kubernetes should be type list, got map
Meh, I understand the reason now. Closing.
Terraform supports defining tags as a map instead of a list of maps (like shown in the example usage).
This means situations like this are valid:
However, trying these situations does not work and complains returning: