Azure / Azure/Azure-Verified-Modules
[Module Proposal]: `avm/res/insights/autoscale-setting`
- Dominant language
- PowerShell
- Stars
- 580
- Forks
- 161
- Avg merge
- 11h 3m
- Merged PRs (30d)
- 15
Description
### Check for previous/existing GitHub issues/module proposals
- [x] I have checked for previous/existing GitHub issues/module proposals.
### Check this module doesn't already exist in the module indexes
- [x] I have checked for that 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:
- **name**: The name of the autoscale setting.
- **location**: The location where the autoscale setting is deployed.
- **tags**: A list of key-value pairs that describe the resource.
- **properties**: This includes several sub-properties such as:
- **enabled**: A boolean indicating whether the autoscale setting is enabled.
- **notifications**: An array of notification settings, including email and webhook configurations.
- **predictiveAutoscalePolicy**: Settings for predictive autoscale, including look-ahead time and scale mode.
- **profiles**: An array of profiles that define the autoscale rules. Each profile includes:
- **capacity**: Defines the minimum, maximum, and default number of instances.
- **fixedDate**: Specifies the start and end date for the profile.
- **recurrence**: Defines the recurrence schedule for the profile.
- **rules**: An array of rules that define the conditions for scaling. Each rule includes:
- **metricTrigger**: Defines the metric that triggers the scaling action.
- **scaleAction**: Defines the action to take when the metric trigger condition is met.
### Example Bicep Template:
```bicep
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_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.