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

Add support for using a rolling upgrade policy on a scale set that has MaxSurge enabled #24898

Closed
1 task done
jmlaubach opened this issue Feb 15, 2024 · 3 comments · Fixed by #24914
Closed
1 task done
Labels
enhancement preview service/vmss Virtual Machine Scale Sets
Milestone

Comments

@jmlaubach
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Description

Currently, when you create a Linux VMSS resource with the upgrade mode set to Rolling, and a rolling_upgrade_policy is set, you can only utilize the default behavior where VMs are brought down in patches to be updated. You are unable to use MaxSurge to change the behavior to where the rolling upgrade creates new VMs first before bringing old VMs down.

It would be helpful as the user to be able to enable the MaxSurge feature for Rolling Upgrade Policies on a scale set. This would allow for resource intensive applications running to not lose any resources by VMs in the scale set being brought down first rather than new VMs being created with updated settings.

New or Affected Resource(s)/Data Source(s)

azurerm_linux_virtual_machine_scale_set

Potential Terraform Configuration

resource "azurerm_linux_virtual_machine_scale_set" "example" {
  name                = "example-vmss"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  sku                 = "Standard_F2"
  instances           = 1
  admin_username      = "adminuser"
  upgrade_mode        = "Rolling"

  rolling_upgrade_policy = {
    max_batch_instance_percent = 20
    max_unhealthy_instance_percent = 10
    max_unhealthy_upgraded_instance_percent = 10
    pause_time_between_batches = "PT10M"
    maxsurge = true
  }

References

No response

@harshavmb
Copy link
Contributor

Hi @jmlaubach ,

Thanks for opening this issue. At this point in time MaxSurge is still in preview mode. I have made changes & opened PR here but it is in draft mode.

I ask for Hashicorp review when the stable version is released.

@jmlaubach
Copy link
Author

@harshavmb

Thanks for the update! Was wondering if this wasn't an option due to it still being in preview mode in Azure. Thank you!

@rcskosir rcskosir added service/vmss Virtual Machine Scale Sets enhancement preview labels Feb 16, 2024
harshavmb added a commit to AmadeusITGroup/terraform-provider-azurerm that referenced this issue Apr 22, 2024
katbyte pushed a commit that referenced this issue May 6, 2024
…irtual_machine_scale_set - support max_surge_instances for vmss rolling upgrades (#24914)
@github-actions github-actions bot added this to the v3.103.0 milestone May 6, 2024
Copy link

github-actions bot commented Jun 6, 2024

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement preview service/vmss Virtual Machine Scale Sets
Projects
None yet
3 participants