powerscale_nfs_export_settings (Resource)

This resource is used to manage the NFS Export Settings of PowerScale Array. We can Create, Update and Delete the NFS Export Settings using this resource.
Note that, NFS Export Settings is the native functionality of PowerScale. When creating the resource, we actually load NFS Export Settings from PowerScale to the resource.

Example Usage

/*
Copyright (c) 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.
*/

# Available actions: Create, Update, Delete and Import.
# If resource arguments are omitted, `terraform apply` will load NFS export settings from PowerScale, and save to terraform state file.
# If any resource arguments are specified, `terraform apply` will try to load NFS export settings (if not loaded) and update the settings.
# `terraform destroy` will delete the resource from terraform state file rather than deleting NFS export settings from PowerScale.
# For more information, Please check the terraform state file.

# PowerScale NFS Export Settings allow you to configure NFS export settings on PowerScale.
resource "powerscale_nfs_export_settings" "example" {
  # Optional fields both for creating and updating
  #  all_dirs = false
  #  case_insensitive = false
  #  case_preserving = true
  #  commit_asynchronous = false
  #  no_truncate = false
  #  write_datasync_action = "DATASYNC"
  #  security_flavors = ["unix"]
  #  map_non_root = {
  #    enabled = false
  #    primary_group = {}
  #    secondary_groups = []
  #    user = {
  #      id = "USER:nobody"
  #    }
  #  }
  #
  # Specifies the zone in which the export is valid. Notice that update this field will change the resource you manage.
  #  zone = "System"
}

# After the execution of above resource block, NFS export settings would have been cached in terraform state file, or
# NFS export settings would have been updated on PowerScale.
# For more information, Please check the terraform state file.

Schema

Optional

  • 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.
  • commit_asynchronous (Boolean) True if NFS commit requests execute asynchronously.
  • 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.
  • 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.
  • read_only (Boolean) True if the export is set to read-only.
  • 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.
  • 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).
  • 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. Use “-” to set to default value.
  • 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 clients
  • 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.

Read-Only

  • id (String) Id of NFS Export settings. Readonly.

Nested Schema for 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 map_all.primary_group

Optional:

  • id (String) Specifies the serialized form of a persona, which can be ‘GID:0’, ‘GROUP:wheel’
  • 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 map_all.secondary_groups

Optional:

  • id (String) Specifies the serialized form of a persona, which can be ‘GID:0’, ‘GROUP:wheel’
  • 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 map_all.user

Optional:

  • id (String) Specifies the serialized form of a persona, which can be ‘GID:0’, ‘GROUP:wheel’
  • 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 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 map_failure.primary_group

Optional:

  • id (String) Specifies the serialized form of a persona, which can be ‘GID:0’, ‘GROUP:wheel’
  • 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 map_failure.secondary_groups

Optional:

  • id (String) Specifies the serialized form of a persona, which can be ‘GID:0’, ‘GROUP:wheel’
  • 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 map_failure.user

Optional:

  • id (String) Specifies the serialized form of a persona, which can be ‘GID:0’, ‘GROUP:wheel’
  • 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 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 map_non_root.primary_group

Optional:

  • id (String) Specifies the serialized form of a persona, which can be ‘GID:0’, ‘GROUP:wheel’
  • 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 map_non_root.secondary_groups

Optional:

  • id (String) Specifies the serialized form of a persona, which can be ‘GID:0’, ‘GROUP:wheel’
  • 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 map_non_root.user

Optional:

  • id (String) Specifies the serialized form of a persona, which can be ‘GID:0’, ‘GROUP:wheel’
  • 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 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 map_root.primary_group

Optional:

  • id (String) Specifies the serialized form of a persona, which can be ‘GID:0’, ‘GROUP:wheel’
  • 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 map_root.secondary_groups

Optional:

  • id (String) Specifies the serialized form of a persona, which can be ‘GID:0’, ‘GROUP:wheel’
  • 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 map_root.user

Optional:

  • id (String) Specifies the serialized form of a persona, which can be ‘GID:0’, ‘GROUP:wheel’
  • 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.

Import

Import is supported using the following syntax:

# Copyright (c) 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.

# The command is
# terraform import powerscale_nfs_export_settings.example <zoneName>
# Example:
terraform import powerscale_nfs_export_settings.example zoneName
# after running this command, populate the name field and other required parameters in the config file to start managing this resource.
# Note: running "terraform show" after importing shows the current config/state of the resource. You can copy/paste that config to make it easier to manage the resource.