title | linkTitle | page_title | subcategory | description |
---|---|---|---|---|
powerstore_volumegroup resource |
powerstore_volumegroup |
powerstore_volumegroup Resource - powerstore |
This resource is used to manage the volumegroup entity of PowerStore Array. We can Create, Update and Delete the volumegroup using this resource. We can also import an existing host from volumegroup array. |
This resource is used to manage the volumegroup entity of PowerStore Array. We can Create, Update and Delete the volumegroup using this resource. We can also import an existing host from volumegroup array.
Note: Exactly one of
volume_ids
andvolume_names
is required.
Note: Exactly one ofprotection_policy_id
andprotection_policy_name
is required.
/*
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.
*/
# Commands to run this tf file : terraform init && terraform plan && terraform apply
# Create, Update, Delete is supported for this resource
# To import , check volume_group_import.tf for more info
# name is the required attribute to create and update
# Volume datasource can be used to fetch volume id/name.
# Protection policy datasource can be used to fetch protection policy id/name.
# To check which attributes of the volume group can be updated, please refer Product Guide in the documentation
resource "powerstore_volumegroup" "terraform-provider-test1" {
# (resource arguments)
description = "Creating Volume Group"
name = "test_volume_group"
is_write_order_consistent = "false"
protection_policy_id = "01b8521d-26f5-479f-ac7d-3d8666097094"
volume_ids = ["140bb395-1d85-49ae-bde8-35070383bd92"]
}
After the execution of above resource block, volume group would have been created on the PowerStore array. For more information, Please check the terraform state file.
name
(String) Name of the volume group.
description
(String) Description for the volume group.is_write_order_consistent
(Boolean) Determines whether snapshot sets of the group will be write order consistent.protection_policy_id
(String) Unique identifier of the protection policy assigned to the volume group. Conflicts withprotection_policy_name
.protection_policy_name
(String) Unique name of the protection policy assigned to the volume group. Conflicts withprotection_policy_id
.volume_ids
(Set of String) A list of identifiers of existing volumes that should be added to the volume group. Conflicts withvolume_names
.volume_names
(Set of String) A list of names of existing volumes that should be added to the volume group. Conflicts withvolume_ids
.
id
(String) Unique identifier of the volume group.
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.
# Below are the steps to import volume group :
# Step 1 - To import a volume group , we need the id of that volume group
# Step 2 - To check the id of the volume group we can make use of volume group datasource to read required/all volume group ids. Alternatively, we can make GET request to volume group endpoint. eg. https://10.0.0.1/api/rest/volume_group which will return list of all volume group ids.
# Step 3 - Add empty resource block in tf file.
# eg.
# resource "powerstore_volumegroup" "resource_block_name" {
# (resource arguments)
# }
# Step 4 - Execute the command: terraform import "powerstore_volumegroup.resource_block_name" "id_of_the_volume_group" (resource_block_name must be taken from step 3 and id must be taken from step 2)
# Step 5 - After successful execution of the command , check the state file