powerflex_system (Resource)

This resource is used to manage the cluster level operations of the PowerFlex Array. This resource supports Create, Update and Delete operations.

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, Delete is supported for this resource
# To import, check import.sh for more info
# restricted_mode is the required parameter

resource "powerflex_system" "test" {
  restricted_mode = "Guid"
  sdc_approved_ips = [
    {
      id  = "sdc_id1"
      ips = ["sdc_ip1", "sdc_ip2"]
    },
    {
      id  = "sdc_id2"
      ips = ["sdc_ip3"]
    },
  ]
}

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

Schema

Required

  • restricted_mode (String) Restricted mode of the cluster. Accepted values are None, Guid, ApprovedIp.

Optional

  • sdc_approved_ips (Attributes List) Specifies list of SDC IPs. (see below for nested schema)
  • sdc_guids (List of String) Specifies list of SDC GUIDs.
  • sdc_ids (List of String) Specifies list of SDC IDs.
  • sdc_names (List of String) Specifies list of SDC names.

Read-Only

  • id (String) System ID

Nested Schema for sdc_approved_ips

Required:

  • id (String) SDC ID.
  • ips (Set of String) SDC IPs.

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

# import system
terraform import powerflex_system.test ""

# Another way to import system using system ID
terraform import powerflex_system.test "system_id"
  1. This will import the system 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.