Skip to content

Latest commit

 

History

History
112 lines (87 loc) · 5.03 KB

File metadata and controls

112 lines (87 loc) · 5.03 KB
title linkTitle page_title subcategory description
powerstore_snapshotrule data source
powerstore_snapshotrule
powerstore_snapshotrule Data Source - powerstore
This datasource is used to query the existing snapshot rule from PowerStore array. The information fetched from this datasource can be used for getting the details for further processing in resource block.

powerstore_snapshotrule (Data Source)

This datasource is used to query the existing snapshot rule 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 Snapshot Rules 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 Snapshot Rules
# If id or name is provided then it reads a particular Snapshot Rule with that id or name
# Only one of the attribute can be provided among id and  name 

data "powerstore_snapshotrule" "test1" {
  name = "test_snapshotrule_1"
}

output "snapshotRule" {
  value = data.powerstore_snapshotrule.test1.snapshot_rules
}

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

Schema

Optional

  • id (String) Unique identifier of the snapshot rule instance. Conflicts with name.
  • name (String) Name of the snapshot rule. Conflicts with id.

Read-Only

Nested Schema for snapshot_rules

Optional:

  • days_of_week (List of String) The days of the week when the snapshot rule should be applied.

Read-Only:

  • days_of_week_l10n (List of String) Localized message array corresponding to days_of_week
  • desired_retention (Number) The Desired snapshot retention period in hours to retain snapshots for this time period.
  • id (String) The ID of the snapshot rule.
  • interval (String) The interval of the snapshot rule.
  • interval_l10n (String) Localized message string corresponding to interval
  • is_read_only (Boolean) Indicates whether this snapshot rule can be modified.
  • is_replica (Boolean) Indicates whether this is a replica of a snapshot rule on a remote system.
  • managed_by (String) The entity that owns and manages the instance.
  • managed_by_id (String) The unique id of the managing entity.
  • managed_by_l10n (String) Localized message string corresponding to managed_by.
  • name (String) Name of the snapshot rule.
  • nas_access_type (String) The NAS filesystem snapshot access method for snapshot rule.
  • nas_access_type_l10n (String) Localized message string corresponding to nas_access_type.
  • policies (Attributes List) List of the protection policies that are associated with the snapshot_rule.. (see below for nested schema)
  • time_of_day (String) The time of the day to take a daily snapshot, with format hh:mm.
  • timezone (String) The time zone identifier for applying the time zone to the time_of_day for a snapshot rule.
  • timezone_l10n (String) Localized message string corresponding to timezone.

Nested Schema for snapshot_rules.policies

Read-Only:

  • description (String) Description of the protection policy.
  • id (String) Unique identifier of the protection policy.
  • name (String) Name of the protection policy.