Azure Scaleset Update Customscript Protected settings

Luke Uhren 191 Reputation points
2022-02-23T20:06:55.517+00:00

Is there a way to update protected settings on an already priovisioned Azure Scaleset? In scalesets I don't see a way to easily update the customscript via something like Powershell other than Add-AzVmssExtension.

What I want to do is update the protected settings of the storage account key as the storage account keys were rotated since the script was last ran which is needed and if I was to scale it up and it used the old Storage key it would fail. Is there a way to update such a setting without re-provisioning the scaleset?

Thanks

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,773 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. shiva patpi 13,251 Reputation points Microsoft Employee
    2022-02-24T02:29:58.213+00:00

    Hello @Luke Uhren ,
    Can you try using below sample command , you can change any settings by using the az vmss update , please make sure to refer to the right attribute.

    az vmss update --resource-group <resourcegroupname> --name <vmssname> --set virtualMachineProfile.extensionProfile.extensions[0].protectedSettings=""

    BTW - In the extension profile - I don't see the STORAGE ACCOUNT KEY

    177372-settings.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.