powerscale_snapshot (Data Source)
This datasource is used to query the existing Snapshots from PowerScale array. The information fetched from this datasource can be used for getting the details or for further processing in resource block. PowerScale Snapshots is a logical pointer to data that is stored on a cluster at a specific point in time.
Example Usage
/*
Copyright (c) 2023-2024 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.
*/
# Returns all of the PowerScale snapshots and their details
# PowerScale Snapshots is a logical pointer to data that is stored on a cluster at a specific point in time.
data "powerscale_snapshot" "all" {
}
output "powerscale_snapshot_data_all" {
value = data.powerscale_snapshot.all
}
# Returns a subset of the PowerScale snapshots based on the path provided in the `paths` filter block and their details
data "powerscale_snapshot" "test" {
# Optional path of the filesystem, this will return all the snapshots related to that particular path
filter {
path = "/ifs/tfacc_file_system_test"
}
}
output "powerscale_snapshot" {
value = data.powerscale_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.powerscale_snapshot.all
Schema
Optional
filter
(Block, Optional) (see below for nested schema)
Read-Only
id
(String) Identifiersnapshots_details
(Attributes List) List of Snapshots (see below for nested schema)
Nested Schema for filter
Optional:
path
(String)
Nested Schema for snapshots_details
Optional:
set_expires
(String) The amount of time from creation before the snapshot will expire and be eligible for automatic deletion.
Read-Only:
alias
(String) The name of the alias, none for real snapshots.created
(Number) The Unix Epoch time the snapshot was created.expires
(Number) The Unix Epoch time the snapshot will expire and be eligible for automatic deletion.has_locks
(Boolean) True if the snapshot has one or more locks present see, see the locks subresource of a snapshot for a list of lock.id
(String) The system ID given to the snapshot. This is useful for tracking the status of delete pending snapshots.name
(String) The user or system supplied snapshot name. This will be null for snapshots pending delete.path
(String) The /ifs path snapshotted.pct_filesystem
(Number) Percentage of /ifs used for storing this snapshot.pct_reserve
(Number) Percentage of configured snapshot reserved used for storing this snapshot.schedule
(String) The name of the schedule used to create this snapshot, if applicable.shadow_bytes
(Number) The amount of shadow bytes referred to by this snapshot.size
(Number) The amount of storage in bytes used to store this snapshot.state
(String) Snapshot state.target_id
(Number) The ID of the snapshot pointed to if this is an alias. 18446744073709551615 (max uint64) is returned for an alias to the live filesystem.target_name
(String) The name of the snapshot pointed to if this is an alias.