powerscale_smb_share (Data Source)

This datasource is used to query the existing SMB shares from PowerScale array. The information fetched from this datasource can be used for getting the details or for further processing in resource block. PowerScale SMB shares provide clients network access to file system resources on the cluster.

Example Usage

/*
Copyright (c) 2023-2024 Dell Inc., or its subsidiaries. All Rights Reserved.

Licensed under the Mozilla Public License Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://mozilla.org/MPL/2.0/


Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

# PowerScale SMB shares provide clients network access to file system resources on the cluster

# Returns a list of PowerScale SMB shares based on name filter block
data "powerscale_smb_share" "example_smb_shares" {
  filter {
    # Used for specify names of SMB shares
    names = ["tfacc_smb_share"]

    # Used for query parameter, supported by PowerScale Platform API
    # dir = "ASC"
    # limit = 1
    # offset = "0"
    # resume = "resume-token"
    # scope = "default"
    # sort = "id"
    # zone = System
  }
}

# Output value of above block by executing 'terraform output' command
# The user can use the fetched information by the variable data.powerscale_smb_share.example_smb_shares
output "powerscale_smb_share" {
  value = data.powerscale_smb_share.example_smb_shares
}

# Returns all of the PowerScale SMB shares in default zone
data "powerscale_smb_share" "all" {
}

# Output value of above block by executing 'terraform output' command
# The user can use the fetched information by the variable data.powerscale_smb_share.all_smb_shares
output "powerscale_smb_share_data_all" {
  value = data.powerscale_smb_share.all_smb_shares
}

Schema

Optional

Read-Only

Nested Schema for filter

Optional:

  • dir (String) The direction of the sort.
  • limit (Number) Return no more than this many results at once (see resume).
  • names (Set of String) Names to filter smb shares.
  • offset (Number) The position of the first item returned for a paginated query within the full result set.
  • resume (String) Continue returning results from previous call using this token (token should come from the previous call, resume cannot be used with other options).
  • scope (String) If specified as “effective” or not specified, all fields are returned. If specified as “user”, only fields with non-default values are shown. If specified as “default”, the original values are returned.
  • sort (String) The field that will be used for sorting.
  • zone (String) Specifies which access zone to use.

Nested Schema for smb_shares

Read-Only:

  • access_based_enumeration (Boolean) Only enumerate files and folders the requesting user has access to.
  • access_based_enumeration_root_only (Boolean) Access-based enumeration on only the root directory of the share.
  • allow_delete_readonly (Boolean) Allow deletion of read-only files in the share.
  • allow_execute_always (Boolean) Allows users to execute files they have read rights for.
  • allow_variable_expansion (Boolean) Allow automatic expansion of variables for home directories.
  • auto_create_directory (Boolean) Automatically create home directories.
  • browsable (Boolean) Share is visible in net view and the browse list.
  • ca_timeout (Number) Persistent open timeout for the share.
  • ca_write_integrity (String) Specify the level of write-integrity on continuously available shares.
  • change_notify (String) Level of change notification alerts on the share.
  • continuously_available (Boolean) Specify if persistent opens are allowed on the share.
  • create_permissions (String) Create permissions for new files and directories in share.
  • csc_policy (String) Client-side caching policy for the shares.
  • description (String) Description for this SMB share.
  • directory_create_mask (Number) Directory create mask bits.
  • directory_create_mode (Number) Directory create mode bits.
  • file_create_mask (Number) File create mask bits.
  • file_create_mode (Number) File create mode bits.
  • file_filter_extensions (List of String) Specifies the list of file extensions.
  • file_filter_type (String) Specifies if filter list is for deny or allow. Default is deny.
  • file_filtering_enabled (Boolean) Enables file filtering on this zone.
  • hide_dot_files (Boolean) Hide files and directories that begin with a period ‘.’.
  • host_acl (List of String) An ACL expressing which hosts are allowed access. A deny clause must be the final entry.
  • id (String) Share ID.
  • impersonate_guest (String) Specify the condition in which user access is done as the guest account.
  • impersonate_user (String) User account to be used as guest account.
  • inheritable_path_acl (Boolean) Set the inheritable ACL on the share path.
  • mangle_byte_start (Number) Specifies the wchar_t starting point for automatic byte mangling.
  • mangle_map (List of String) Character mangle map.
  • name (String) Share name.
  • ntfs_acl_support (Boolean) Support NTFS ACLs on files and directories.
  • oplocks (Boolean) Support oplocks.
  • path (String) Path of share within /ifs.
  • permissions (Attributes List) Specifies an ordered list of permission modifications. (see below for nested schema)
  • run_as_root (Attributes List) Allow account to run as root. (see below for nested schema)
  • smb3_encryption_enabled (Boolean) Enables SMB3 encryption for the share.
  • sparse_file (Boolean) Enables sparse file.
  • strict_ca_lockout (Boolean) Specifies if persistent opens would do strict lockout on the share.
  • strict_flush (Boolean) Handle SMB flush operations.
  • strict_locking (Boolean) Specifies whether byte range locks contend against SMB I/O.
  • zid (Number) Numeric ID of the access zone which contains this SMB share

Nested Schema for smb_shares.permissions

Read-Only:

  • permission (String) Specifies the file system rights that are allowed or denied.
  • permission_type (String) Determines whether the permission is allowed or denied.
  • trustee (Attributes) Specifies the persona of the file group. (see below for nested schema)

Nested Schema for smb_shares.permissions.trustee

Read-Only:

  • id (String) Specifies the serialized form of a persona, which can be ‘UID:0’, ‘USER:name’, ‘GID:0’, ‘GROUP:wheel’, or ‘SID:S-1-1’.
  • name (String) Specifies the persona name, which must be combined with a type.
  • type (String) Specifies the type of persona, which must be combined with a name.

Nested Schema for smb_shares.run_as_root

Read-Only:

  • id (String) Specifies the serialized form of a persona, which can be ‘UID:0’, ‘USER:name’, ‘GID:0’, ‘GROUP:wheel’, or ‘SID:S-1-1’.
  • name (String) Specifies the persona name, which must be combined with a type.
  • type (String) Specifies the type of persona, which must be combined with a name.