powerscale_nfs_alias (Resource)

This resource is used to manage the NFS Alias entity of PowerScale Array. We can Create, Update and Delete the NFS Aliases using this resource. We can also import an existing NFS Alias from PowerScale array.

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.
# After `terraform apply` of this example file will create the nfs alias on the PowerScale array with the attributes set in the config.
# For update, only name and path is supported. Zone Cannot be updated.

resource "powerscale_nfs_alias" "example" {
  # Required field both for creating and updating
  name = "/exampleNfs"
  path = "/ifs"

  # Optional attribute for creating and updating
  zone = "System"
}

Schema

Required

  • name (String) Specifies the name by which the alias can be referenced.
  • path (String) Specifies the path to which the alias points.

Optional

  • zone (String) Specifies the zone in which the alias is valid.

Read-Only

  • health (String) Specifies whether the alias is usable.
  • id (String) Specifies a string which represents the unique location of the alias.

Unless specified otherwise, all fields of this resource can be updated.

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_alias.example global_setting name_of_nfs_alias
# Example:
terraform import powerscale_nfs_alias.example global_setting "alias"
# after running this command, populate parameters in the config file to start managing this resource.
# Note: running "terraform show" after importing shows the current config/state of the resource.