Azurerm windows virtual machine scale set Extensions

I am switching from using the azurerm_virtual_machine_scale_set resource to azurerm_windows_virtual_machine_scale_set resource.

As azurerm_windows_virtual_machine_scale_set does not appear to have an extensions argument and uses the azurerm_virtual_machine_scale_set_extension resource i have run into an issue when attempting to add the Microsoft.Azure.ServiceFabric.ServiceFabricNode extension.

As the extension resources are added after the VMSS has been created this extension fails as it will need to be created at the time of the VMSS creation.

Error message is as follows.

Error: Error creating Extension “” (Virtual Machine Scale Set “” / Resource Group “”): compute.VirtualMachineScaleSetExtensionsClient#CreateOrUpdate: Failure sending request: StatusCode=0 – Original Error: autorest/azure: Service returned
an error. Status= Code=“OperationNotAllowed” Message=“VM Scale Set extensions of handler ‘Microsoft.Azure.ServiceFabric.ServiceFabricNode’ can be added only at the time of VM Scale Set creation.”

Does anyone know how to get around this?

Thanks

2 Likes

Hi,

I’ve added your report to next GitHub issue:

I hope it’ll help.

Thanks for that @arestarh

Hi @chrisp787, did you find a way around this limitation, or did you revert to the azurerm_virtual_machine_scale_set resource?