Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 1.59 KB

compute_snapshot.html.markdown

File metadata and controls

50 lines (35 loc) · 1.59 KB
subcategory page_title description
Compute Engine
Google: google_compute_snapshot
Get information about a Google Compute Snapshot.

google_compute_snapshot

To get more information about Snapshot, see:

Example Usage

#by name 
data "google_compute_snapshot" "snapshot" {
  name    = "my-snapshot"
}

# using a filter
data "google_compute_snapshot" "latest-snapshot" {
  filter      = "name != my-snapshot"
  most_recent = true
}

Argument Reference

The following arguments are supported:

  • name - (Optional) The name of the compute snapshot. One of name or filter must be provided.

  • filter - (Optional) A filter to retrieve the compute snapshot. See gcloud topic filters for reference. If multiple compute snapshot match, either adjust the filter or specify most_recent. One of name or filter must be provided.

  • most_recent - (Optional) If filter is provided, ensures the most recent snapshot is returned when multiple compute snapshot match.


  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Attributes Reference

See google_compute_snapshot resource for details of the available attributes.