Last active
July 12, 2018 13:38
-
-
Save yarick/f722adbff7704241323458e3a9955443 to your computer and use it in GitHub Desktop.
Azure
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
### 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