Skip to content

Latest commit

 

History

History
119 lines (93 loc) · 4.98 KB

File metadata and controls

119 lines (93 loc) · 4.98 KB
title linkTitle page_title subcategory description
powerflex_nvme_host resource
powerflex_nvme_host
powerflex_nvme_host Resource - powerflex
This resource is used to manage NVMe host from the PowerFlex array. We can Create, Update and Delete the PowerFlex NVMe host using this resource. We can also import an existing NVMe host from PowerFlex array.

powerflex_nvme_host (Resource)

This resource is used to manage NVMe host from the PowerFlex array. We can Create, Update and Delete the PowerFlex NVMe host using this resource. We can also import an existing NVMe host from PowerFlex array.

Note:

  • NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this resource is not supported in PowerFlex 3.x.
  • Due to certain limitations, updating the NVMe host in PowerFlex versions earlier than 4.6 is not supported

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.
*/

# Command to run this tf file : terraform init && terraform plan && terraform apply.
# Create, Update, Read, and Delete operations are supported for this resource.
# To import , check import.sh for more info
# nqn is the required parameter to create
# To check which attributes can be updated, please refer Product Guide in the documentation
# Please note that 
# 1. NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this resource is not supported in PowerFlex 3.x.
# 2. Due to certain limitations, updating the NVMe host in PowerFlex versions earlier than 4.6 is not supported

# Example for adding NVMe host.
resource "powerflex_nvme_host" "test-nvme-host" {
  name              = "nvme_host_name"
  nqn               = "nqn.2014-08.org.nvmexpress:uuid:a10e4d56-a2c0-4cab-9a0a-9a7a4ebb8c0e"
  max_num_paths     = 4
  max_num_sys_ports = 10
}

After the execution of above resource block, NVMe host would have been created on the PowerFlex array. For more information, please check the terraform state file.

Schema

Required

  • nqn (String) NQN of the NVMe host. This attribute must be set during creation and cannot be modified afterwards.

Optional

  • max_num_paths (Number) Number of Paths Per Volume.
  • max_num_sys_ports (Number) Number of System Ports per Protection Domain.
  • name (String) Name of the NVMe host

Read-Only

  • id (String) ID of the NVMe host
  • system_id (String) The ID of the system.

Import

Import is supported using the following syntax:

# /*
# 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.
# */

# import NVMe host by its id
terraform import powerflex_nvme_host.nvme_host_import_by_id "<id>"
  1. This will import the NVMe host instance with specified ID into your Terraform state.
  2. After successful import, you can run terraform state list to ensure the resource has been imported successfully.
  3. Now, you can fill in the resource block with the appropriate arguments and settings that match the imported resource's real-world configuration.
  4. Execute terraform plan to see if your configuration and the imported resource are in sync. Make adjustments if needed.
  5. Finally, execute terraform apply to bring the resource fully under Terraform's management.
  6. Now, the resource which was not part of terraform became part of Terraform managed infrastructure.