Skip to content

Latest commit

 

History

History
136 lines (108 loc) · 6.69 KB

replication_pair.md

File metadata and controls

136 lines (108 loc) · 6.69 KB
title linkTitle page_title subcategory description
powerflex_replication_pair data source
powerflex_replication_pair
powerflex_replication_pair Data Source - powerflex
This datasource is used to read the Replication Pairs entity of the PowerFlex Array. This feature is only supported for PowerFlex 4.5 and above. An RCG is a collection of multiple replication pairs that need to be replicated together in a coordinated and consistent manner. The key purpose is to ensure that all the data within the group is replicated in a consistent state. Applies to a group of data that needs to be kept consistent across the source and target

powerflex_replication_pair (Data Source)

This datasource is used to read the Replication Pairs entity of the PowerFlex Array. This feature is only supported for PowerFlex 4.5 and above. An RCG is a collection of multiple replication pairs that need to be replicated together in a coordinated and consistent manner. The key purpose is to ensure that all the data within the group is replicated in a consistent state. Applies to a group of data that needs to be kept consistent across the source and target

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.
*/

# commands to run this tf file : terraform init && terraform apply
# This feature is only supported for PowerFlex 4.5 and above.

// Empty filter block will return all the replication pairs
data "powerflex_replication_pair" "rp" {}
output "rpResult" {
  value = data.powerflex_replication_pair.rp
}

# if a filter is of type string it has the ability to allow regular expressions
# data "powerflex_replication_pair" "replication_pair_filter_regex" {
#   filter{
#     name = ["^System_.*$"]
#     peer_system_name = ["^Peer_System_.*$"]
#   }
# }

# output "replicationPairFilterRegexResult"{
#  value = data.powerflex_replication_pair.replication_pair_filter_regex.rp_filter
# }

// If multiple filter fields are provided then it will show the intersection of all of those fields.
// If there is no intersection between the filters then an empty datasource will be returned
// For more information about how we do our datasource filtering check out our guides: https://dell.github.io/terraform-docs/docs/storage/platforms/powerflex/product_guide/examples/ 
data "powerflex_replication_pair" "rp_filter" {
  filter {
    # id = ["id", "id2"]
    # name = ["name-1", "name-2"]
    # remote_id = ["remote_id-1", "remote_id-2"]
    # user_requested_pause_transmit_init_copy = false
    # remote_capacity_in_mb = [8192]
    # local_volume_id = ["local_volume_id-1", "local_volume_id-2"]
    # remote_volume_id = ["remote_volume_id-1", "remote_volume_id-2"]
    # remote_volume_name = ["remote_volume_name-1", "remote_volume_name-2"]
    # replication_consistency_group_id = ["replication_consistency_group_id-1", "replication_consistency_group_id-2"]
    # copy_type = ["copy_type-1", "copy_type-2"]
    # lifetime_state = ["lifetime_state-1", "lifetime_state-2"]
    # peer_system_name = ["peer_system_name-1", "peer_system_name-2"]
    # initial_copy_state = ["initial_copy_state-1", "initial_copy_state-2"]
    # initial_copy_priority = [0, 1]
  }
}
output "rpResultFiltered" {
  value = data.powerflex_replication_pair.rp_filter
}

After the successful execution of above said block, we can see the output by executing terraform output command. Also, we can fetch information via the variable: data.powerflex_replication_pair.datasource_block_name.attribute_name where datasource_block_name is the name of the data source block and attribute_name is the attribute which user wants to fetch.

Schema

Optional

Read-Only

  • id (String) default datasource id
  • replication_pair_details (Attributes List) List of Replication Pairs (see below for nested schema)

Nested Schema for filter

Optional:

  • copy_type (Set of String) List of copy_type
  • id (Set of String) List of id
  • initial_copy_priority (Set of Number) List of initial_copy_priority
  • initial_copy_state (Set of String) List of initial_copy_state
  • lifetime_state (Set of String) List of lifetime_state
  • local_volume_id (Set of String) List of local_volume_id
  • name (Set of String) List of name
  • peer_system_name (Set of String) List of peer_system_name
  • remote_capacity_in_mb (Set of Number) List of remote_capacity_in_mb
  • remote_id (Set of String) List of remote_id
  • remote_volume_id (Set of String) List of remote_volume_id
  • remote_volume_name (Set of String) List of remote_volume_name
  • replication_consistency_group_id (Set of String) List of replication_consistency_group_id
  • user_requested_pause_transmit_init_copy (Boolean) Value for user_requested_pause_transmit_init_copy

Nested Schema for replication_pair_details

Read-Only:

  • copy_type (String) Copy Type of the replication pair instance.
  • id (String) Unique identifier of the replication pair instance.
  • initial_copy_priority (Number) Initial Copy Priority of the replication pair instance.
  • initial_copy_state (String) Initial Copy State of the replication pair instance.
  • lifetime_state (String) Lifetime State of the replication pair instance.
  • local_volume_id (String) Local Volume ID of the replication pair instance.
  • name (String) Name of the replication pair instance.
  • peer_system_name (String) Peer System Name of the replication pair instance.
  • remote_capacity_in_mb (Number) Remote Capacity in MB of the replication pair instance.
  • remote_id (String) Remote ID of the replication pair instance.
  • remote_volume_id (String) Remote Volume ID of the replication pair instance.
  • remote_volume_name (String) Remote Volume Name of the replication pair instance.
  • replication_consistency_group_id (String) Replication Consistency Group Id of the replication pair instance.
  • user_requested_pause_transmit_init_copy (Boolean) User Requested Pause of the replication pair instance.