Skip to content

Instantly share code, notes, and snippets.

@yarick
Last active July 12, 2018 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yarick/f722adbff7704241323458e3a9955443 to your computer and use it in GitHub Desktop.
Save yarick/f722adbff7704241323458e3a9955443 to your computer and use it in GitHub Desktop.
Azure
### Powershell on OSX or win32
$location = "USGov Virginia"
$resourceGroupName = "CAAS-MGMT-DEPARTMENT-01"
$vaultname = "CAAS-MGMT-VLT"
$secret = "super-secret-password-that-they-will-never-guess-2018-!"
$secretName = "CAAS-MGMT-INSTANCE-PASSWORD"
New-AzureRmResourceGroup -Name $resourceGroupName -Location $location
New-AzureRmKeyVault `
-VaultName $vaultname `
-ResourceGroupName $resourceGroupName `
-Location $location `
-EnabledForTemplateDeployment
$secretvalue = ConvertTo-SecureString $password -AsPlainText -Force
Set-AzureKeyVaultSecret -VaultName $vaultname -Name $secretName -SecretValue $secretvalue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment