Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions deployment/modules/gcp/gce/tesseract/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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("(?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"
)
}

network_interface {
Expand Down
Loading