-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Support for VMSS orchestration mode #6085
Comments
I am working on this feature now. |
@ArcturusZhang why make this a separate resource rather than being a field within the linux/windows vmss resources? |
I have two reasons:
And additionally, I think the VMSS in VM mode should have a Computed field for all the VMs it associated |
@ArcturusZhang can you please test adding both a selection of Linux and Windows VM to the same Scale Set to confirm that, since Azure explicitly separates the two across other services - as such it's likely this should be bundled into those resources rather than a separate resource. Unfortunately the computed field you've mentioned wouldn't make sense since this value would be out of sync with the VM's attached to it, as such I think we'll need to omit this. |
Hi @tombuildsstuff I have confirmed with developers in the service team that they currently not "officially" support mixing of different operating systems. Therefore I suppose I would take your advise to make the orchestration mode inside the But still, there is a question needed to be solved: how we could determine which operating system this vmss belongs to when there is no VM in it yet? I suppose that we should know this information before we are importing an VMSS, like the current logic of determine whether this is a linux VMSS or windows VMSS. But when the VMSS in VM mode is empty, there is no way that I am aware of to determine this. This is also a reason to make it a separated resource (which I forgot to mention in the last comment). |
Well it has been pointed out by @katbyte that the user can choose which resource to import in when there is no VMs yet. Therefore I will implement the new mode into the existing VMSS resources. Thanks! |
Hi @tombuildsstuff and @katbyte given that the two mode have totally different schema, the VM mode forbade all of the fields in VMSS other than In this way the potential config should be like: data "azurerm_resource_group" "main" {
name = "test-resource"
}
resource "azurerm_linux_virtual_machine_scale_set" "test" {
name = "MyVMSSInVMMode"
location = data.azurerm_resource_group.main.location
resource_group_name = data.azurerm_resource_group.main.name
orchestration_mode_vm_enabled = true
platform_fault_domain_count = 2
single_placement_group = true # the service only accepts true and true is the default value, therefore this attribute can be negligible
zones = ["1"]
tags = {
environment = "Terraform Deployment"
}
} What do you think about this? |
This PR implements the new orchestration mode VM of VMSS by introducing the new resource azurerm_orchestrated_virtual_machine_scale_set. For more information about the orchestration mode of VMSS, please refer this doc Fixes #6085
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! |
Community Note
Description
The orchestration mode of VMSS is currently in public preview: https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/orchestration-modes
With the orchestration mode, you can now choose whether the scale set should orchestrate virtual machines which are created explicitly outside of a scale set configuration model, or virtual machine instances created implicitly based on the configuration model. Scale set orchestration mode also helps you design your VM infrastructure for high availability by deploying these VMs in fault domains and Availability Zones.
Currently we have two different orchestration modes:
ScaleSetVM
, andVM
. Their difference are listed in this doc. The orchestration mode of a VMSS cannot be changed once it is created.New or Affected Resource(s)
The orchestration mode
ScaleSetVM
is just the current default VMSS behaviour. The orchestration modeVM
will only create an empty VMSS without any instances, and you will have to manually add new VMs into it by specifying the VMSS ID during the creation of the VM.The VMSS in VM mode can accepts both linux VM and windows VM, therefore I suppose this should be achieved by introducing a new resource and data source representing a VMSS in VM mode.
And the VMs will need the functionality to add themselves to a VMSS in VM mode.
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: