powerflex_device_group_v2 (Data Source)
This datasource is used to query Device Groups from a PowerFlex Gen2 system (5.0+).
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.
# List all device groups
data "powerflex_device_group_v2" "all" {
}
output "all_device_groups" {
value = data.powerflex_device_group_v2.all.device_groups
}
# Get device group by ID
data "powerflex_device_group_v2" "by_id" {
id = "abc123def456"
}
# Filter by name
data "powerflex_device_group_v2" "by_name" {
name = "device-group-1"
}
# Filter by protection domain
data "powerflex_device_group_v2" "by_pd" {
protection_domain_id = "pd-123456"
}
Schema
Optional
id(String) Device Group ID to query. Mutually exclusive withname.name(String) Device Group name to query. Mutually exclusive withid.protection_domain_id(String) Filter device groups by protection domain ID.
Read-Only
device_groups(Attributes List) List of device groups. (see below for nested schema)
Nested Schema for device_groups
Read-Only:
id(String) Device Group ID.name(String) Device Group name.num_of_devices(Number) Number of devices in the group.protection_domain_id(String) Protection Domain ID.status(String) Status of the device group.usable_capacity_in_kb(Number) Usable capacity in KB.used_capacity_in_kb(Number) Used capacity in KB.
Argument Reference
The following arguments are supported:
id- (Optional) The ID of the device group to query. If not specified, all device groups are returned.name- (Optional) The name of the device group to query.protection_domain_id- (Optional) The protection domain ID to filter device groups.
Attribute Reference
In addition to all arguments above, the following attributes are exported:
device_groups- List of device groups with the following attributes:id- The ID of the device group.name- The name of the device group.protection_domain_id- The protection domain ID.media_type- The media type (SSD, PMEM).spare_node_count- The number of spare nodes.spare_device_count- The number of spare devices.health- The health status.state- The state.num_of_devices- The number of devices.usable_capacity_in_kb- The usable capacity in KB.used_capacity_in_kb- The used capacity in KB.