AzureStack-QuickStart-Templ.../101-vm-windows-create-passw...
Shriram Natarajan 1ad354ac52 Update azuredeploy.json 2017-10-24 15:22:22 -07:00
..
README.md Adding KV templates (#288) 2017-08-25 13:06:57 -07:00
azuredeploy.json Update azuredeploy.json 2017-10-24 15:22:22 -07:00
azuredeploy.parameters.json Adding KV templates (#288) 2017-08-25 13:06:57 -07:00
metadata.json Adding KV templates (#288) 2017-08-25 13:06:57 -07:00

README.md

Very simple deployment of a Windows VM

This template allows you to deploy a simple Windows VM by retrieving the password that is stored in a Key Vault. Therefore the password is never put in plain text in the template parameter file.

Add Secret to the Key Vault

You can add the password to the Key Vault using the below commands:

PowerShell

$Secret = ConvertTo-SecureString -String 'Password' -AsPlainText -Force
Set-AzureKeyVaultSecret -VaultName 'Contoso' -Name 'ITSecret' -SecretValue $Secret

CLI

azure keyvault secret set --vault-name Contoso --secret-name ITSecret --value azurepass

Enable Key Vault for VM and Template secret access

After this you'll need to enable the Key Vault for template deployment. You can do this using the following commands:

PowerShell

Set-AzureRmKeyVaultAccessPolicy -VaultName Contoso -EnabledForTemplateDeployment

CLI

azure keyvault set-policy --vault-name Contoso --enabled-for-template-deployment true