Created
August 25, 2016 13:11
-
-
Save JanneMattila/29aca82253994045218275e5079a24f1 to your computer and use it in GitHub Desktop.
Clip from deploy-initial.ps1
This file contains 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
Write-Host Creating resource group... | |
New-AzureRmResourceGroup -Name $ResourceGroupName -Location $Location -Verbose | |
Write-Host Creating key vault... | |
New-AzureRmKeyVault ` | |
-VaultName $VaultName ` | |
-EnabledForDeployment ` | |
-EnabledForTemplateDeployment ` | |
-ResourceGroupName $ResourceGroupName ` | |
-Location $Location -Verbose | |
Write-Host Setting access policy to the service principal... | |
Set-AzureRmKeyVaultAccessPolicy ` | |
-VaultName $VaultName ` | |
-ResourceGroupName $ResourceGroupName ` | |
-PermissionsToSecrets get,set ` | |
-ServicePrincipalName $ServicePrincipal | |
Write-Host Set admin password to key vault... | |
Set-AzureKeyVaultSecret ` | |
-SecretValue $AdminPassword ` | |
-VaultName $VaultName ` | |
-Name $VaultSecretName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment