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

Feature Request: Support VMSS upgrade_policy_mode "Rolling" #714

Closed
agolomoodysaada opened this issue Jan 18, 2018 · 1 comment · Fixed by #922
Closed

Feature Request: Support VMSS upgrade_policy_mode "Rolling" #714

agolomoodysaada opened this issue Jan 18, 2018 · 1 comment · Fixed by #922
Labels
enhancement service/vmss Virtual Machine Scale Sets

Comments

@agolomoodysaada
Copy link
Contributor

agolomoodysaada commented Jan 18, 2018

Hi there,

Terraform Version

Terraform v0.11.2
+ provider.azurerm v1.0.1

Affected Resource(s)

Please list the resources as a list, for example:

  • azurerm_virtual_machine_scale_set

Terraform Configuration Files

resource "azurerm_virtual_machine_scale_set" "scaleset" {
  name                = "${var.prefix}-${var.environment}-${var.service_name}"
  resource_group_name = "${var.resource_group}"
  location            = "${var.region}"
  upgrade_policy_mode = "Rolling" #=== specified upgrade policy mode as Rolling here

  overprovision = false
  depends_on    = ["azurerm_lb.lb"]

  sku {
    name     = "${var.instance_type}"
    tier     = "Standard"
    capacity = "${var.servers}"
  }

  os_profile {
    computer_name_prefix = "${var.service_name}"
    admin_username       = "${var.username}"
    admin_password       = "${var.password}"
  }

  os_profile_linux_config {
    disable_password_authentication = false

    ssh_keys {
      path     = "/home/${var.username}/.ssh/authorized_keys"
      key_data = "${var.ssh_public_key}"
    }
  }

  network_profile {
    name    = "${var.service_name}-nic"
    primary = true

    ip_configuration {
      name                                   = "${var.service_name}-ipconfig"
      subnet_id                              = "${azurerm_subnet.subnet.id}"
      load_balancer_backend_address_pool_ids = ["${azurerm_lb_backend_address_pool.backlb.id}"]
      load_balancer_inbound_nat_rules_ids    = ["${element(azurerm_lb_nat_pool.sshnp.*.id, count.index)}", "${element(azurerm_lb_nat_pool.httpnp.*.id, count.index)}"]
    }

    # TODO: Rolling Upgrade support
    # health_probe {
    #   id = ""
    # }
  }

  # TODO: Rolling Upgrade Support
  # rolling_upgrade_policy = {...}

  storage_profile_os_disk {
    caching           = "ReadWrite"
    create_option     = "FromImage"
    managed_disk_type = "Standard_LRS"
  }
  storage_profile_image_reference {
    publisher = "${var.image_publisher}"
    offer     = "${var.image_offer}"
    sku       = "${var.image_sku}"
    version   = "${var.image_version}"
  }
}

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

Rolling upgrade mode should be supported by terraform-provider-azurerm.

Actual Behavior

$ terraform apply
...
module.vmss.azurerm_virtual_machine_scale_set.scaleset: Creating...
...
...
...
  upgrade_policy_mode:  "" => "Rolling"

Error: Error applying plan:

1 error(s) occurred:

* module.vmss.azurerm_virtual_machine_scale_set.scaleset: 1 error(s) occurred:

* azurerm_virtual_machine_scale_set.scaleset: compute.VirtualMachineScaleSetsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="Rolling Upgrade mode is not supported for this Virtual Machine Scale Set because a health probe was not provided."

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

Steps to Reproduce

  1. terraform apply

Important Factoids

@ghost
Copy link

ghost commented Mar 6, 2019

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!

@ghost ghost locked and limited conversation to collaborators Mar 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement service/vmss Virtual Machine Scale Sets
Projects
None yet
2 participants