Last active
November 1, 2019 12:49
-
-
Save MauRiEEZZZ/eaade8e5840262d732d2c4bd961f660e to your computer and use it in GitHub Desktop.
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
#we create a randomized name, the name of the keyvault has to be unique within the current cloud | |
#it will be publicly available using this name. | |
keyvaultName="keyvault-$(cat /proc/sys/kernel/random/uuid | cut -c-7)" | |
keyvaultURI=$(az keyvault create --name $keyvaultName --resource-group "ContosoResourceGroup" --location eastus --query "properties.vaultUri" --output tsv) | |
az keyvault secret set --vault-name $keyvaultName --name "ExamplePassword" --value "sampleSecretValueIn_plaintext" | |
tenantID=$(az account show --output tsv --query tenantId) | |
echo "The URI for the keyvault is: $keyvaultURI" | |
echo "The ID for the tenant is: $tenantID" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment