Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_virtual_machine_scale_set does not support autoscale rules #1114

Closed
srjennings opened this issue Apr 12, 2018 · 2 comments
Closed

azurerm_virtual_machine_scale_set does not support autoscale rules #1114

srjennings opened this issue Apr 12, 2018 · 2 comments

Comments

@srjennings
Copy link

srjennings commented Apr 12, 2018

Terraform Version

Terraform v0.11.7

  • provider.azurerm v1.3.2
  • provider.random v1.2.0

Affected Resource(s)

  • azurerm_virtual_machine_scale_set

Expected Behavior

Terraform Azure Scale Set resource should support auto-scaling capability.
This is the primary use case for Azure Scale Sets.

Actual Behavior

azurerm_virtual_machine_scale_set does not support autoscale rules.

Important Factoids

See the following JSON code as example for deploying such capability in Azure (as written in referenced material):

Create a profile;

{
"type": "Microsoft.insights/autoscalesettings",
"name": "Autoscale",
"apiVersion": "2014-04-01",
"location": "[variables('location')]",
"scale": null,
"properties": {
  "profiles": [
    {
      "name": "Autoscale by percentage based on CPU usage",
      "capacity": {
        "minimum": "2",
        "maximum": "10",
        "default": "2"
      }
    }
  ]
}

Define a rule to autoscale out;

"rules": [
  {
    "metricTrigger": {
      "metricName": "Percentage CPU",
      "metricNamespace": "",
      "metricResourceUri": "[concat('/subscriptions/',subscription().subscriptionId, '/resourceGroups/',  resourceGroup().name, '/providers/Microsoft.Compute/virtualMachineScaleSets/', variables('vmssName'))]",
      "metricResourceLocation": "[variables('location')]",
      "timeGrain": "PT1M",
      "statistic": "Average",
      "timeWindow": "PT5M",
      "timeAggregation": "Average",
      "operator": "GreaterThan",
      "threshold": 70
    },
    "scaleAction": {
      "direction": "Increase",
      "type": "ChangeCount",
      "value": "3",
      "cooldown": "PT5M"
    }
  }
]

References

Define an autoscale profile
Define a rule to autoscale out
Full JSON example of scale set with autoscale rules on Azure github

@katbyte katbyte added enhancement service/vmss Virtual Machine Scale Sets labels Apr 12, 2018
@tombuildsstuff tombuildsstuff added duplicate and removed enhancement service/vmss Virtual Machine Scale Sets labels Apr 12, 2018
@tombuildsstuff
Copy link
Contributor

hey @deyjcode

Thanks for opening this issue :)

Support for Auto Scale Settings has previously been requested in #50 - rather than having multiple issues tracking the same feature request I'm going to close this issue in favour of #50.

Thanks!

@ghost
Copy link

ghost commented Mar 31, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants