Skip to content

qumulo_nfs_export (Resource)

Manages an NFS export on a Qumulo cluster.

Example Usage

Installation

terraform {
  required_providers {
    qumulo = {
      source  = "qumulo-terraform-registry.s3.us-east-1.amazonaws.com/qumulo/qumulo"
      version = "~> 1.0"
    }
  }
}

Basic Export

resource "qumulo_nfs_export" "data" {
  connection_profile = "prod"

  export_path = "/data"
  fs_path     = "/data"
}

Export with Restrictions

resource "qumulo_nfs_export" "secure" {
  connection_profile = "prod"

  export_path = "/secure"
  fs_path     = "/secure"
  description = "Secure export with restricted access"

  restriction {
    host_restrictions       = ["10.0.0.0/8", "192.168.1.0/24"]
    read_only               = false
    require_privileged_port = true
    user_mapping            = "NFS_MAP_ROOT"

    map_to_user = {
      id_type  = "LOCAL_USER"
      id_value = "nfsnobody"
    }
  }
}

Multi-Cluster with for_each

variable "clusters" {
  type = set(string)
  default = ["prod", "dr"]
}

resource "qumulo_nfs_export" "data" {
  for_each = var.clusters

  connection_profile = each.value

  export_path = "/data"
  fs_path     = "/data"
}

Schema

Required

  • connection_profile (String) Name of a connection profile defined in the provider block.

Connection profiles centralize cluster credentials at the provider level. Define profiles in the provider block:

provider "qumulo" {
  connection_profiles = [
    {
      name                 = "prod"
      endpoint             = "https://cluster.example.com:8000"
      username             = "admin"
      password             = var.cluster_password
      insecure_skip_verify = true  # For self-signed certificates
    }
  ]
}
- export_path (String) The NFS export path (e.g., '/data'). Must start with '/'. Can be changed without replacing the export. - fs_path (String) The filesystem path for the export. The path will be created if it doesn't exist. Can be changed without replacing the export.

Optional

  • description (String) A description of the NFS export. If not specified, preserves existing value on update.
  • fields_to_present_as_32_bit (List of String) Fields to present as 32-bit values (e.g., 'FILE_IDS'). If not specified, preserves existing value on update.
  • restriction (Block List) Access restrictions for the NFS export. (see below for nested schema)

Read-Only

  • id (String) The unique ID of the NFS export.
  • tenant_id (Number) The tenant ID for the export.

Nested Schema for restriction

Optional:

  • host_restrictions (List of String) List of allowed hosts/networks (e.g., '10.0.0.0/8'). Defaults to '*' (all hosts).
  • map_to_group (Attributes) Group identity to map to when user_mapping is NFS_MAP_ROOT or NFS_MAP_ALL. (see below for nested schema)
  • map_to_user (Attributes) User identity to map to when user_mapping is NFS_MAP_ROOT or NFS_MAP_ALL. (see below for nested schema)
  • read_only (Boolean) Export as read-only.
  • require_privileged_port (Boolean) Require connections from privileged ports (< 1024).
  • required_authentication_mode (String) Required authentication mode: AUTHENTICATION_MODE_NONE or AUTHENTICATION_MODE_KRB5.
  • user_mapping (String) User mapping mode: NFS_MAP_NONE, NFS_MAP_ROOT, or NFS_MAP_ALL.

Nested Schema for restriction.map_to_group

Required:

  • id_type (String) Identity type (e.g., 'LOCAL_GROUP', 'NFS_GID').
  • id_value (String) Identity value (e.g., group name or GID).

Nested Schema for restriction.map_to_user

Required:

  • id_type (String) Identity type (e.g., 'LOCAL_USER', 'NFS_UID').
  • id_value (String) Identity value (e.g., username or UID).