FEATURES OPEN SOURCE ABOUT DOCS LOGIN REGISTER

google_compute_image

Creates a bootable VM image resource for Google Compute Engine from an existing tarball. For more information see the official documentation and API.

Example Usage

resource "google_compute_image" "bootable-image" {
  name       = "my-custom-image"
  raw_disk {
    source = "https://storage.googleapis.com/my-bucket/my-disk-image-tarball.tar.gz"
  }
}

resource "google_compute_instance" "vm" {
  name         = "vm-from-custom-image"
  machine_type = "n1-standard-1"
  zone         = "us-east1-c"

  disk {
    image = "${google_compute_image.bootable-image.self_link}"
  }

  network_interface {
	network = "default"
  }
}

Argument Reference

The following arguments are supported:

The raw_disk block supports:


Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:


See the source of this document at Terraform.io