powerflex_volume_action_v2 (Resource)

This resource performs actions on volumes for PowerFlex Gen2 systems (5.0+). Supported actions: refresh, restore, map_to_host, unmap_from_host.

Example Usage

# Copyright (c) 2024-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.

# Refresh volume metadata
resource "powerflex_volume_action_v2" "refresh" {
  volume_id = "vol-abc123"
  action    = "refresh"
}

# Restore volume from a snapshot
resource "powerflex_volume_action_v2" "restore" {
  volume_id          = "vol-abc123"
  action             = "restore"
  source_snapshot_id = "snap-def456"
}

# Map a volume to a host with read-write access
resource "powerflex_volume_action_v2" "map" {
  volume_id   = "vol-abc123"
  action      = "map_to_host"
  host_id     = "host-ghi789"
  access_mode = "READ_WRITE"
}

# Unmap a volume from a host
resource "powerflex_volume_action_v2" "unmap" {
  volume_id = "vol-abc123"
  action    = "unmap_from_host"
  host_id   = "host-ghi789"
}

Schema

Required

  • action (String) The action to perform. Valid values: refresh, restore, map_to_host, unmap_from_host.
  • volume_id (String) The ID of the volume to perform the action on.

Optional

  • access_mode (String) Access mode for map_to_host action. Valid values: READ_ONLY, READ_WRITE.
  • host_id (String) Host ID for map_to_host and unmap_from_host actions.
  • source_snapshot_id (String) Source snapshot ID for restore action.

Read-Only

  • id (String) The identifier for this resource.