terraform: only set confidential_instance_type if cc_technology is SEV_SNP (#3085)

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2024-05-14 16:02:30 +02:00 committed by GitHub
parent 8e3cf5a270
commit 8219005587
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,7 +42,7 @@ resource "google_compute_instance_template" "template" {
confidential_instance_config { confidential_instance_config {
enable_confidential_compute = true enable_confidential_compute = true
confidential_instance_type = var.cc_technology confidential_instance_type = var.cc_technology == "SEV_SNP" ? "SEV_SNP" : null
} }
# If SEV-SNP is used, we have to explicitly select a Milan processor, as per # If SEV-SNP is used, we have to explicitly select a Milan processor, as per