Skip to content

Latest commit

 

History

History
212 lines (172 loc) · 8.25 KB

synciq_policy.md

File metadata and controls

212 lines (172 loc) · 8.25 KB
title linkTitle page_title subcategory description
powerscale_synciq_policy data source
powerscale_synciq_policy
powerscale_synciq_policy Data Source - terraform-provider-powerscale
This datasource is used to query the existing SyncIQ 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_synciq_policy (Data Source)

This datasource is used to query the existing SyncIQ Policies from PowerScale array. The information fetched from this datasource can be used for getting the details or for further processing in resource block.

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 SyncIQ Policy allows you to get a list of SyncIQ Policies or a policy by its ID.

# Returns a list of PowerScale SyncIQ Policies 
data "powerscale_synciq_policy" "all_policies" {
}

# Returns a the PowerScale SyncIQ Policy with given ID
data "powerscale_synciq_policy" "one_policy" {
  id = "g23j9a1f83h12n5j4"
}

# Output value of above block by executing 'terraform output' command.
# The user can use the fetched information by the variable data.powerscale_synciq_policy.all_policies.policies
output "powerscale_synciq_all_policies" {
  value = data.powerscale_synciq_policy.all_policies.policies
}

# The user can use the fetched policy by ID by the variable data.powerscale_synciq_policy.one_policy.policies[0]
output "policyByID" {
  value = data.powerscale_synciq_policy.one_policy.one_policy[0]
}

# Get syncIQ policy by name
# Step 1: We shall use the datasource to get all the policies as shown above
# Step 2: We index them by name
locals {
  policiesByName = { for policy in data.powerscale_synciq_policy.all_policies.policies : policy.name => policy }
}

# Step 3: The user can use the fetched policy by name by the variable local.policiesByName["<name>"]
output "policiesByName" {
  value = {
    "aut" = local.policiesByName["aut_synciq_report_policy_01"]
    "but" = local.policiesByName["but_synciq_report_policy_01"]
    "cut" = local.policiesByName["cut_synciq_report_policy_01"]
  }
}

# After the successful execution of above said block, We can see the output value by executing 'terraform output' command.

Schema

Optional

  • id (String) ID

Read-Only

Nested Schema for policies

Read-Only:

  • accelerated_failback (Boolean) Accelerated Failback
  • action (String) Action
  • allow_copy_fb (Boolean) Allow Copy Fb
  • bandwidth_reservation (Number) Bandwidth Reservation
  • changelist (Boolean) Changelist
  • check_integrity (Boolean) Check Integrity
  • cloud_deep_copy (String) Cloud Deep Copy
  • conflicted (Boolean) Conflicted
  • database_mirrored (Boolean) Database Mirrored
  • delete_quotas (Boolean) Delete Quotas
  • description (String) Description
  • disable_file_split (Boolean) Disable File Split
  • disable_fofb (Boolean) Disable Fofb
  • disable_quota_tmp_dir (Boolean) Disable Quota Tmp Dir
  • disable_stf (Boolean) Disable Stf
  • enable_hash_tmpdir (Boolean) Enable Hash Tmpdir
  • enabled (Boolean) Enabled
  • encrypted (Boolean) Encrypted
  • encryption_cipher_list (String) Encryption Cipher List
  • expected_dataloss (Boolean) Expected Dataloss
  • file_matching_pattern (Attributes) File Matching Pattern (see below for nested schema)
  • force_interface (Boolean) Force Interface
  • has_sync_state (Boolean) Has Sync State
  • id (String) Id
  • ignore_recursive_quota (Boolean) Ignore Recursive Quota
  • job_delay (Number) Job Delay
  • last_job_state (String) Last Job State
  • last_started (Number) Last Started
  • last_success (Number) Last Success
  • linked_service_policies (List of String) Linked Service Policies
  • log_level (String) Log Level
  • log_removed_files (Boolean) Log Removed Files
  • name (String) Name
  • next_run (Number) Next Run
  • ocsp_address (String) Ocsp Address
  • ocsp_issuer_certificate_id (String) Ocsp Issuer Certificate Id
  • password_set (Boolean) Password Set
  • priority (Number) Priority
  • report_max_age (Number) Report Max Age
  • report_max_count (Number) Report Max Count
  • restrict_target_network (Boolean) Restrict Target Network
  • rpo_alert (Number) Rpo Alert
  • schedule (String) Schedule
  • service_policy (Boolean) Service Policy
  • skip_lookup (Boolean) Skip Lookup
  • skip_when_source_unmodified (Boolean) Skip When Source Unmodified
  • snapshot_sync_existing (Boolean) Snapshot Sync Existing
  • snapshot_sync_pattern (String) Snapshot Sync Pattern
  • source_certificate_id (String) Source Certificate Id
  • source_domain_marked (Boolean) Source Domain Marked
  • source_exclude_directories (List of String) Source Exclude Directories
  • source_include_directories (List of String) Source Include Directories
  • source_network (Attributes) Source Network (see below for nested schema)
  • source_root_path (String) Source Root Path
  • source_snapshot_archive (Boolean) Source Snapshot Archive
  • source_snapshot_expiration (Number) Source Snapshot Expiration
  • source_snapshot_pattern (String) Source Snapshot Pattern
  • sync_existing_snapshot_expiration (Boolean) Sync Existing Snapshot Expiration
  • sync_existing_target_snapshot_pattern (String) Sync Existing Target Snapshot Pattern
  • target_certificate_id (String) Target Certificate Id
  • target_compare_initial_sync (Boolean) Target Compare Initial Sync
  • target_detect_modifications (Boolean) Target Detect Modifications
  • target_host (String) Target Host
  • target_path (String) Target Path
  • target_snapshot_alias (String) Target Snapshot Alias
  • target_snapshot_archive (Boolean) Target Snapshot Archive
  • target_snapshot_expiration (Number) Target Snapshot Expiration
  • target_snapshot_pattern (String) Target Snapshot Pattern
  • workers_per_node (Number) Workers Per Node

Nested Schema for policies.file_matching_pattern

Read-Only:

Nested Schema for policies.file_matching_pattern.or_criteria

Read-Only:

Nested Schema for policies.file_matching_pattern.or_criteria.and_criteria

Read-Only:

  • attribute_exists (Boolean) Attribute Exists
  • case_sensitive (Boolean) Case Sensitive
  • field (String) Field
  • operator (String) Operator
  • type (String) Type
  • value (String) Value
  • whole_word (Boolean) Whole Word

Nested Schema for policies.source_network

Read-Only:

  • pool (String) Pool
  • subnet (String) Subnet