powerscale_writable_snapshot (Data Source)
Example Usage
/*
Copyright (c) 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.
*/
# PowerScale Writable Snapshots allows you to get a list of Writable Snapshots or a Writable Snapshot by its Path which can be added in filters.
# Returns a list of PowerScale Writable Snapshots
data "powerscale_writable_snapshot" "all_snaps" {
}
# Returns a the PowerScale Writable Snapshot with given Path
data "powerscale_writable_snapshot" "test" {
filter {
path = "/ifs/writable_snap"
limit = 5
}
}
# Output value of above block by executing 'terraform output' command.
# The user can use the fetched information by the variable data.powerscale_writable_snapshot.all_snaps.writable
# output "powerscale_writable_snapshot" {
# value = data.powerscale_writable_snapshot.all_snaps.writable
# }
# After the successful execution of above said block, We can see the output value by executing 'terraform output' command.
Schema
Optional
filter
(Block, Optional) (see below for nested schema)
Read-Only
id
(String) Identifierwritable
(Attributes List) (see below for nested schema)
Nested Schema for filter
Optional:
dir
(String) The direction of the sort.limit
(Number) Return no more than this many results at once (see resume).path
(String) Only list writable snapshots matching this path.resume
(String) Continue returning results from previous call using this token (token should come from the previous call, resume cannot be used with other options).sort
(String) The field that will be used for sorting. Choices are path, src name, src path, created, size and state. Default is created.state
(String) Only list writable snapshots matching this state.
Nested Schema for writable
Read-Only:
created
(Number) The Unix Epoch time the writable snapshot was created.dst_path
(String) The user supplied /ifs path of writable snapshot.id
(Number) The system ID given to the writable snapshot. This is useful for debugging.log_size
(Number) The sum in bytes of logical size of files in this writable snapshot.phys_size
(Number) The amount of storage in bytes used to store this writable snapshot.src_id
(Number) The system ID of the user supplied source snapshot. This is useful for debugging.src_path
(String) The /ifs path of user supplied source snapshot. This will be null for writable snapshots pending delete.src_snap
(String) The user supplied source snapshot name or ID. This will be null for writable snapshots pending delete.state
(String) Writable Snapshot state.