» map Function

map takes an even number of arguments and returns a map whose elements are constructed from consecutive pairs of arguments.

» Examples

> map("a", "b", "c", "d")
{
  "a" = "b"
  "c" = "d"
}

Do not use the above form in Terraform v0.12 or above. Instead, use the built-in map construction syntax, which achieves the same result:

> {"a" = "b", "c" = "d"}
{
  "a" = "b"
  "c" = "d"
}
  • tomap performs a type conversion to a map type.