How to for_each through a list(objects) in Terraform 0.12
Seem’s like I found what to do. If you pass not the maps of maps but the list of maps you can use such code resource “google_compute_instance” “node” { for_each = {for vm in var.vms: vm.hostname => vm} name = “${each.value.hostname}” machine_type = “custom-${each.value.cpu}-${each.value.ram*1024}” zone = “${var.gcp_zone}” boot_disk { initialize_params { image = “${var.image_name}” size … Read more