Terraform - theartusz/config Wiki

{for key in [{name = "katrine", surname = "bruvik"}, {name = "artur", surname = "ferfecki"}]: key.name => key}

gives result:

{
  "artur" = {
    "name" = "artur"
    "surname" = "ferfecki"
  }
  "katrine" = {
    "name" = "katrine"
    "surname" = "bruvik"
  }
}