pulumi_wasm_providers_gcp_mini::compute

Module snapshot

source
Expand description

Represents a Persistent Disk Snapshot resource.

Use snapshots to back up data from your persistent disks. Snapshots are different from public images and custom images, which are used primarily to create instances or configure instance templates. Snapshots are useful for periodic backup of the data on your persistent disks. You can create snapshots from persistent disks even while they are attached to running instances.

Snapshots are incremental, so you can create regular snapshots on a persistent disk faster and at a much lower cost than if you regularly created a full image of the disk.

To get more information about Snapshot, see:

§Example Usage

§Snapshot Basic

resources:
  snapshot:
    type: gcp:compute:Snapshot
    properties:
      name: my-snapshot
      sourceDisk: ${persistent.id}
      zone: us-central1-a
      labels:
        my_label: value
      storageLocations:
        - us-central1
  persistent:
    type: gcp:compute:Disk
    properties:
      name: debian-disk
      image: ${debian.selfLink}
      size: 10
      type: pd-ssd
      zone: us-central1-a
variables:
  debian:
    fn::invoke:
      function: gcp:compute:getImage
      arguments:
        family: debian-11
        project: debian-cloud

§Snapshot Chainname

resources:
  snapshot:
    type: gcp:compute:Snapshot
    properties:
      name: my-snapshot
      sourceDisk: ${persistent.id}
      zone: us-central1-a
      chainName: snapshot-chain
      labels:
        my_label: value
      storageLocations:
        - us-central1
  persistent:
    type: gcp:compute:Disk
    properties:
      name: debian-disk
      image: ${debian.selfLink}
      size: 10
      type: pd-ssd
      zone: us-central1-a
variables:
  debian:
    fn::invoke:
      function: gcp:compute:getImage
      arguments:
        family: debian-11
        project: debian-cloud

§Import

Snapshot can be imported using any of these accepted formats:

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

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

  • {{name}}

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

$ pulumi import gcp:compute/snapshot:Snapshot default projects/{{project}}/global/snapshots/{{name}}
$ pulumi import gcp:compute/snapshot:Snapshot default {{project}}/{{name}}
$ pulumi import gcp:compute/snapshot:Snapshot default {{name}}

Structs§

Functions§

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