You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -51,18 +51,123 @@ The example shown in this article demonstrates how to use a custom container ima
51
51
52
52
::: zone pivot="container-apps-private-registry"
53
53
54
-
#[Bash](#tab/bash)
54
+
### Set environment variables
55
55
56
-
For details on how to provide values for any of these parameters to the `create` command, run `az containerapp create --help` or [visit the online reference](/cli/azure/containerapp#az-containerapp-create). To generate credentials for an Azure Container Registry, use [az acr credential show](/cli/azure/acr/credential#az-acr-credential-show).
56
+
Replace the \<PLACEHOLDERS\> with your values. Your user principal name will typically be in the format of an email address (for example, `[email protected]`).
57
+
58
+
# [Bash](#tab/bash)
57
59
58
60
```bash
61
+
KEY_VAULT_NAME=<KEY_VAULT_NAME>
62
+
USER_PRINCIPAL_NAME=<USER_PRINCIPAL_NAME>
63
+
SECRET_NAME=<SECRET_NAME>
59
64
CONTAINER_IMAGE_NAME=<CONTAINER_IMAGE_NAME>
60
65
REGISTRY_SERVER=<REGISTRY_SERVER>
61
66
REGISTRY_USERNAME=<REGISTRY_USERNAME>
62
-
REGISTRY_PASSWORD=<REGISTRY_PASSWORD>
63
67
```
64
68
65
-
(Replace the \<placeholders\> with your values.)
69
+
# [Azure PowerShell](#tab/azure-powershell)
70
+
71
+
```azurepowershell-interactive
72
+
$KeyVaultName = "<KEY_VAULT_NAME>"
73
+
$UserPrincipalName = "<USER_PRINCIPAL_NAME>"
74
+
$SecretName = "<SECRET_NAME>"
75
+
$ContainerImageName = "<CONTAINER_IMAGE_NAME>"
76
+
$RegistryServer = "<REGISTRY_SERVER>"
77
+
$RegistryUsername = "<REGISTRY_USERNAME>"
78
+
```
79
+
80
+
---
81
+
82
+
### Create key vault
83
+
84
+
# [Bash](#tab/bash)
85
+
86
+
```bash
87
+
az keyvault create --name $KEY_VAULT_NAME --resource-group $RESOURCE_GROUP
88
+
```
89
+
90
+
# [Azure PowerShell](#tab/azure-powershell)
91
+
92
+
First make sure you have installed the [KeyVault](https://www.powershellgallery.com/packages/Az.KeyVault) module.
-[Quickstart: Set and retrieve a secret from Azure Key Vault using PowerShell](../key-vault/secrets/quick-create-powershell)
162
+
-[Use Azure Key Vault in automation](../../powershell/utility-modules/secretmanagement/how-to/using-azure-keyvault?view=ps-modules)
163
+
164
+
---
165
+
166
+
### Create container app
167
+
168
+
# [Bash](#tab/bash)
169
+
170
+
For details on how to provide values for any of these parameters to the `create` command, run `az containerapp create --help` or [visit the online reference](/cli/azure/containerapp#az-containerapp-create). To generate credentials for an Azure Container Registry, use [az acr credential show](/cli/azure/acr/credential#az-acr-credential-show).
0 commit comments