diff --git a/rules/utils.go b/rules/utils.go index 0a8c2414..b1387958 100644 --- a/rules/utils.go +++ b/rules/utils.go @@ -104,61 +104,63 @@ var validMachineTypes = map[string]bool{ "c3d-highcpu-180": true, "c3d-highcpu-360": true, // C4 - "c4-standard-2": true, - "c4-standard-4": true, - "c4-standard-8": true, - "c4-standard-16": true, - "c4-standard-24": true, - "c4-standard-32": true, - "c4-standard-48": true, - "c4-standard-96": true, - "c4-standard-144": true, - "c4-standard-192": true, - "c4-standard-288": true, - "c4-standard-288-metal": true, - "c4-standard-4-lssd": true, - "c4-standard-8-lssd": true, - "c4-standard-16-lssd": true, - "c4-standard-24-lssd": true, - "c4-standard-32-lssd": true, - "c4-standard-48-lssd": true, - "c4-standard-96-lssd": true, - "c4-standard-144-lssd": true, - "c4-standard-192-lssd": true, - "c4-standard-288-lssd": true, - "c4-highcpu-2": true, - "c4-highcpu-4": true, - "c4-highcpu-8": true, - "c4-highcpu-16": true, - "c4-highcpu-24": true, - "c4-highcpu-32": true, - "c4-highcpu-48": true, - "c4-highcpu-96": true, - "c4-highcpu-144": true, - "c4-highcpu-192": true, - "c4-highcpu-288": true, - "c4-highmem-2": true, - "c4-highmem-4": true, - "c4-highmem-8": true, - "c4-highmem-16": true, - "c4-highmem-24": true, - "c4-highmem-32": true, - "c4-highmem-48": true, - "c4-highmem-96": true, - "c4-highmem-144": true, - "c4-highmem-192": true, - "c4-highmem-288": true, - "c4-highmem-288-metal": true, - "c4-highmem-4-lssd": true, - "c4-highmem-8-lssd": true, - "c4-highmem-16-lssd": true, - "c4-highmem-24-lssd": true, - "c4-highmem-32-lssd": true, - "c4-highmem-48-lssd": true, - "c4-highmem-96-lssd": true, - "c4-highmem-144-lssd": true, - "c4-highmem-192-lssd": true, - "c4-highmem-288-lssd": true, + "c4-standard-2": true, + "c4-standard-4": true, + "c4-standard-8": true, + "c4-standard-16": true, + "c4-standard-24": true, + "c4-standard-32": true, + "c4-standard-48": true, + "c4-standard-96": true, + "c4-standard-144": true, + "c4-standard-192": true, + "c4-standard-288": true, + "c4-standard-288-metal": true, + "c4-standard-4-lssd": true, + "c4-standard-8-lssd": true, + "c4-standard-16-lssd": true, + "c4-standard-24-lssd": true, + "c4-standard-32-lssd": true, + "c4-standard-48-lssd": true, + "c4-standard-96-lssd": true, + "c4-standard-144-lssd": true, + "c4-standard-192-lssd": true, + "c4-standard-288-lssd": true, + "c4-standard-288-lssd-metal": true, + "c4-highcpu-2": true, + "c4-highcpu-4": true, + "c4-highcpu-8": true, + "c4-highcpu-16": true, + "c4-highcpu-24": true, + "c4-highcpu-32": true, + "c4-highcpu-48": true, + "c4-highcpu-96": true, + "c4-highcpu-144": true, + "c4-highcpu-192": true, + "c4-highcpu-288": true, + "c4-highmem-2": true, + "c4-highmem-4": true, + "c4-highmem-8": true, + "c4-highmem-16": true, + "c4-highmem-24": true, + "c4-highmem-32": true, + "c4-highmem-48": true, + "c4-highmem-96": true, + "c4-highmem-144": true, + "c4-highmem-192": true, + "c4-highmem-288": true, + "c4-highmem-288-metal": true, + "c4-highmem-4-lssd": true, + "c4-highmem-8-lssd": true, + "c4-highmem-16-lssd": true, + "c4-highmem-24-lssd": true, + "c4-highmem-32-lssd": true, + "c4-highmem-48-lssd": true, + "c4-highmem-96-lssd": true, + "c4-highmem-288-lssd": true, + "c4-highmem-144-lssd": true, + "c4-highmem-192-lssd": true, + "c4-highmem-288-lssd-metal": true, // C4D "c4d-standard-2": true, "c4d-standard-4": true, @@ -276,7 +278,9 @@ var validMachineTypes = map[string]bool{ // H3 "h3-standard-88": true, // H4D + "h4d-highmem-192": true, "h4d-highmem-192-lssd": true, + "h4d-standard-192": true, // M1 "m1-megamem-96": true, "m1-ultramem-40": true, @@ -417,7 +421,35 @@ var validMachineTypes = map[string]bool{ "n4-highmem-32": true, "n4-highmem-48": true, "n4-highmem-64": true, - "n4-highmem-80": true, + "n4-highmem-80": true, + // N4D + "n4d-standard-2": true, + "n4d-standard-4": true, + "n4d-standard-8": true, + "n4d-standard-16": true, + "n4d-standard-32": true, + "n4d-standard-48": true, + "n4d-standard-64": true, + "n4d-standard-80": true, + "n4d-standard-96": true, + "n4d-highcpu-2": true, + "n4d-highcpu-4": true, + "n4d-highcpu-8": true, + "n4d-highcpu-16": true, + "n4d-highcpu-32": true, + "n4d-highcpu-48": true, + "n4d-highcpu-64": true, + "n4d-highcpu-80": true, + "n4d-highcpu-96": true, + "n4d-highmem-2": true, + "n4d-highmem-4": true, + "n4d-highmem-8": true, + "n4d-highmem-16": true, + "n4d-highmem-32": true, + "n4d-highmem-48": true, + "n4d-highmem-64": true, + "n4d-highmem-80": true, + "n4d-highmem-96": true, // T2 "t2a-standard-1": true, @@ -454,13 +486,15 @@ var validMachineTypes = map[string]bool{ "a2-ultragpu-8g": true, // H100 machine types: https://cloud.google.com/compute/docs/gpus#h100-gpus - "a3-highgpu-1g": true, - "a3-highgpu-2g": true, - "a3-highgpu-4g": true, - "a3-highgpu-8g": true, - "a3-megagpu-8g": true, - "a3-ultragpu-8g": true, - "a3-edgegpu-8g": true, + "a3-highgpu-1g": true, + "a3-highgpu-2g": true, + "a3-highgpu-4g": true, + "a3-highgpu-8g": true, + "a3-megagpu-8g": true, + "a3-ultragpu-8g": true, + "a3-ultragpu-8g-nolssd": true, + "a3-edgegpu-8g": true, + "a3-edgegpu-8g-nolssd": true, // A4 "a4-highgpu-8g": true, @@ -478,13 +512,20 @@ var validMachineTypes = map[string]bool{ "g2-standard-96": true, // CT TPU machine types https://cloud.google.com/tpu/docs/tpus-in-gke - "ct4p-hightpu-4t": true, - "ct5l-hightpu-1t": true, - "ct5l-hightpu-4t": true, - "ct5l-hightpu-8t": true, - "ct5lp-hightpu-1t": true, - "ct5lp-hightpu-4t": true, - "ct5lp-hightpu-8t": true, + "ct3-hightpu-4t": true, + "ct3p-hightpu-4t": true, + "ct4p-hightpu-4t": true, + "ct5l-hightpu-1t": true, + "ct5l-hightpu-4t": true, + "ct5l-hightpu-8t": true, + "ct5lp-hightpu-1t": true, + "ct5lp-hightpu-4t": true, + "ct5lp-hightpu-8t": true, + "ct5p-hightpu-4t": true, + "ct6e-standard-1t": true, + "ct6e-standard-4t": true, + "ct6e-standard-8t": true, + "tpu7x-standard-4t": true, // Z3 "z3-highmem-14-standardlssd": true, @@ -504,9 +545,13 @@ var validMachineTypes = map[string]bool{ "z3-highmem-176-highlssd": true, // X4 machine types: https://cloud.google.com/compute/docs/memory-optimized-machines#x4_machine_types - "x4-megamem-960-metal": true, + "x4-1440-24t-metal": true, + "x4-1920-32t-metal": true, "x4-megamem-1440-metal": true, "x4-megamem-1920-metal": true, + "x4-megamem-960-metal": true, + "x4-960-12t-metal": true, + "x4-960-16t-metal": true, } func isCustomType(machineType string) bool { @@ -515,6 +560,7 @@ func isCustomType(machineType string) bool { strings.HasPrefix(machineType, "n2d-custom-") || strings.HasPrefix(machineType, "n1-custom-") || strings.HasPrefix(machineType, "n4-custom-") || + strings.HasPrefix(machineType, "n4d-custom-") || strings.HasPrefix(machineType, "custom-") }