title | linkTitle | page_title | subcategory | description |
---|---|---|---|---|
powerflex_nvme_target resource |
powerflex_nvme_target |
powerflex_nvme_target Resource - powerflex |
This resource is used to manage NVMe target from the PowerFlex array. We can Create, Update and Delete the PowerFlex NVMe target using this resource. We can also import an existing NVMe target from PowerFlex array.Note: Either protection_domain_id or protection_domain_name must be specified. |
This resource is used to manage NVMe target from the PowerFlex array. We can Create, Update and Delete the PowerFlex NVMe target using this resource. We can also import an existing NVMe target from PowerFlex array.
Note: Either protection_domain_id
or protection_domain_name
must be specified.
Caution: NVMe target creation or update is not atomic. In case of partially completed create operations, terraform can mark the resource as tainted. One can manually remove the taint and try applying the configuration (after making necessary adjustments). If the taint is not removed, terraform will destroy and recreate the resource.
Note:
- Either
protection_domain_name
andprotection_domain_id
is required. But not both.- NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this resource is not supported in PowerFlex 3.x.
- To avoid potential issues, it is recommended to operate NVMe targets using the default ports.
/*
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.
# name and ip_list attributes are required, and either protection_domain_name or protection_domain_id must be specified.
# To check which attributes can be updated, please refer Product Guide in the documentation
# Please note that NVMe over TCP is supported in PowerFlex 4.0 and later versions, therefore this resource is not supported in PowerFlex 3.x.
# To avoid potential issues, it is recommended to operate NVMe targets using the default ports.
# Example for adding NVMe target.
resource "powerflex_nvme_target" "test-nvme-target" {
name = "nvme_target_name"
protection_domain_name = "demo-pd"
ip_list = [
{
ip = "10.10.10.13"
role = "StorageAndHost" #StorageAndHost, StorageOnly, HostOnly
},
{
ip = "10.10.10.14"
role = "StorageAndHost" #StorageAndHost, StorageOnly, HostOnly
}
]
}
After the execution of above resource block, NVMe target would have been created on the PowerFlex array. For more information, please check the terraform state file.
ip_list
(Attributes Set) List of IPs associated with the NVMe target. (see below for nested schema)name
(String) Name of the NVMe target
discovery_port
(Number) The discovery port of the NVMe target (default: 8009).maintenance_state
(String) The maintenance state of the NVMe target. Active to trigger enter maintenance mode; Inactive to exit maintenance mode.nvme_port
(Number) The NVMe port of the NVMe target (default: 4420).protection_domain_id
(String) ID of the Protection Domain under which the NVMe target will be created. Conflicts with 'protection_domain_name'. Cannot be updated.Note: Eitherprotection_domain_id
orprotection_domain_name
must be specified.protection_domain_name
(String) Name of the Protection Domain under which the NVMe target will be created. Conflicts with 'protection_domain_id'. Cannot be updated.Note: Eitherprotection_domain_id
orprotection_domain_name
must be specified.storage_port
(Number) The storage port of the NVMe target (default: 12200).
authentication_error
(String) The authentication error of the NVMe target.fault_set_id
(String) The fault set ID of the NVMe target.id
(String) ID of the NVMe targetmdm_connection_state
(String) The MDM connection state of the NVMe target.membership_state
(String) The membership state of the NVMe target.sdt_state
(String) The state of the NVMe target.software_version_info
(String) The software version information of the NVMe target.system_id
(String) The ID of the system.
Required:
ip
(String) NVMe Target IP.role
(String) NVMe Target IP role.
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 target by its id
terraform import powerflex_nvme_target.nvme_target_import_by_id "<id>"
- This will import the NVMe target instance with specified ID into your Terraform state.
- After successful import, you can run terraform state list to ensure the resource has been imported successfully.
- Now, you can fill in the resource block with the appropriate arguments and settings that match the imported resource's real-world configuration.
- Execute terraform plan to see if your configuration and the imported resource are in sync. Make adjustments if needed.
- Finally, execute terraform apply to bring the resource fully under Terraform's management.
- Now, the resource which was not part of terraform became part of Terraform managed infrastructure.