Azure / Azure-Verified-Modules

Azure Verified Modules (AVM) is an initiative to consolidate and set the standards for what a good Infrastructure-as-Code module looks like. Modules will then align to these standards, across languages (Bicep, Terraform etc.) and will then be classified as AVMs and available from their respective language specific registries.
https://aka.ms/AVM
MIT License
364 stars 85 forks source link

[Module Proposal]: `avm/res/insights/autoscale-setting` #1672

Open FallenHoot opened 3 weeks ago

FallenHoot commented 3 weeks ago

Check for previous/existing GitHub issues/module proposals

Check this module doesn't already exist in the module indexes

Bicep or Terraform?

Bicep

Module Classification?

Resource Module

Module Name

avm/res/insights/autoscale-setting

Module Details

Main goal is to introduce the AVM Insights/Autoscalesettings will allow VMSS to use this module to configure autoscale.

The Microsoft.Insights/autoscalesettings resource type in Azure is used to configure autoscale settings for various Azure resources. Autoscale settings help ensure that you have the right amount of resources running to handle the fluctuating load of your application. You can configure autoscale settings to be triggered based on metrics that indicate load or performance, or triggered at a scheduled date and time.

Key Properties:

Example Bicep Template:

resource symbolicname 'Microsoft.Insights/autoscalesettings@2022-10-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  properties: {
    enabled: bool
    name: 'string'
    notifications: [
      {
        email: {
          customEmails: ['string']
          sendToSubscriptionAdministrator: bool
          sendToSubscriptionCoAdministrators: bool
        }
        operation: 'Scale'
        webhooks: [
          {
            properties: {
              {customized property}: 'string'
            }
            serviceUri: 'string'
          }
        ]
      }
    ]
    predictiveAutoscalePolicy: {
      scaleLookAheadTime: 'string'
      scaleMode: 'string'
    }
    profiles: [
      {
        capacity: {
          default: 'string'
          maximum: 'string'
          minimum: 'string'
        }
        fixedDate: {
          end: 'string'
          start: 'string'
          timeZone: 'string'
        }
        name: 'string'
        recurrence: {
          frequency: 'string'
          schedule: {
            days: ['string']
            hours: [int]
            minutes: [int]
            timeZone: 'string'
          }
        }
        rules: [
          {
            metricTrigger: {
              dimensions: [
                {
                  DimensionName: 'string'
                  Operator: 'string'
                  Values: ['string']
                }
              ]
              dividePerInstance: bool
              metricName: 'string'
              metricNamespace: 'string'
              metricResourceLocation: 'string'
              metricResourceUri: 'string'
              operator: 'string'
              statistic: 'string'
              threshold: int
              timeAggregation: 'string'
              timeGrain: 'string'
              timeWindow: 'string'
            }
            scaleAction: {
              cooldown: 'string'
              direction: 'string'
              type: 'string'
              value: 'string'
            }
          }
        ]
      }
    ]
    targetResourceLocation: 'string'
    targetResourceUri: 'string'
  }
}

This template provides a comprehensive way to define autoscale settings for your Azure resources, ensuring that your applications can handle varying loads efficiently. For more detailed information, you can refer to the official documentation https://learn.microsoft.com/en-us/azure/templates/microsoft.insights/autoscalesettings

Do you want to be the owner of this module?

Yes

Module Owner's GitHub Username (handle)

FallenHoot

(Optional) Secondary Module Owner's GitHub Username (handle)

No response

matebarabas commented 2 weeks ago

Hi @FallenHoot,

Thanks for requesting/proposing to be an AVM module owner!

We just want to confirm you agree to the below pages that define what module ownership means:

Any questions or clarifications needed, let us know!

If you agree, please just reply to this issue with the exact sentence below (as this helps with our automation πŸ‘):

"I CONFIRM I WISH TO OWN THIS AVM MODULE AND UNDERSTAND THE REQUIREMENTS AND DEFINITION OF A MODULE OWNER"

Thanks,

The AVM Core Team

RR

FallenHoot commented 1 week ago

I CONFIRM I WISH TO OWN THIS AVM MODULE AND UNDERSTAND THE REQUIREMENTS AND DEFINITION OF A MODULE OWNER

matebarabas commented 1 week ago

Hi @FallenHoot,

Thanks for confirming that you wish to own this AVM module and understand the related requirements and responsibilities!

Before starting development, please ensure ALL the following requirements are met.

Please use the following values explicitly as provided in the module index page:

Check if this module exists in the other IaC language. If so, collaborate with the other owner for consistency. πŸ‘

You can now start the development of this module! βœ… Happy coding! πŸŽ‰

Please respond to this comment and request a review from the AVM core team once your module is ready to be published! Please include a link pointing to your PR, once available. πŸ™

Any further questions or clarifications needed, let us know!

Thanks,

The AVM Core Team