Store the administrator password as a secret in Azure Key Vault. In the parameter file, reference the secret by the vault's resource ID (keyVault.id) and the secretName, so the password never appears in plain text in the template or parameter file. The vault must have enabledForTemplateDeployment set to true, and the user who deploys the template needs the Microsoft.KeyVault/vaults/deploy/action permission for the resource group and vault (the Owner and Contributor roles include it). An access policy gives users who work with the secret directly, such as the administrator who creates it, permissions on secrets; it isn't needed just to retrieve the secret during a deployment. On vaults that use the Azure RBAC permission model, which Microsoft recommends, an Azure role assignment replaces the access policy.
Community Discussion