powerscale_nfs_export data source
powerscale_nfs_export (Data Source)
This datasource is used to query the existing NFS exports from PowerScale array. The information fetched from this datasource can be used for getting the details / for further processing in resource block. PowerScale provides an NFS server so you can share files on your cluster
Example Usage
/*
Copyright (c) 2023 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 provides an NFS server so you can share files on your cluster
# Returns a list of PowerScale NFS exports based on id and path filter block
data "powerscale_nfs_export" "test" {
filter = {
# Used for locally filtering id and path
ids = [1, 2, 3]
paths = ["/ifs/primary", "/ifs/secondary"]
# Used for query parameter, supported by PowerScale Platform API
# check = true
# dir = "ASC"
# limit = 10
# offset= 1
# path = "/ifs/primary"
# resume= "resume_token"
# scope = "user"
# 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_nfs_export.example_nfs_exports
output "powerscale_nfs_export" {
value = data.powerscale_nfs_export.example_nfs_exports
}
# Returns all of the PowerScale SMB shares in default zone
data "powerscale_nfs_export" "all" {
}
# Output value of above block by executing 'terraform output' command
# The user can use the fetched information by the variable data.powerscale_nfs_export.all
output "powerscale_nfs_export" {
value = data.powerscale_nfs_export.all
}
Schema
Optional
filter
(Block, Optional) (see below for nested schema)
Read-Only
id
(String) Identifiernfs_exports
(Attributes List) List of nfs exports (see below for nested schema)
Nested Schema for filter
Optional:
check
(Boolean) Check for conflicts when listing exports.dir
(String) The direction of the sort.ids
(Set of Number) IDs to filter nfs exports.limit
(Number) Return no more than this many results at once (see resume).offset
(Number) The position of the first item returned for a paginated query within the full result set.path
(String) If specified, only exports that explicitly reference at least one of the given paths will be returned.paths
(Set of String) Paths to filter nfs exports.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 nfs_exports
Read-Only:
all_dirs
(Boolean) True if all directories under the specified paths are mountable.block_size
(Number) Specifies the block size returned by the NFS statfs procedure.can_set_time
(Boolean) True if the client can set file times through the NFS set attribute request. This parameter does not affect server behavior, but is included to accommodate legacy client requirements.case_insensitive
(Boolean) True if the case is ignored for file names. This parameter does not affect server behavior, but is included to accommodate legacy client requirements.case_preserving
(Boolean) True if the case is preserved for file names. This parameter does not affect server behavior, but is included to accommodate legacy client requirements.chown_restricted
(Boolean) True if the superuser can change file ownership. This parameter does not affect server behavior, but is included to accommodate legacy client requirements.clients
(List of String) Specifies the clients with root access to the export.commit_asynchronous
(Boolean) True if NFS commit requests execute asynchronously.conflicting_paths
(List of String) Reports the paths that conflict with another export.description
(String) Specifies the user-defined string that is used to identify the export.directory_transfer_size
(Number) Specifies the preferred size for directory read operations. This value is used to advise the client of optimal settings for the server, but is not enforced.encoding
(String) Specifies the default character set encoding of the clients connecting to the export, unless otherwise specified.id
(Number) Specifies the system-assigned ID for the export. This ID is returned when an export is created through the POST method.link_max
(Number) Specifies the reported maximum number of links to a file. This parameter does not affect server behavior, but is included to accommodate legacy client requirements.map_all
(Attributes) Specifies the users and groups to which non-root and root clients are mapped. (see below for nested schema)map_failure
(Attributes) Specifies the users and groups to which non-root and root clients are mapped. (see below for nested schema)map_full
(Boolean) True if user mappings query the OneFS user database. When set to false, user mappings only query local authentication.map_lookup_uid
(Boolean) True if incoming user IDs (UIDs) are mapped to users in the OneFS user database. When set to false, incoming UIDs are applied directly to file operations.map_non_root
(Attributes) Specifies the users and groups to which non-root and root clients are mapped. (see below for nested schema)map_retry
(Boolean) Determines whether searches for users specified in ‘map_all’, ‘map_root’ or ‘map_nonroot’ are retried if the search fails.map_root
(Attributes) Specifies the users and groups to which non-root and root clients are mapped. (see below for nested schema)max_file_size
(Number) Specifies the maximum file size for any file accessed from the export. This parameter does not affect server behavior, but is included to accommodate legacy client requirements.name_max_size
(Number) Specifies the reported maximum length of a file name. This parameter does not affect server behavior, but is included to accommodate legacy client requirements.no_truncate
(Boolean) True if long file names result in an error. This parameter does not affect server behavior, but is included to accommodate legacy client requirements.paths
(List of String) Specifies the paths under /ifs that are exported.read_only
(Boolean) True if the export is set to read-only.read_only_clients
(List of String) Specifies the clients with read-only access to the export.read_transfer_max_size
(Number) Specifies the maximum buffer size that clients should use on NFS read requests. This value is used to advise the client of optimal settings for the server, but is not enforced.read_transfer_multiple
(Number) Specifies the preferred multiple size for NFS read requests. This value is used to advise the client of optimal settings for the server, but is not enforced.read_transfer_size
(Number) Specifies the preferred size for NFS read requests. This value is used to advise the client of optimal settings for the server, but is not enforced.read_write_clients
(List of String) Specifies the clients with both read and write access to the export, even when the export is set to read-only.readdirplus
(Boolean) True if ‘readdirplus’ requests are enabled. Enabling this property might improve network performance and is only available for NFSv3.readdirplus_prefetch
(Number) Sets the number of directory entries that are prefetched when a ‘readdirplus’ request is processed. (Deprecated.)return_32bit_file_ids
(Boolean) Limits the size of file identifiers returned by NFSv3+ to 32-bit values (may require remount).root_clients
(List of String) Clients that have root access to the export.security_flavors
(List of String) Specifies the authentication types that are supported for this export.setattr_asynchronous
(Boolean) True if set attribute operations execute asynchronously.snapshot
(String) Specifies the snapshot for all mounts.symlinks
(Boolean) True if symlinks are supported. This value is used to advise the client of optimal settings for the server, but is not enforced.time_delta
(Number) Specifies the resolution of all time values that are returned to the clientsunresolved_clients
(List of String) Reports clients that cannot be resolved.write_datasync_action
(String) Specifies the action to be taken when an NFSv3+ datasync write is requested.write_datasync_reply
(String) Specifies the stability disposition returned when an NFSv3+ datasync write is processed.write_filesync_action
(String) Specifies the action to be taken when an NFSv3+ filesync write is requested.write_filesync_reply
(String) Specifies the stability disposition returned when an NFSv3+ filesync write is processed.write_transfer_max_size
(Number) Specifies the maximum buffer size that clients should use on NFS write requests. This value is used to advise the client of optimal settings for the server, but is not enforced.write_transfer_multiple
(Number) Specifies the preferred multiple size for NFS write requests. This value is used to advise the client of optimal settings for the server, but is not enforced.write_transfer_size
(Number) Specifies the preferred multiple size for NFS write requests. This value is used to advise the client of optimal settings for the server, but is not enforced.write_unstable_action
(String) Specifies the action to be taken when an NFSv3+ unstable write is requested.write_unstable_reply
(String) Specifies the stability disposition returned when an NFSv3+ unstable write is processed.zone
(String) Specifies the zone in which the export is valid.
Nested Schema for nfs_exports.map_all
Optional:
enabled
(Boolean) True if the user mapping is applied.primary_group
(Attributes) Specifies the persona of the file group. (see below for nested schema)secondary_groups
(Attributes List) Specifies persona properties for the secondary user group. A persona consists of either a type and name, or an ID. (see below for nested schema)user
(Attributes) Specifies the persona of the file group. (see below for nested schema)
Nested Schema for nfs_exports.map_all.primary_group
Optional:
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 nfs_exports.map_all.secondary_groups
Optional:
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 nfs_exports.map_all.user
Optional:
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 nfs_exports.map_failure
Optional:
enabled
(Boolean) True if the user mapping is applied.primary_group
(Attributes) Specifies the persona of the file group. (see below for nested schema)secondary_groups
(Attributes List) Specifies persona properties for the secondary user group. A persona consists of either a type and name, or an ID. (see below for nested schema)user
(Attributes) Specifies the persona of the file group. (see below for nested schema)
Nested Schema for nfs_exports.map_failure.primary_group
Optional:
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 nfs_exports.map_failure.secondary_groups
Optional:
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 nfs_exports.map_failure.user
Optional:
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 nfs_exports.map_non_root
Optional:
enabled
(Boolean) True if the user mapping is applied.primary_group
(Attributes) Specifies the persona of the file group. (see below for nested schema)secondary_groups
(Attributes List) Specifies persona properties for the secondary user group. A persona consists of either a type and name, or an ID. (see below for nested schema)user
(Attributes) Specifies the persona of the file group. (see below for nested schema)
Nested Schema for nfs_exports.map_non_root.primary_group
Optional:
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 nfs_exports.map_non_root.secondary_groups
Optional:
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 nfs_exports.map_non_root.user
Optional:
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 nfs_exports.map_root
Optional:
enabled
(Boolean) True if the user mapping is applied.primary_group
(Attributes) Specifies the persona of the file group. (see below for nested schema)secondary_groups
(Attributes List) Specifies persona properties for the secondary user group. A persona consists of either a type and name, or an ID. (see below for nested schema)user
(Attributes) Specifies the persona of the file group. (see below for nested schema)
Nested Schema for nfs_exports.map_root.primary_group
Optional:
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 nfs_exports.map_root.secondary_groups
Optional:
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 nfs_exports.map_root.user
Optional:
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.