|
-
- locals {
- vm_hosts_with_groups = {
- for hostname, host in var.vm_hosts: hostname => host if contains(keys(host),"groups")
- }
- vm_hosts_without_groups = {
- for hostname, host in var.vm_hosts: hostname => host if !contains(keys(host),"groups")
- }
- vm_groups = distinct(flatten(values(local.hetzner_vm_hosts_with_groups)[*].groups))
- }
|