Skip to content

Latest commit

 

History

History
167 lines (119 loc) · 6.89 KB

protectionpolicy.md

File metadata and controls

167 lines (119 loc) · 6.89 KB
title linkTitle page_title subcategory description
powerstore_protectionpolicy data source
powerstore_protectionpolicy
powerstore_protectionpolicy Data Source - powerstore
This datasource is used to query the existing protection policy from PowerStore array. The information fetched from this datasource can be used for getting the details for further processing in resource block.

powerstore_protectionpolicy (Data Source)

This datasource is used to query the existing protection policy from PowerStore array. The information fetched from this datasource can be used for getting the details for further processing in resource block.

Note: Only one of name or id can be provided at a time.

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 --auto-approve
# This datasource reads protection policies either by id or name where user can provide a value to any one of them
# If it is a empty datsource block , then it will read all the protection policies
# If id or name is provided then it reads a particular protection policy with that id or name
# Only one of the attribute can be provided among id and  name 

data "powerstore_protectionpolicy" "test1" {
  name = "terraform_protection_policy_2"
}

output "policyResult" {
  value = data.powerstore_protectionpolicy.test1.policies
}

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.powerstore_protectionpolicy.test1.attribute_name where attribute_name is the attribute which user wants to fetch.

Schema

Optional

  • id (String) Unique identifier of the protection policy. Conflicts with name.
  • name (String) Protection policy name. Conflicts with id.

Read-Only

Nested Schema for policies

Read-Only:

  • description (String) Protection policy description.
  • file_systems (Attributes List) Specifies the virtual volumes associated with a protection policy. (see below for nested schema)
  • id (String) Unique identifier of the protection policy.
  • is_read_only (Boolean) Indicates whether this protection policy can be modified.
  • is_replica (Boolean) Indicates if this is a replica of a protection policy on a remote system
  • managed_by (String) Entity that owns and manages this instance.
  • managed_by_id (String) Unique identifier of the managing entity based on the value of the managed_by property
  • managed_by_l10n (String) Localized message string corresponding to managed_by
  • name (String) Protection policy name.
  • performance_rules (Attributes List) Specifies the performance rule associated with a protection policy. (see below for nested schema)
  • replication_rules (Attributes List) Specifies the replication rule associated with a protection policy. (see below for nested schema)
  • snapshot_rules (Attributes List) Specifies the snapshot rule associated with a protection policy. (see below for nested schema)
  • type (String) Type of the protection policy.
  • type_l10n (String) Localized message string corresponding to type
  • virtual_machines (Attributes List) Specifies the virtual machines associated with a protection policy. (see below for nested schema)
  • volume_groups (Attributes List) Specifies the volume group associated with a protection policy. (see below for nested schema)
  • volumes (Attributes List) Specifies the volumes associated with a protection policy. (see below for nested schema)

Nested Schema for policies.file_systems

Read-Only:

  • description (String) Description of the file system.
  • id (String) Unique identifier of the file system.
  • name (String) Name of the file system.

Nested Schema for policies.performance_rules

Read-Only:

  • id (String) Unique identifier representing a performance rule.
  • io_priority (String) The I/O priority for quality of service rules.
  • name (String) Name of the performance rule.

Nested Schema for policies.replication_rules

Read-Only:

  • id (String) Unique identifier of the replication rule.
  • name (String) Name of the replication rule.

Nested Schema for policies.snapshot_rules

Read-Only:

  • id (String) Unique identifier of the snapshot rule.
  • name (String) Snapshot rule name.

Nested Schema for policies.virtual_machines

Read-Only:

  • id (String) The unique identifier of the virtual machine.
  • instance_uuid (String) UUID instance of the VM in vCenter.
  • name (String) User-assigned name of the VM in vCenter.

Nested Schema for policies.volume_groups

Read-Only:

  • description (String) Description for the volume group.
  • id (String) The unique identifier of the volume group.
  • name (String) Name of the volume group.

Nested Schema for policies.volumes

Read-Only:

  • description (String) Description of the volume.
  • id (String) Unique identifier of the volume instance.
  • name (String) The name of the volume