powerstore_replication_session (Data Source)

This datasource is used to query replication sessions from PowerStore array. The results can be used to monitor replication health, status, and session details for metro and async replication.

Example Usage

/*
Copyright (c) 2025 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 plan && terraform apply
# This datasource reads replication session details from PowerStore array.

# Example: Get all replication sessions
data "powerstore_replication_session" "all" {
}

# Example: Get a specific replication session by ID
data "powerstore_replication_session" "by_id" {
  id = "replication-session-id-here"
}

Schema

Optional

  • id (String) Unique identifier of a specific replication session to query. If provided, only this session is returned.

Read-Only

  • replication_sessions (Attributes List) List of replication sessions matching the query. (see below for nested schema)

Nested Schema for replication_sessions

Read-Only:

  • data_transfer_state (String) Current data transfer state.
  • failover_test_in_progress (Boolean) Whether a test failover is in progress.
  • id (String) Unique identifier of the replication session.
  • last_sync_duration (Number) Elapsed time of the last synchronization in milliseconds.
  • last_sync_timestamp (String) Time of last successful synchronization.
  • local_resource_id (String) Unique identifier of the local storage resource.
  • progress_percentage (Number) Progress of the current replication operation.
  • remote_resource_id (String) Unique identifier of the remote storage resource.
  • remote_system_id (String) Unique identifier of the remote system.
  • replication_rule_id (String) Associated replication rule instance ID.
  • resource_type (String) Type of the storage resource.
  • resource_type_l10n (String) Localized resource type string.
  • role (String) Role of the replication session.
  • role_l10n (String) Localized role string.
  • state (String) Current state of the replication session.
  • state_l10n (String) Localized state string.
  • type (String) Replication session type (e.g., Metro_Active_Active).
  • type_l10n (String) Localized type string.