Terraform-provider-azurerm: Setting upgrade_mode to Automatic requires healthProbeId

Created on 20 Apr 2020  ·  4Comments  ·  Source: terraform-providers/terraform-provider-azurerm

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

Terraform (and AzureRM Provider) Version

Terraform v0.12.24

  • provider.azurerm v2.6.0

Affected Resource(s)

  • azurerm_windows_virtual_machine_scale_set

Terraform Configuration Files

resource "azurerm_windows_virtual_machine_scale_set" "main" {
  provider             = azurerm.POC
  name                 = "${var.prefix_for_scaleset_resources}-vmss"
  resource_group_name  = data.azurerm_resource_group.main.name
  location             = data.azurerm_resource_group.main.location
  sku                  = "Standard_D4_v3"
  instances            = var.no_of_scaleset_instances
  admin_username       = var.admin_username
  admin_password       = var.admin_password
  computer_name_prefix = var.prefix_for_scaleset_resources
  source_image_id      = var.slotvm_image_reference
  upgrade_mode         = "Automatic"
  automatic_os_upgrade_policy {

  }

  network_interface {
    name                      = "${var.prefix_for_scaleset_resources}-nic"
    primary                   = true
    network_security_group_id = azurerm_network_security_group.app.id

    ip_configuration {
      name      = "subnet"
      primary   = true
      subnet_id = data.azurerm_subnet.subnet.id
    }
  }

  os_disk {
    storage_account_type = "Standard_LRS"
    caching              = "ReadWrite"
  }
}

Debug Output


Error: healthProbeId must be set when upgrade_mode is set to "Automatic"

on main.tf line 52, in resource "azurerm_windows_virtual_machine_scale_set" "main":
52: resource "azurerm_windows_virtual_machine_scale_set" "main" {

Panic Output

Expected Behavior

'healthProbeId' should not be required.

Actual Behavior

'healthProbeId' is required.

Steps to Reproduce

  • Set 'upgrade_mode' to Automatic
  1. terraform apply

Important Factoids

References

In the legacy azurerm_virtual_machine_scale_set health probe is only required when upgrade mode is set to 'Rolling' I would expect same behavior in azurerm_windows_virtual_machine_scale_set. Further Azure portal does not require health probe when upgrade mode is set to Automatic.

bug good first issue servicvmss

All 4 comments

Hi I know this is pending a merge to master but I just wanted to ask if someone can share any alternative in the meantime, I'd appreciate it! We are often updating image IDs and have to then go to the portal to do a manual upgrade.

is there any way of knowing when or if this issue will be closed with the above PR? This is a real sticky point for us who run hundreds of vmss deployments without any associated LB.

This has been released in version 2.25.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.25.0"
}
# ... other configuration ...

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 👉 [email protected]. Thanks!

Was this page helpful?
0 / 5 - 0 ratings