pulumi_wasm_providers_gcp_mini::compute

Module image

source
Expand description

Represents an Image resource.

Google Compute Engine uses operating system images to create the root persistent disks for your instances. You specify an image when you create an instance. Images contain a boot loader, an operating system, and a root file system. Linux operating system images are also capable of running containers on Compute Engine.

Images can be either public or custom.

Public images are provided and maintained by Google, open-source communities, and third-party vendors. By default, all projects have access to these images and can use them to create instances. Custom images are available only to your project. You can create a custom image from root persistent disks and other images. Then, use the custom image to create an instance.

To get more information about Image, see:

§Example Usage

§Image Basic

resources:
  persistent:
    type: gcp:compute:Disk
    properties:
      name: example-disk
      image: ${debian.selfLink}
      size: 10
      type: pd-ssd
      zone: us-central1-a
  example:
    type: gcp:compute:Image
    properties:
      name: example-image
      sourceDisk: ${persistent.id}
variables:
  debian:
    fn::invoke:
      function: gcp:compute:getImage
      arguments:
        family: debian-12
        project: debian-cloud

§Image Guest Os

resources:
  persistent:
    type: gcp:compute:Disk
    properties:
      name: example-disk
      image: ${debian.selfLink}
      size: 10
      type: pd-ssd
      zone: us-central1-a
  example:
    type: gcp:compute:Image
    properties:
      name: example-image
      sourceDisk: ${persistent.id}
      guestOsFeatures:
        - type: UEFI_COMPATIBLE
        - type: VIRTIO_SCSI_MULTIQUEUE
        - type: GVNIC
        - type: SEV_CAPABLE
        - type: SEV_LIVE_MIGRATABLE_V2
variables:
  debian:
    fn::invoke:
      function: gcp:compute:getImage
      arguments:
        family: debian-12
        project: debian-cloud

§Image Basic Storage Location

resources:
  persistent:
    type: gcp:compute:Disk
    properties:
      name: example-disk
      image: ${debian.selfLink}
      size: 10
      type: pd-ssd
      zone: us-central1-a
  example:
    type: gcp:compute:Image
    properties:
      name: example-sl-image
      sourceDisk: ${persistent.id}
      storageLocations:
        - us-central1
variables:
  debian:
    fn::invoke:
      function: gcp:compute:getImage
      arguments:
        family: debian-12
        project: debian-cloud

§Import

Image can be imported using any of these accepted formats:

  • projects/{{project}}/global/images/{{name}}

  • {{project}}/{{name}}

  • {{name}}

When using the pulumi import command, Image can be imported using one of the formats above. For example:

$ pulumi import gcp:compute/image:Image default projects/{{project}}/global/images/{{name}}
$ pulumi import gcp:compute/image:Image default {{project}}/{{name}}
$ pulumi import gcp:compute/image:Image default {{name}}

Structs§

Functions§

  • Registers a new resource with the given unique name and arguments