Created
August 25, 2016 13:15
-
-
Save JanneMattila/d75c925f53e24ff0a97c703cfe2b2cd9 to your computer and use it in GitHub Desktop.
Deploy using parameters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Get password from key vault | |
| $secret = Get-AzureKeyVaultSecret -VaultName $VaultName -Name $VaultSecretName | |
| # Create additional parameters that we pass to the template deployment | |
| $additionalParameters = New-Object -TypeName hashtable | |
| $additionalParameters['adminUsername'] = $AdminUsername | |
| $additionalParameters['adminPassword'] = $secret.SecretValue | |
| $result = New-AzureRmResourceGroupDeployment ` | |
| -ResourceGroupName $ResourceGroupName ` | |
| -TemplateFile $Template ` | |
| -TemplateParameterFile $TemplateParameters ` | |
| @additionalParameters ` | |
| -Verbose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment