diff --git a/modules/compute-vm/resource-policies.tf b/modules/compute-vm/resource-policies.tf index de816c15fc..743e1e3350 100644 --- a/modules/compute-vm/resource-policies.tf +++ b/modules/compute-vm/resource-policies.tf @@ -141,9 +141,7 @@ resource "google_compute_resource_policy" "snapshot" { } resource "google_compute_disk_resource_policy_attachment" "boot" { - for_each = var.boot_disk.snapshot_schedule != null ? { - for i, v in var.boot_disk.snapshot_schedule : i => v - } : {} + for_each = var.boot_disk.snapshot_schedule != null ? toset(var.boot_disk.snapshot_schedule) : [] project = var.project_id zone = var.zone name = try(