If you don't like the existing network security group object linked with your virtual machine scale set, you can change it by using set command replacing value there with new id. There is no separate az vmss update command for it.
used variables:
- $subscriptionId
- $resourceGroup
- $vmssName
- $nsgNameNew
- az vmss update --name $vmssName -g $resourceGroup --set virtualMachineProfile.networkProfile.networkInterfaceConfigurations[0].networkSecurityGroup.id=/subscriptions/$subscriptionId/resourceGroups/$resourceGroup/providers/Microsoft.Network/networkSecurityGroups/$nsgNameNew
- az vmss update-instances --instance-ids '*' --name $vmssName --resource-group $resourceGroup --output none --no-wait
I hope it helped.
Žádné komentáře :
Okomentovat
Dotaz, připomínka, oprava?
(pokud máte problém s vložením příspěvku, vyzkoušejte to v prohlížeči Chrome)