azure::scale-set-scaling

Creates a scale set.

Example

azure::scale-set-scaling scale-set-scaling-example
    name: "scale-set-scaling-example"
    resource-group: $(azure::resource-group scale-set-resource-group-example)
    enabled: "false"
    scale-set: $(azure::scale-set scale-set-example)

    profile
        name: "profile-example-fixed-schedule"
        type: "FIXED_SCHEDULE"
        default-instance-count: 2
        fixed-schedule
            start-time: "2019-08-23T00:00:00.000Z"
            end-time: "2019-08-23T23:59:00.000Z"
            time-zone: "Eastern Standard Time"
        end
    end

    profile
        name: "profile-example-recurrent-schedule"
        type: "RECURRENT_SCHEDULE"
        default-instance-count: 1
        recurrent-schedule
            time-zone: "Eastern Standard Time"
            start-time: "12:23"
            day-of-weeks: [
                "MONDAY", "TUESDAY", "WEDNESDAY"
            ]
        end
    end

    profile
        name: "profile-example-metric"
        type: "METRIC"
        default-instance-count: 1
        max-instance-count: 1
        min-instance-count: 1
        rule
            metric-name: "Percentage CPU"
            metric-source-id: $(azure::scale-set scale-set-example).id
            statistic-duration: 1200
            statistic-frequency: 60
            statistic-type: "AVERAGE"
            time-aggregation: "AVERAGE"
            comparison-operation: "GREATER_THAN"
            threshold: 70
            scale-direction: "INCREASE"
            scale-type: "CHANGE_COUNT"
            instance-count-change: 1
            cooldown: 5
        end

        rule
            metric-name: "Outbound Flows"
            metric-source-id: $(azure::scale-set scale-set-example).id
            statistic-duration: 1200
            statistic-frequency: 60
            statistic-type: "AVERAGE"
            time-aggregation: "AVERAGE"
            comparison-operation: "GREATER_THAN"
            threshold: 70
            scale-direction: "INCREASE"
            scale-type: "CHANGE_COUNT"
            instance-count-change: 1
            cooldown: 5
        end
    end
end

Attributes

Attribute Description
name The name of the Scaling. (Required)
resource-group The Resource Group under which the Scaling would reside. (Required)
scale-set The Scale Set Scaling would target. (Required)
profile set subresource

The set of profiles for the Scaling. (Required)

name
The name of the profile. (Required)
type
The type of the profile. Valid values are FIXED, RECURRENT_SCHEDULE, FIXED_SCHEDULE or METRIC. (Required)
default-instance-count
The default instance count for the profile. (Required)
max-instance-count
The max instance count for the profile. Required when ‘profile-type’ is set to METRIC.
min-instance-count
The min instance count for the profile. Required when ‘profile-type’ is set to METRIC.
recurrent-schedule subresource

The recurrent schedule configuration for the profile. Required when ‘profile-type’ is set to RECURRENT_SCHEDULE.

time-zone
The time zone of the recurrent policy. (Required)
start-time
The start time of the recurrent policy. (Required)
day-of-weeks set
The set of weekdays for the recurrent policy. Valid values are MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY and SUNDAY. (Required)
fixed-schedule subresource

The fixed schedule configuration for the profile. Required when ‘profile-type’ is set to FIXED_SCHEDULE.

start-time
The start time of the fixed scaling. (Required)
end-time
The end time of the fixed scaling. (Required)
time-zone
The time zone of the fixed scaling. (Required)
rule set subresource

The set of scaling schedule configuration for the profile. Required when ‘profile-type’ is set to METRIC.

metric-name
The name of the Metric. (Required)
metric-source-id
The source resource monitored by the Rule. (Required)
statistic-type
The type of metrics statistic showing how metrics from multiple instances are combined. Defaults to AVERAGE. Valid values are AVERAGE, MIN, MAX or SUM.
statistic-duration
The range of time in which instance data is collected in seconds. Defaults ro 600. Valid values are between 300 to 43200.
statistic-frequency
The granularity at which the instances are monitored in seconds. Defaults ro 600. Defaults to 60. Valid values are between 60 to 43200.
time-aggregation
The way in which the data collected over time is combined. Valid values are AVERAGE, MINIMUM, MAXIMUM, TOTAL or COUNT. (Required)
comparison-operation
The comparison operator to compare the metric data and the threshold. Valid values are EQUALS, NOT_EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN or LESS_THAN_OR_EQUAL. (Required)
threshold
The threshold that triggers the action. (Required)
scale-direction
The direction of scaling, to increase or decrease. Valid values are NONE, INCREASE or DECREASE. (Required)
scale-type
The type of action when the Rule fires. Valid values are CHANGE_COUNT, PERCENT_CHANGE_COUNT or EXACT_COUNT. (Required)
cooldown
The amount of time to wait since last scaling action in minutes. Valid values are between 1 to 10080. (Required)
instance-count-change
The number of instances involved in the scaling action. (Required)
admin-email-notification-enabled Enable admin email notification. Defaults to false.
enabled Enable Scaling. Defaults to true.
co-admin-email-notification-enabled Enable co admin email notification. Defaults to false.
custom-emails-notifications set A set of custom emails to send notification to.
webhook-notification Set the service address to receive the notification.
tags map A set of tags for the Scaling.

Outputs

Attribute Description
id The ID of the scaling.