google_filestore_snapshot

A Google Cloud Filestore snapshot.

To get more information about Snapshot, see:

Open in Cloud Shell

Example Usage - Filestore Snapshot Basic

resource "google_filestore_snapshot" "snapshot" {
  name     = "test-snapshot"
  instance = google_filestore_instance.instance.name
  location = "us-east1"
}

resource "google_filestore_instance" "instance" {
  name     = "test-instance-for-snapshot"
  location = "us-east1"
  tier     = "ENTERPRISE"

  file_shares {
    capacity_gb = 1024
    name        = "share1"
  }

  networks {
    network = "default"
    modes   = ["MODE_IPV4"]
  }
}
Open in Cloud Shell

Example Usage - Filestore Snapshot Full

resource "google_filestore_snapshot" "snapshot" {
  name     = "test-snapshot"
  instance = google_filestore_instance.instance.name
  location = "us-west1"

  description = "Snapshot of test-instance-for-snapshot"

  labels = {
    my_label = "value"
  }
}

resource "google_filestore_instance" "instance" {
  name     = "test-instance-for-snapshot"
  location = "us-west1"
  tier     = "ENTERPRISE"

  file_shares {
    capacity_gb = 1024
    name        = "share1"
  }

  networks {
    network = "default"
    modes   = ["MODE_IPV4"]
  }
}

Argument Reference

The following arguments are supported:


Attributes Reference

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

Timeouts

This resource provides the following Timeouts configuration options:

Import

Snapshot can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import Snapshot using one of the formats above. For example:

import {
  id = "projects/{{project}}/locations/{{location}}/instances/{{instance}}/snapshots/{{name}}"
  to = google_filestore_snapshot.default
}

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

$ terraform import google_filestore_snapshot.default projects/{{project}}/locations/{{location}}/instances/{{instance}}/snapshots/{{name}}
$ terraform import google_filestore_snapshot.default {{project}}/{{location}}/{{instance}}/{{name}}
$ terraform import google_filestore_snapshot.default {{location}}/{{instance}}/{{name}}

User Project Overrides

This resource supports User Project Overrides.