powerscale_filepool_policy (Data Source)
This datasource is used to query the existing File Pool Policies from PowerScale array. The information fetched from this datasource can be used for getting the details or for further processing in resource block. PowerScale File Pool Policy can identify logical groups of files and specify storage operations for these files.
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.
*/
# PowerScale File Pool Policy can identify logical groups of files and specify storage operations for these files.
# Returns a list of PowerScale File Pool Policies based on names filter block.
data "powerscale_filepool_policy" "example_filepool_policy" {
filter {
# Optional list of names to filter upon
names = ["filePoolPolicySample", "Default policy"]
}
}
# Output value of above block by executing 'terraform output' command.
# The user can use the fetched information by the variable data.powerscale_filepool_policy.example_filepool_policy
output "powerscale_filepool_policy_filter" {
value = data.powerscale_filepool_policy.example_filepool_policy
}
# Returns all of the PowerScale File Pool Policies including Default Policy.
data "powerscale_filepool_policy" "all" {
}
# Output value of above block by executing 'terraform output' command
# The user can use the fetched information by the variable data.powerscale_filepool_policy.all
output "powerscale_filepool_policy_all" {
value = data.powerscale_filepool_policy.all
}
Schema
Optional
filter
(Block, Optional) (see below for nested schema)
Read-Only
file_pool_policies
(Attributes List) List of file pool policies. (see below for nested schema)id
(String) Unique identifier of the file pool policy instance.
Nested Schema for filter
Optional:
names
(Set of String)
Nested Schema for file_pool_policies
Read-Only:
actions
(Attributes List) A list of actions to be taken for matching files. (see below for nested schema)apply_order
(Number) The order in which this policy should be applied (relative to other policies).birth_cluster_id
(String) The guid assigned to the cluster on which the policy was created.description
(String) A description for this File Pool Policy.file_matching_pattern
(Attributes) Specifies the file matching rules for determining which files will be managed by this policy. (see below for nested schema)id
(String) A unique name for this File Pool Policy.name
(String) A unique name for this File Pool Policy.state
(String) Indicates whether this policy is in a good state (“OK”) or disabled (“disabled”).state_details
(String) Gives further information to describe the state of this policy.
Nested Schema for file_pool_policies.actions
Read-Only:
action_type
(String) action_type Acceptable values: set_requested_protection, set_data_access_pattern, enable_coalescer, apply_data_storage_policy, apply_snapshot_storage_policy, set_cloudpool_policy, enable_packing.cloudpool_policy_action
(Attributes) Action for set_cloudpool_policy type. (see below for nested schema)data_access_pattern_action
(String) Action for set_data_access_pattern type. Set data access pattern optimization. Acceptable values: random, concurrency, streaming.data_storage_policy_action
(Attributes) Action for apply_data_storage_policy. (see below for nested schema)enable_coalescer_action
(Boolean) Action for enable_coalescer type. Set write performance optimization. True to enable SmartCache action.enable_packing_action
(Boolean) Action for enable_packing type. True to enable enable_packing action.requested_protection_action
(String) Action for set_requested_protection type. Acceptable values: default, +1n, +2d:1n, +2n, +3d:1n, +3d:1n1d, +3n, +4d:1n, +4d:2n, +4n, 2x, 3x, 4x, 5x, 6x, 7x, 8x.snapshot_storage_policy_action
(Attributes) Action for apply_snapshot_storage_policy. (see below for nested schema)
Nested Schema for file_pool_policies.actions.cloudpool_policy_action
Read-Only:
archive_snapshot_files
(Boolean) Specifies if files with snapshots should be archived.cache
(Attributes) Specifies default cloudpool cache settings for new filepool policies. (see below for nested schema)compression
(Boolean) Specifies if files should be compressed.data_retention
(Number) Specifies the minimum amount of time archived data will be retained in the cloud after deletion.encryption
(Boolean) Specifies if files should be encrypted.full_backup_retention
(Number) The minimum amount of time cloud files will be retained after the creation of a full NDMP backup. (Used with NDMP backups only. Not applicable to SyncIQ.)incremental_backup_retention
(Number) The minimum amount of time cloud files will be retained after the creation of a SyncIQ backup or an incremental NDMP backup. (Used with SyncIQ and NDMP backups.)pool
(String) Specifies the cloudPool storage target.writeback_frequency
(Number) The minimum amount of time to wait before updating cloud data with local changes.
Nested Schema for file_pool_policies.actions.cloudpool_policy_action.writeback_frequency
Read-Only:
expiration
(Number) Specifies cache expiration.read_ahead
(String) Specifies cache read ahead type. Acceptable values: partial, full.type
(String) Specifies cache type. Acceptable values: cached, no-cache.
Nested Schema for file_pool_policies.actions.data_storage_policy_action
Read-Only:
ssd_strategy
(String) Specifies the SSD strategy. Acceptable values: metadata, metadata-write, data, avoid.storagepool
(String) Specifies the storage target.
Nested Schema for file_pool_policies.actions.snapshot_storage_policy_action
Read-Only:
ssd_strategy
(String) Specifies the SSD strategy. Acceptable values: metadata, metadata-write, data, avoid.storagepool
(String) Specifies the snapshot storage target.
Nested Schema for file_pool_policies.file_matching_pattern
Read-Only:
or_criteria
(Attributes List) List of or_criteria file matching rules for this policy. (see below for nested schema)
Nested Schema for file_pool_policies.file_matching_pattern.or_criteria
Read-Only:
and_criteria
(Attributes List) List of and_criteria file matching rules for this policy. (see below for nested schema)
Nested Schema for file_pool_policies.file_matching_pattern.or_criteria.and_criteria
Read-Only:
attribute_exists
(Boolean) Indicates whether the existence of an attribute indicates a match (valid only with ’type’ = ‘custom_attribute’).begins_with
(Boolean) True to match the path exactly, False to match any subtree. (valid only with ’type’ = ‘path’).case_sensitive
(Boolean) True to indicate case sensitivity when comparing file attributes (valid only with ’type’ = ’name’ or ’type’ = ‘path’).field
(String) File attribute field name to be compared in a custom comparison (valid only with ’type’ = ‘custom_attribute’).operator
(String) The comparison operator to use while comparing an attribute with its value.type
(String) The file attribute to be compared to a given value.units
(String) Size unit value. One of ‘B’,‘KB’,‘MB’,‘GB’,‘TB’,‘PB’,‘EB’ (valid only with ’type’ = ‘size’).use_relative_time
(Boolean) Whether time units refer to a calendar date and time (e.g., Jun 3, 2009) or a relative duration (e.g., 2 weeks) (valid only with ’type’ in {accessed_time, birth_time, changed_time or metadata_changed_time}.value
(String) The value to be compared against a file attribute.