pvm

Preemptible VMs

Compute & WebGCP
General

General information about the service.

Description

Preemptible VMs are short-lived, cost-effective Compute Engine instances suitable for fault-tolerant and batch workloads. They offer up to 60-80% discount over regular instances.

Service ID

compute.googleapis.com

Resource Pattern

projects/{project}/zones/{zone}/instances/{instance}

Chat

Powered by AI

Talk to this service to learn more about it.

Suggested questions:

Naming

The conventions, rules, and restrictions for naming this service.

Naming Convention

pvm-{workload}-{env}

Length

1-63

Valid Characters

Lowercase letters, numbers, hyphens

Scope

zonal

Code

Deploy your infrastructure as code using your preferred tooling.

Official DocumentationTerraform
terraform
1resource "google_compute_instance" "main" {
2 name = "pvm-${var.workload}-${var.environment}"
3 machine_type = "e2-standard-4"
4 zone = var.zone
5 scheduling {
6 preemptible = true
7 automatic_restart = false
8 }
9 boot_disk {
10 initialize_params {
11 image = "debian-cloud/debian-11"
12 }
13 }
14 network_interface {
15 network = "default"
16 }
17}
Utilities

Utilities to support app deployment or configuration.