Skip to content
Merged
Show file tree
Hide file tree
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
17 changes: 14 additions & 3 deletions image_basic/main.tf
Original file line number Diff line number Diff line change
@@ -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
}
17 changes: 14 additions & 3 deletions image_basic_storage_location/main.tf
Original file line number Diff line number Diff line change
@@ -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"]
}
31 changes: 27 additions & 4 deletions image_guest_os/main.tf
Original file line number Diff line number Diff line change
@@ -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"
}
}