powermax_snapshotpolicy resource
powermax_snapshotpolicy (Resource)
Resource for a specific Snapshot Policy in PowerMax array. PowerMax snapshot policy feature provides snapshot orchestration at scale (1,024 snaps per storage group). The resource simplifies snapshot management for standard and cloud snapshots.
Example Usage
/*
Copyright (c) 2023 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.
*/
# Available actions: Create, Update (snapshot_policy_name, storage_groups, interval, snapshot_count, compliance_count_critical, compliance_count_warning, offset_minutes, secure), Delete and Import an existing snapshot policy from the PowerMax Array.
# After `terraform apply` of this example file it will create a new snapshot policy with the name set in `snapshot_policy_name` attribute on the PowerMax
# PowerMax snapshot policy feature provides snapshot orchestration at scale (1,024 snaps per storage group).
# The resource simplifies snapshot management for standard and cloud snapshots.
# This resouce will take snapshots on a periodic basic based on the configuration below.
resource "powermax_snapshotpolicy" "terraform_sp" {
# Attributes which are able to be modified after create (snapshot_policy_name, storage_groups, interval, snapshot_count, compliance_count_critical, compliance_count_warning, offset_minutes, secure)
# Required Field will become the name of the snapshot policy
snapshot_policy_name = "terraform_sp"
# should only be set for modify/edit operation , not supported during create.
# Also the destroy/delete will also unlink any associted storage groups from Snapshot Policy before deleting the snapshot policy.
# storage_groups = ["tfacc_sp_sg1", "tfacc_sp_sg2"]
# Default values are defined below and can be modifed before or after create
# The interval between snapshots
# interval = "1 Hour"
# The number of the snapshots that will be maintained by the snapshot policy
# snapshot_count = "48"
# The number of snapshots which are not failed or bad when compliance changes to critical.
# compliance_count_critical = 46
# The number of snapshots which are not failed or bad when compliance changes to warning.
# compliance_count_warning = 47
# The number of minutes from 00:00 on a Monday morning when the policy should run. Default is 0 if not specified.
# offset_minutes = 420
# The snapshot policy will create secure snapshots
# secure = false
}
# After the execution of above resource block, a PowerMax snapshot policy has been created at PowerMax array.
# For more information about the newly created resource use the `terraform show` command to review the current state
Schema
Required
snapshot_policy_name
(String) Name of the snapshot policy. Only alphanumeric characters, underscores ( _ ), and hyphens (-) are allowed and max length can be 32 characters. (Update Supported)
Optional
compliance_count_critical
(Number) The threshold of good snapshots which are not failed/bad for compliance to change from warning to critical. (Update Supported)compliance_count_warning
(Number) The threshold of good snapshots which are not failed/bad for compliance to change from normal to warning. (Update Supported)interval
(String) The interval between snapshots Enumeration values: 10 Minutes, 12 Minutes, 15 Minutes, 20 Minutes, 30 Minutes, 1 Hour, 2 Hours, 3 Hours, 4 Hours, 6 Hours, 8 Hours, 12 Hours, 1 Day, 7 Days. (Update Supported)interval_minutes
(Number) Number of minutes between each policy executionlast_time_used
(String) The last time that the snapshot policy was runoffset_minutes
(Number) Number of minutes after 00:00 on Monday morning that the policy will execute. (Update Supported)provider_name
(String) The name of the cloud provider associated with this policy. Only applies to cloud policiesretention_days
(Number) The number of days that snapshots will be retained in the cloud for. Only applies to cloud policiessecure
(Boolean) Set if the snapshot policy creates secure snapshots. (Update Supported)snapshot_count
(Number) Number of snapshots that will be taken before the oldest ones are no longer required. (Update Supported)storage_groups
(Set of String) The storage groups associated with the snapshot policy. This field cannot be set during create and is only valid for Edit/Update.If user wants to delete the snapshot policy all associated storage groups will also be unlinked from the Snapshot Policy. (Update Supported)suspended
(Boolean) Set if the snapshot policy has been suspended
Read-Only
id
(String) Identifierstorage_group_count
(Number) The total number of storage groups that this snapshot policy is associated withtype
(String) The type of Snapshots that are created with the policy, local or cloud
Import
Import is supported using the following syntax:
# Copyright (c) 2023 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.
# The command is
# terraform import powermax_storagegroup.test <id>
# Example:
terraform import powermax_snapshotpolicy.terraform_sp terraform_sp
# after running this command, populate the name field in the config file to start managing this resource