powerscale_synciq_rules (Resource)

This resource is used to manage all the SyncIQ replication Performance Rule entities on PowerScale array.

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

# Available actions: Create and Update updates the syncIQ  replication rules on the PowerScale array.
# Delete will delete the state file. Import action is also available.
# After `terraform apply` of this example file will update the settings according to the attributes set in the config

# PowerScale SynIQ replication rules allows you to manage the replication rules on the Powerscale array
resource "powerscale_synciq_rules" "all_rules" {
  bandwidth_rules = [
    {
      limit       = 10000
      description = "Bandwidth limit for Weekend"
      schedule = {
        begin        = "00:00"
        days_of_week = ["saturday", "sunday"]
        end          = "23:59"
      }
    },
    {
      limit       = 2000
      description = "Bandwidth limit for Weekdays"
      schedule = {
        days_of_week = ["monday", "tuesday", "wednesday", "thursday", "friday"]
      }
    },
  ]

  cpu_rules = [
    {
      limit       = 16
      description = "CPU limit"
    }
  ]

  file_count_rules = [
    {
      limit       = 50
      description = "File limit"
    }
  ]

  worker_rules = [
    {
      limit       = 10
      description = "Worker limit"
      enabled     = false
    }
  ]
}

# After the execution of above resource block, replication rules would have been updated on the PowerScale array. For more information, Please check the terraform state file.

Schema

Optional

Read-Only

  • id (String) Resource ID.

Nested Schema for bandwidth_rules

Required:

  • limit (Number) Amount of the specified system resource type that is limited by this rule. Units are kb/s for bandwidth, files/s for file-count, processing percentage used for cpu, or percentage of maximum available workers.

Optional:

  • description (String) Description of this performance rule.
  • enabled (Boolean) Whether this performance rule is currently in effect during its specified intervals.
  • schedule (Attributes) A schedule defining when during a week this performance rule is in effect. If unspecified or null, the schedule will always be in effect. (see below for nested schema)

Read-Only:

  • id (String) The system ID given to this performance rule.

Nested Schema for bandwidth_rules.schedule

Optional:

  • begin (String) Start time (inclusive) for this schedule, during its specified days. Format is hh:mm (24h format hour, and minute). A null value indicates the beginning of the day (00:00).
  • days_of_week (Set of String) Set of days of the week during which this rule is in effect. Accepted values are monday, tuesday, wednesday, thursday, friday, saturday, sunday. At least one day must be set.
  • end (String) End time (inclusive) for this schedule, during its specified days. Format is hh:mm (three-letter weekday name abbreviation, 24h format hour, and minute). A null value indicates the end of the day (23:59).

Nested Schema for cpu_rules

Required:

  • limit (Number) Amount of the specified system resource type that is limited by this rule. Units are kb/s for bandwidth, files/s for file-count, processing percentage used for cpu, or percentage of maximum available workers.

Optional:

  • description (String) Description of this performance rule.
  • enabled (Boolean) Whether this performance rule is currently in effect during its specified intervals.
  • schedule (Attributes) A schedule defining when during a week this performance rule is in effect. If unspecified or null, the schedule will always be in effect. (see below for nested schema)

Read-Only:

  • id (String) The system ID given to this performance rule.

Nested Schema for cpu_rules.schedule

Optional:

  • begin (String) Start time (inclusive) for this schedule, during its specified days. Format is hh:mm (24h format hour, and minute). A null value indicates the beginning of the day (00:00).
  • days_of_week (Set of String) Set of days of the week during which this rule is in effect. Accepted values are monday, tuesday, wednesday, thursday, friday, saturday, sunday. At least one day must be set.
  • end (String) End time (inclusive) for this schedule, during its specified days. Format is hh:mm (three-letter weekday name abbreviation, 24h format hour, and minute). A null value indicates the end of the day (23:59).

Nested Schema for file_count_rules

Required:

  • limit (Number) Amount of the specified system resource type that is limited by this rule. Units are kb/s for bandwidth, files/s for file-count, processing percentage used for cpu, or percentage of maximum available workers.

Optional:

  • description (String) Description of this performance rule.
  • enabled (Boolean) Whether this performance rule is currently in effect during its specified intervals.
  • schedule (Attributes) A schedule defining when during a week this performance rule is in effect. If unspecified or null, the schedule will always be in effect. (see below for nested schema)

Read-Only:

  • id (String) The system ID given to this performance rule.

Nested Schema for file_count_rules.schedule

Optional:

  • begin (String) Start time (inclusive) for this schedule, during its specified days. Format is hh:mm (24h format hour, and minute). A null value indicates the beginning of the day (00:00).
  • days_of_week (Set of String) Set of days of the week during which this rule is in effect. Accepted values are monday, tuesday, wednesday, thursday, friday, saturday, sunday. At least one day must be set.
  • end (String) End time (inclusive) for this schedule, during its specified days. Format is hh:mm (three-letter weekday name abbreviation, 24h format hour, and minute). A null value indicates the end of the day (23:59).

Nested Schema for worker_rules

Required:

  • limit (Number) Amount of the specified system resource type that is limited by this rule. Units are kb/s for bandwidth, files/s for file-count, processing percentage used for cpu, or percentage of maximum available workers.

Optional:

  • description (String) Description of this performance rule.
  • enabled (Boolean) Whether this performance rule is currently in effect during its specified intervals.
  • schedule (Attributes) A schedule defining when during a week this performance rule is in effect. If unspecified or null, the schedule will always be in effect. (see below for nested schema)

Read-Only:

  • id (String) The system ID given to this performance rule.

Nested Schema for worker_rules.schedule

Optional:

  • begin (String) Start time (inclusive) for this schedule, during its specified days. Format is hh:mm (24h format hour, and minute). A null value indicates the beginning of the day (00:00).
  • days_of_week (Set of String) Set of days of the week during which this rule is in effect. Accepted values are monday, tuesday, wednesday, thursday, friday, saturday, sunday. At least one day must be set.
  • end (String) End time (inclusive) for this schedule, during its specified days. Format is hh:mm (three-letter weekday name abbreviation, 24h format hour, and minute). A null value indicates the end of the day (23:59).

Unless specified otherwise, all fields of this resource can be updated.

Import

Import is supported using the following syntax:

# 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.

# The command is
# terraform import powerscale_synciq_rules.all_rules <anystring>
# Example:
terraform import powerscale_synciq_rules.all_rules do_not_care
# after running this command, populate any required parameters in the config file to start managing this resource.
# Note: running "terraform show" after importing shows the current config/state of the resource. You can copy/paste that config to make it easier to manage the resource.