azurehpc/scripts/create_keyvault.sh

13 строки
384 B
Bash
Executable File

#!/bin/bash
# Create a Key vault if it doesn't exists
resource_group=$1
key_vault=$2
# Create Key Vault to store secrets and keys
az keyvault show -n $key_vault --output table 2>/dev/null
if [ "$?" = "0" ]; then
echo "keyvault $key_vault already exists"
else
az keyvault create --name $key_vault --resource-group $resource_group --enable-soft-delete false --output table
fi