Skip to content

Commit ced49a8

Browse files
committed
updated validation scripts and prerequisite information
1 parent d9e9b9f commit ced49a8

File tree

1 file changed

+31
-5
lines changed

1 file changed

+31
-5
lines changed

articles/key-vault/secrets/quick-create-bicep.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,31 @@ ms.author: v-eschaffer
2121

2222
## Prerequisites
2323

24-
To complete this article:
25-
2624
* If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
2725

26+
* Your Azure AD user object ID is needed by the template to configure permissions. The following procedure gets the object ID (GUID).
27+
28+
1. Run the following Azure PowerShell or Azure CLI command by select **Try it**, and then paste the script into the shell pane. To paste the script, right-click the shell, and then select **Paste**.
29+
30+
# [CLI](#tab/CLI)
31+
```azurecli-interactive
32+
echo "Enter your email address that is used to sign in to Azure:" &&
33+
read upn &&
34+
az ad user show --id $upn --query "objectId" &&
35+
echo "Press [ENTER] to continue ..."
36+
```
37+
38+
# [PowerShell](#tab/PowerShell)
39+
```azurepowershell-interactive
40+
$upn = Read-Host -Prompt "Enter your email address used to sign in to Azure"
41+
(Get-AzADUser -UserPrincipalName $upn).Id
42+
Write-Host "Press [ENTER] to continue..."
43+
```
44+
45+
---
46+
47+
2. Write down the object ID. You need it in the next section of this quickstart.
48+
2849
## Review the Bicep file
2950
3051
The template used in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/key-vault-create/).
@@ -64,18 +85,23 @@ Two Azure resources are defined in the Bicep file:
6485
6586
## Review deployed resources
6687
67-
Use the Azure portal, Azure CLI, or Azure PowerShell to list the deployed resources in the resource group.
88+
You can either use the Azure portal to check the key vault and the secret, or use the following Azure CLI or Azure PowerShell script to list the secret created.
6889
6990
# [CLI](#tab/CLI)
7091
7192
```azurecli-interactive
72-
az resource list --resource-group exampleRG
93+
echo "Enter your key vault name:" &&
94+
read keyVaultName &&
95+
az keyvault secret list --vault-name $keyVaultName &&
96+
echo "Press [ENTER] to continue ..."
7397
```
7498

7599
# [PowerShell](#tab/PowerShell)
76100

77101
```azurepowershell-interactive
78-
Get-AzResource -ResourceGroupName exampleRG
102+
$keyVaultName = Read-Host -Prompt "Enter your key vault name"
103+
Get-AzKeyVaultSecret -vaultName $keyVaultName
104+
Write-Host "Press [ENTER] to continue..."
79105
```
80106

81107
---

0 commit comments

Comments
 (0)