powerflex_snapshot_policy (Data Source)

This data-source can be used to fetch information related to the snapshot policies from a PowerFlex array.

Note: Only one of name and id can be provided at a time.

Example Usage

/*
Copyright (c) 2023 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 apply --auto-approve
# Reads snapshot policy either by name or by id , if provided
# If both name and id is not provided , then it reads all the snapshot policies
# id and name can't be given together to fetch the snapshot policy

data "powerflex_snapshot_policy" "sp" {

  #name = "sample_snap_policy_1"
  id = "896a535700000000"
}

output "spResult" {
  value = data.powerflex_snapshot_policy.sp.snapshotpolicies
}

Schema

Optional

  • id (String) Unique identifier of the snapshot policy instance to fetch. Conflicts with name.
  • name (String) Name of the snapshot policy to fetch. Conflicts with id.

Read-Only

Nested Schema for snapshotpolicies

Read-Only:

  • auto_snapshot_creation_cadence_in_min (Number) Auto snapshot creation cadence in min.
  • id (String) Unique identifier of the snapshot policy instance.
  • last_auto_snapshot_creation_failure_reason (String) Last auto snapshot creation failure reason.
  • last_auto_snapshot_failure_in_first_level (Boolean) Last auto snapshot failure in first level.
  • links (Attributes List) Specifies the links asscociated for a snapshot policy. (see below for nested schema)
  • max_vtree_auto_snapshots (Number) Max vtree auto snapshots.
  • name (String) Name of the snapshot policy.
  • next_auto_snapshot_creation_time (Number) Next auto snapshot creation time.
  • num_of_auto_snapshots (Number) Number of auto snapshots.
  • num_of_creation_failures (Number) Number of creation failures.
  • num_of_expired_but_locked_snapshots (Number) Number of expired but locked snapshots.
  • num_of_locked_snapshots (Number) Number of locked snapshots.
  • num_of_retained_snapshots_per_level (List of Number) Number of retained snapshots per level.
  • num_of_source_volumes (Number) Number of source Volumes.
  • secure_snapshots (Boolean) Secure snapshots.
  • snapshot_access_mode (String) Snapshot Access Mode.
  • snapshot_policy_state (String) Specifies the current state of the snapshot policy.
  • system_id (String) System Identifier.
  • time_of_last_auto_snapshot (Number) Time of last auto snapshot.
  • time_of_last_auto_snapshot_creation_failure (Number) Time of last auto snapshot creation failure.

Read-Only:

  • href (String) Specifies the exact path to fetch the details.
  • rel (String) Specifies the relationship with the snapshot policy.