Google Filestore Instance

This page shows how to write Terraform for Filestore Instance and write them securely.

google_filestore_instance (Terraform)

The Instance in Filestore can be configured in Terraform with the resource name google_filestore_instance. The following sections describe 3 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L16
resource "google_filestore_instance" "tools" {
  name = "tools"
  zone = var.zone
  tier = "BASIC_HDD"

  file_shares {
main.tf#L16
resource "google_filestore_instance" "tools" {
  name = "tools"
  zone = var.zone
  tier = "BASIC_HDD"

  file_shares {
main.tf#L16
resource "google_filestore_instance" "tools" {
  name = "tools"
  project = var.project
  zone = var.zone
  tier = "BASIC_HDD"

Review your Terraform file for Google best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Creation timestamp in RFC3339 text format.

A description of the instance.

  • etag optional computed - string

Server-specified ETag for the instance resource to prevent simultaneous updates from overwriting each other.

  • id optional computed - string
  • labels optional - map from string to string

Resource labels to represent user-provided metadata.

The resource name of the instance.

The service tier of the instance. Possible values: ["TIER_UNSPECIFIED", "STANDARD", "PREMIUM", "BASIC_HDD", "BASIC_SSD", "HIGH_SCALE_SSD"]

The name of the Filestore zone of the instance.

  • file_shares list block

    File share capacity in GiB. This must be at least 1024 GiB for the standard tier, or 2560 GiB for the premium tier.

    The name of the fileshare (16 characters or less)

  • networks list block

    A list of IPv4 or IPv6 addresses.

    • modes required - list of string

    IP versions for which the instance has IP addresses assigned. Possible values: ["ADDRESS_MODE_UNSPECIFIED", "MODE_IPV4", "MODE_IPV6"]

    The name of the GCE VPC network to which the instance is connected.

    A /29 CIDR block that identifies the range of IP addresses reserved for this instance.

  • timeouts single block

Explanation in Terraform Registry

A Google Cloud Filestore instance. To get more information about Instance, see:

Frequently asked questions

What is Google Filestore Instance?

Google Filestore Instance is a resource for Filestore of Google Cloud Platform. Settings can be wrote in Terraform.

Where can I find the example code for the Google Filestore Instance?

For Terraform, the GoogleCloudPlatform/eda-examples, mmm/crd-workstations and ziwang492/gcp_slurm_job_based_accounting source code examples are useful. See the Terraform Example section for further details.

security-icon

Automate config file reviews on your commits

Fix issues in your infrastructure as code with auto-generated patches.