powermax_snapshot (Data Source)
Data source for a specific StorageGroup Snapshots in PowerMax array. PowerMax Snaphots is a local replication solution that is designed to nondisruptively create point-in-time copies (snapshots) of critical data.
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.
*/
# This terraform DataSource is used to query the existing snapshot from PowerMax array.
# The information fetched from this data source can be used for getting the details / for further processing in resource block.
# Returns all of the PowerMax snapshots related to a particular storage group and their details
data "powermax_snapshot" "test" {
# The storage group name to which display all of its snapshots
# Required
storage_group {
name = "example_storage_group"
}
# Optional Update the read timeout with (XXm) for minutes or (XXs) for timeout in seconds
# If unset defaults to 2 minute timeout
# timeouts = {
# read = "3m"
# }
}
output "powermax_snapshot" {
value = data.powermax_snapshot.test
}
# After the successful execution of above said block, We can see the output value by executing 'terraform output' command.
# Also, we can use the fetched information by the variable data.powermax_snapshot.example
Schema
Optional
storage_group
(Block, Optional) (see below for nested schema)timeouts
(Attributes) (see below for nested schema)
Read-Only
id
(String) Identifiersnapshots
(Attributes List) List of Snapshots (see below for nested schema)
Nested Schema for storage_group
Required:
name
(String)
Nested Schema for timeouts
Optional:
read
(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).
Nested Schema for snapshots
Optional:
generation
(Number) Number of generation for the snapshotlinked_storage_group
(Attributes List) Linked storage group and volume information. Only populated if the generation is linked (see below for nested schema)non_shared_tracks
(Number) The number of tracks uniquely allocated for this snapshots delta. This is an approximate indication of the number of tracks that will be returned to the SRP if this snapshot is terminated.num_source_volumes
(Number) The number of source volumes in the snapshot generationpersistent
(Boolean) Set if this snapshot is persistent. Only applicable to policy based snapshotssecure_expiry_date
(String) When the snapshot will expire once it is not linkedsnapid
(Number) Unique Snap ID for Snapshottime_to_live_expiry_date
(String) When the snapshot will expire once it is not linkedtracks
(Number) The number of source tracks that have been overwritten by the host
Read-Only:
expired
(Boolean) Set if this generation secure has expiredlinked
(Boolean) Set if this generation is SnapVX linkedlinked_storage_group_names
(List of String) Linked storage group names. Only populated if the generation is linkedname
(String) Name of a snapshotnum_storage_group_volumes
(Number) The number of non-gatekeeper storage group volumesrestored
(Boolean) Set if this generation is SnapVX linkedsource_volume
(Attributes List) The source volumes of the snapshot generation (see below for nested schema)state
(List of String) The state of the snapshot generationtimestamp
(String) Timestamp of the snapshot generationtimestamp_utc
(String) The timestamp of the snapshot generation in milliseconds since 1970
Nested Schema for snapshots.linked_storage_group
Optional:
background_define_in_progress
(Boolean) When the snapshot link is being defineddefined
(Boolean) When the snapshot link has been fully defined
Read-Only:
linked_creation_timestamp
(String) The average timestamp of all linked volumes that are linkedlinked_volume_name
(String) The linked volumes namename
(String) The storage group namepercentage_copied
(Number) Percentage of tracks copiedsource_volume_name
(String) The source volumes nametrack_size
(Number) Size of the tracks.tracks
(Number) Number of tracks
Nested Schema for snapshots.source_volume
Read-Only:
capacity
(Number) The capacity of the snapshot volume in cylinderscapacity_gb
(Number) The capacity of the snapshot volume in GBname
(String) The name of the SnapVX snapshot generation source volume