You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
344B

  1. locals {
  2. vm_hosts_with_groups = {
  3. for hostname, host in var.vm_hosts: hostname => host if contains(keys(host),"groups")
  4. }
  5. vm_hosts_without_groups = {
  6. for hostname, host in var.vm_hosts: hostname => host if !contains(keys(host),"groups")
  7. }
  8. vm_groups = distinct(flatten(values(local.hetzner_vm_hosts_with_groups)[*].groups))
  9. }