Skip to content

Share directories over SMB

When you finish, the /projects directory is shared as projects, and members of the engineering group can read and change its files from your client networks.

Before you start

  • A Qumulo cluster whose REST API on port 8000 you can reach from this machine
  • An admin account on the cluster for the connection profile
  • A group for the people who use the share, such as one from local users and groups
  • Terraform 1.11 or later

1. Copy the configuration

Save this as main.tf in an empty directory.

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

provider "qumulo" {
  connection_profiles = [
    {
      name                 = "cluster1"
      endpoint             = "https://cluster.example.com:8000" # <-- Replace with your cluster's REST API endpoint
      username             = "admin"
      password             = "YourClusterPassword123!" # <-- Replace with your admin password
      insecure_skip_verify = true
    },
  ]
}

resource "qumulo_smb_share" "projects" {
  connection_profile = "cluster1"

  share_name  = "projects"
  fs_path     = "/projects" # <-- Replace with the directory to share
  description = "Team project files"

  permission {
    type   = "ALLOWED"
    rights = ["READ", "MODIFY"]
    trustee {
      domain = "LOCAL"
      name   = "engineering" # <-- Replace with the group that uses the share
    }
  }

  network_permission {
    type           = "ALLOWED"
    address_ranges = ["10.0.0.0/8"] # <-- Replace with your client networks
    rights         = ["READ", "MODIFY"]
  }
}

Replace the five values marked <-- Replace, and leave the rest as written. The share creates /projects on the cluster if the directory does not exist yet.

Delete insecure_skip_verify if the cluster's certificate is signed by a CA your machine trusts.

2. Choose who can use the share

  • To require encryption on this share alone, set require_encryption = true.
  • To hide the files and folders a user cannot open, set access_based_enumeration_enabled = true.
  • For a read-only share open to everyone, set the trustee's name = "Everyone", delete its domain line, and set both rights lists to ["READ"].
  • To share another directory, copy the qumulo_smb_share block with a new resource name, share_name, and fs_path.

The plan in step 3 shows each permission and network_permission block as you wrote it.

3. Apply

terraform init -upgrade
terraform plan
terraform apply

The plan ends with Plan: 1 to add, 0 to change, 0 to destroy. The apply ends with Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

4. Check the share

terraform plan

The plan reports No changes. Your infrastructure matches the configuration., which confirms the cluster holds the share as you wrote it.

Next

Turn on signing and encryption for every share at once with Set SMB server settings, and read Qumulo's SMB share documentation for how share permissions behave. The qumulo_smb_share reference lists every attribute, Manage several clusters from one configuration creates the same shares across a fleet, and the cluster troubleshooting guide helps if a step fails.