qumulo_smb_share (Resource)¶
Manages an SMB share 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 Share¶
resource "qumulo_smb_share" "example" {
connection_profile = "prod"
share_name = "data"
fs_path = "/data"
}
Share with Permissions¶
resource "qumulo_smb_share" "secure" {
connection_profile = "prod"
share_name = "secure"
fs_path = "/secure"
description = "Secure share with restricted access"
permission {
type = "ALLOWED"
trustee {
domain = "LOCAL"
name = "admin"
}
rights = ["READ", "WRITE", "CHANGE_PERMISSIONS"]
}
network_permission {
type = "ALLOWED"
address_ranges = ["10.0.0.0/8"]
rights = ["READ", "WRITE"]
}
}
Multi-Cluster with for_each¶
variable "clusters" {
type = set(string)
}
resource "qumulo_smb_share" "data" {
for_each = var.clusters
connection_profile = each.value
share_name = "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
}
]
}
fs_path (String) The filesystem path for the share. The path will be created if it doesn't exist. Can be changed without replacing the share.
- share_name (String) The name of the SMB share. Can be changed without replacing the share.
Optional¶
access_based_enumeration_enabled(Boolean) Enable access-based enumeration for the share. If not specified, uses cluster default.bytes_per_sector(String) Bytes per sector reported to SMB clients. If not specified, uses cluster default.default_directory_create_mode(String) Default directory creation mode in octal (e.g., '0755'). If not specified, uses cluster default.default_file_create_mode(String) Default file creation mode in octal (e.g., '0644'). If not specified, uses cluster default.description(String) A description of the SMB share. If not specified, uses cluster default.hidden_from_auto_discovery(Boolean) Hide the share from automatic discovery. If not specified, uses cluster default.network_permission(Block List) Network-based permissions for the share. (see below for nested schema)permission(Block List) Trustee-based permissions for the share. (see below for nested schema)require_encryption(Boolean) Require SMB encryption for connections to this share. If not specified, uses cluster default.
Read-Only¶
id(String) The unique ID of the SMB share.tenant_id(Number) The tenant ID for the share.
Nested Schema for network_permission¶
Required:
address_ranges(List of String) List of CIDR address ranges.rights(List of String) List of rights: READ, WRITE, CHANGE_PERMISSIONS.type(String) Permission type: ALLOWED or DENIED.
Nested Schema for permission¶
Required:
rights(List of String) List of rights: READ, WRITE, CHANGE_PERMISSIONS.type(String) Permission type: ALLOWED or DENIED.
Optional:
trustee(Block, Optional) The trustee (user or group) to grant permissions to. (see below for nested schema)
Nested Schema for permission.trustee¶
Optional:
auth_id(String) Auth ID of the trustee.domain(String) Domain of the trustee (e.g., LOCAL, AD domain).gid(String) GID of the trustee.name(String) Name of the trustee.sid(String) SID of the trustee.uid(String) UID of the trustee.