From 1afd5b054ee510a68ea007acd727465a58fa3ea4 Mon Sep 17 00:00:00 2001 From: Philippe Boneff Date: Tue, 20 Oct 2026 13:35:13 +0000 Subject: [PATCH 1/2] deployment/gcp: select compatible boot disk type by machine generation --- deployment/modules/gcp/gce/tesseract/main.tf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deployment/modules/gcp/gce/tesseract/main.tf b/deployment/modules/gcp/gce/tesseract/main.tf index d2d7b07c..9328dd82 100644 --- a/deployment/modules/gcp/gce/tesseract/main.tf +++ b/deployment/modules/gcp/gce/tesseract/main.tf @@ -198,6 +198,11 @@ resource "google_compute_region_instance_template" "tesseract" { source_image = data.google_compute_image.cos.self_link auto_delete = true boot = true + // Gen 4+ machine series require hyperdisk-balanced; Gen 3 (plus t2a/g2) require pd-balanced; + // Gen 1/2 default to pd-standard. + disk_type = can(regex("^[a-z]+[4-9][a-z]*-", var.machine_type)) ? "hyperdisk-balanced" : ( + can(regex("^([a-z]+3[a-z]*|t2a|g2)-", var.machine_type)) ? "pd-balanced" : "pd-standard" + ) } network_interface { From 7606da40020b155cc375b101a379a98d306ea221 Mon Sep 17 00:00:00 2001 From: Philippe Boneff Date: Tue, 20 Oct 2026 13:54:51 +0000 Subject: [PATCH 2/2] comment --- deployment/modules/gcp/gce/tesseract/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/modules/gcp/gce/tesseract/main.tf b/deployment/modules/gcp/gce/tesseract/main.tf index 9328dd82..6af7dc13 100644 --- a/deployment/modules/gcp/gce/tesseract/main.tf +++ b/deployment/modules/gcp/gce/tesseract/main.tf @@ -200,8 +200,8 @@ resource "google_compute_region_instance_template" "tesseract" { boot = true // Gen 4+ machine series require hyperdisk-balanced; Gen 3 (plus t2a/g2) require pd-balanced; // Gen 1/2 default to pd-standard. - disk_type = can(regex("^[a-z]+[4-9][a-z]*-", var.machine_type)) ? "hyperdisk-balanced" : ( - can(regex("^([a-z]+3[a-z]*|t2a|g2)-", var.machine_type)) ? "pd-balanced" : "pd-standard" + disk_type = can(regex("(?i)^[a-z]+[4-9][a-z]*-", var.machine_type)) ? "hyperdisk-balanced" : ( + can(regex("(?i)^([a-z]+3[a-z]*|t2a|g2)-", var.machine_type)) ? "pd-balanced" : "pd-standard" ) }