powerflex_fault_set (Resource)

This resource is used to manage the Fault Set entity of PowerFlex Array. We can Create, Update and Delete the fault set using this resource. We can also import an existing fault set from PowerFlex array.

Example Usage

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

# 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
# name and protection_domain_id is the required parameter to create or update 
# To check which attributes of the fault set can be updated, please refer Product Guide in the documentation


resource "powerflex_fault_set" "avengers-fs-create" {
  # Name of the fault set
  name = "avengers-fs-create2"

  # To create / update, protection_domain_id is required
  protection_domain_id = "202a046600000000"
}

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

Schema

Required

  • name (String) Name of the Fault set
  • protection_domain_id (String) ID of the Protection Domain under which the fault set will be created. Cannot be updated.

Read-Only

  • id (String) ID of the Fault Set

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 fault set by it's id
terraform import powerflex_fault_set.fs_import_by_id "<id>"
  1. This will import the fault set 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.