You need to deploy a Virtual Machine Scale Set (VMSS) named `vmss-app` that automatically installs an application during provisioning. The installation script is stored in a private Azure Storage account. Which sequence of steps should you perform to configure the VMSS to retrieve and run the script securely?
- 1Upload the installation script to a private blob container in the Azure Storage account.
- 2Generate a Shared Access Signature (SAS) token with Read permissions for the uploaded script blob.
- 3Configure the Custom Script Extension settings in the VMSS resource definition, referencing the script's SAS URL.
- 4Deploy the VMSS to provision the instances and run the script.
Answer
To securely run a script on a new VMSS from a private storage account, first upload the script to a private container, generate a SAS token with Read permissions, configure the Custom Script Extension in the VMSS template using the SAS URL, and then deploy the VMSS.
To deploy a VMSS that securely runs a custom installation script stored in a private Azure Storage account, you must first upload the script to the storage account. Once uploaded, you generate a Shared Access Signature (SAS) token to provide temporary, secure read access. Next, you reference this SAS URL in the VMSS Custom Script Extension configuration within your deployment template. Finally, you deploy the VMSS, which provisions the instances and executes the script.
Step-by-Step Solution
Key Concept
Configuring Custom Script Extensions on a VMSS using private storage with SAS authentication