From 727eba783d7b3d8e636949e225f5a818d286735f Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Thu, 24 Oct 2024 20:52:39 +0000 Subject: [PATCH] Remove references to deleted compute images in multiple tests (#12062) [upstream:cdd858547166aefcd00e45d209f6b31d63d569dc] Signed-off-by: Modular Magician --- image_basic/main.tf | 17 ++++++++++++--- image_basic_storage_location/main.tf | 17 ++++++++++++--- image_guest_os/main.tf | 31 ++++++++++++++++++++++++---- 3 files changed, 55 insertions(+), 10 deletions(-) diff --git a/image_basic/main.tf b/image_basic/main.tf index 176c6889..ad7288ca 100644 --- a/image_basic/main.tf +++ b/image_basic/main.tf @@ -1,7 +1,18 @@ +data "google_compute_image" "debian" { + family = "debian-12" + project = "debian-cloud" +} + +resource "google_compute_disk" "persistent" { + name = "example-disk-${local.name_suffix}" + image = data.google_compute_image.debian.self_link + size = 10 + type = "pd-ssd" + zone = "us-central1-a" +} + resource "google_compute_image" "example" { name = "example-image-${local.name_suffix}" - raw_disk { - source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz" - } + source_disk = google_compute_disk.persistent.id } diff --git a/image_basic_storage_location/main.tf b/image_basic_storage_location/main.tf index 3923d1b6..d1350ffe 100644 --- a/image_basic_storage_location/main.tf +++ b/image_basic_storage_location/main.tf @@ -1,8 +1,19 @@ +data "google_compute_image" "debian" { + family = "debian-12" + project = "debian-cloud" +} + +resource "google_compute_disk" "persistent" { + name = "example-disk-${local.name_suffix}" + image = data.google_compute_image.debian.self_link + size = 10 + type = "pd-ssd" + zone = "us-central1-a" +} + resource "google_compute_image" "example" { name = "example-sl-image-${local.name_suffix}" - raw_disk { - source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz" - } + source_disk = google_compute_disk.persistent.id storage_locations = ["us-central1"] } diff --git a/image_guest_os/main.tf b/image_guest_os/main.tf index 124ef74b..d325fd74 100644 --- a/image_guest_os/main.tf +++ b/image_guest_os/main.tf @@ -1,15 +1,38 @@ +data "google_compute_image" "debian" { + family = "debian-12" + project = "debian-cloud" +} + +resource "google_compute_disk" "persistent" { + name = "example-disk-${local.name_suffix}" + image = data.google_compute_image.debian.self_link + size = 10 + type = "pd-ssd" + zone = "us-central1-a" +} + resource "google_compute_image" "example" { name = "example-image-${local.name_suffix}" - raw_disk { - source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz" + source_disk = google_compute_disk.persistent.id + + guest_os_features { + type = "UEFI_COMPATIBLE" + } + + guest_os_features { + type = "VIRTIO_SCSI_MULTIQUEUE" + } + + guest_os_features { + type = "GVNIC" } guest_os_features { - type = "SECURE_BOOT" + type = "SEV_CAPABLE" } guest_os_features { - type = "MULTI_IP_SUBNET" + type = "SEV_LIVE_MIGRATABLE_V2" } }