powerstore_recycle_bin_config (Resource)

This resource is used to manage the PowerStore recycle bin. It supports three modes of operation:

  1. Config mode: Set expiration_duration (0–30 days) to configure the retention policy.
  2. Item action mode: Specify resource_id or resource_name with action (recover or delete) to recover or permanently delete items.
  3. Empty mode: Set empty_recycle_bin = true to permanently delete all items from the recycle bin.

Note: Running terraform destroy on this resource only removes it from Terraform state.

Example Usage

/*
Copyright (c) 2026 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
# This resource manages the recycle bin configuration and item recovery/deletion
# It has three modes of operation:
# 1. Config mode: Set expiration_duration (0-30 days)
# 2. Item action mode: Recover or delete items by resource_id or resource_name
# 3. Empty mode: Empty the entire recycle bin

# Example: Set recycle bin expiration duration to 7 days
resource "powerstore_recycle_bin_config" "example" {
  expiration_duration = 7
}

Schema

Optional

  • action (String) The action to perform on the recycle bin item. Valid values: recover, delete.
  • empty_recycle_bin (Boolean) When set to true, empties the entire recycle bin by permanently deleting all items.
  • expiration_duration (Number) Duration in days for items to remain in the recycle bin before automatic purging. Valid range is 0 to 30.
  • resource_id (String) The unique identifier of the recycle bin item to recover or delete.
  • resource_name (String) The name of the deleted resource in the recycle bin.
  • resource_type (String) The type of resource to filter when using resource_name. Valid values: volume, volume_group.

Read-Only

  • id (String) The unique identifier of the resource.

Import

Import is supported using the following syntax:

#Copyright (c) 2026 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 recycle bin config :
# Step 1 - To import recycle bin config, use id "0" (the config ID is always 0)
# Step 2 - Add empty resource block in tf file
# eg.
# resource "powerstore_recycle_bin_config" "resource_block_name" {
#   expiration_duration = 7
# }
# Step 3 - Execute the command: terraform import "powerstore_recycle_bin_config.resource_block_name" "0"
# Step 4 - After successful execution of the command, check the state file