title | linkTitle | page_title | subcategory | description |
---|---|---|---|---|
powerstore_storagecontainer resource |
powerstore_storagecontainer |
powerstore_storagecontainer Resource - powerstore |
This resource is used to manage the storage container entity of PowerStore Array. We can Create, Update and Delete the storage container using this resource. We can also import an existing storage container from PowerStore array. |
This resource is used to manage the storage container entity of PowerStore Array. We can Create, Update and Delete the storage container using this resource. We can also import an existing storage container from PowerStore array.
/*
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 storage_container_import.tf for more info
# name is the required attribute to create and update
# To check which attributes of the storage container can be updated, please refer Product Guide in the documentation
resource "powerstore_storagecontainer" "test1" {
name = "scterraform1"
quota = 10737418240
storage_protocol = "SCSI"
high_water_mark = 70
}
After the execution of above resource block, storage container container would have been created on the PowerStore array. For more information, Please check the terraform state file.
name
(String) Name for the storage container. This should be unique across all storage containers in the cluster.
high_water_mark
(Number) The percentage of the quota that can be consumed before an alert is raised. Allowed values are between50
and100
(inclusive).quota
(Number) The total number of bytes that can be provisioned/reserved against this storage container. A value of 0 means there is no limit.storage_protocol
(String) The storage protocol of Storage Container. Accepted values areSCSI
andNVMe
.
id
(String) The unique identifier of the storage container.
Import is supported using the following syntax:
# Below are the steps to import storage container :
# Step 1 - To import a storage container , we need the id of that storage container
# Step 2 - To check the id of the storage container we can make Get request to storage container endpoint. eg. https://10.0.0.1/api/rest/storage_container which will return list of all storage container ids.
# Step 3 - Add empty resource block in tf file.
# eg.
# resource "powerstore_storagecontainer" "resource_block_name" {
# (resource arguments)
# }
# Step 4 - Execute the command: terraform import "powerstore_storagecontainer.resource_block_name" "id_of_the_storage_container" (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