I deployed a Virtual Machine Scale Set (VMSS) for Azure as part of a Service Fabric cluster. When I try to redistribute the template, it has improved a bit to update VMSS with an additional secret, I get the following error. I checked that the parameters that I use are correct.
"type": "Microsoft.Compute/virtualMachineScaleSets", // ... "osProfile": { // ... "secrets": [ { "sourceVault": { "id": "[parameters('sourceVaultValue')]" }, "vaultCertificates": [ { "certificateStore": "[parameters('certificateStoreValue')]", "certificateUrl": "[parameters('certificateUrlValue')]" }, { // ******* ADDED ******* "certificateStore": "[parameters('certificateStoreValue')]", "certificateUrl": "[parameters('sslCertificateUrlValue')]" } // ******* ADDED ******* ] } ] }, // ...
New-AzureRmResourceGroupDeployment: 5:46:20 PM - Resource Microsoft.Compute / virtualMachineScaleSets 'Primary' failed with message
'VHD Containers currently being used by any Virtual Machine Scale Set VM instances may not be removed. To remove a VHD Container, all
Virtual Machine Scale Set VM instances using it must first be deleted. '
At D: \ myapp \ deploy \ deploy.ps1: 104 char: 5
+ New-AzureRmResourceGroupDeployment -ResourceGroupName $ resourceGr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
+ CategoryInfo: NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
+ FullyQualifiedErrorId: Microsoft.Azure.Commands.Resources.NewAzureResourceGroupDeploymentCommand
source share