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
@@ -41,185 +41,183 @@ Now that you have an environment created, you can deploy your first container ap
41
41
42
42
::: zone pivot="container-apps-private-registry"
43
43
44
-
TODO1 Replace these H3s with a numbered list?
44
+
1. Set environment variables
45
45
46
-
### Set environment variables
46
+
Replace the \<PLACEHOLDERS\> with your values. Your user principal name will typically be in the format of an email address (for example, `[email protected]`).
47
47
48
-
Replace the \<PLACEHOLDERS\> with your values. Your user principal name will typically be in the format of an email address (for example, `[email protected]`).
48
+
# [Bash](#tab/bash)
49
49
50
-
# [Bash](#tab/bash)
50
+
```bash
51
+
KEY_VAULT_NAME=<KEY_VAULT_NAME>
52
+
USER_PRINCIPAL_NAME=<USER_PRINCIPAL_NAME>
53
+
SECRET_NAME=<SECRET_NAME>
54
+
CONTAINER_IMAGE_NAME=<CONTAINER_IMAGE_NAME>
55
+
REGISTRY_SERVER=<REGISTRY_SERVER>
56
+
REGISTRY_USERNAME=<REGISTRY_USERNAME>
57
+
```
51
58
52
-
```bash
53
-
KEY_VAULT_NAME=<KEY_VAULT_NAME>
54
-
USER_PRINCIPAL_NAME=<USER_PRINCIPAL_NAME>
55
-
SECRET_NAME=<SECRET_NAME>
56
-
CONTAINER_IMAGE_NAME=<CONTAINER_IMAGE_NAME>
57
-
REGISTRY_SERVER=<REGISTRY_SERVER>
58
-
REGISTRY_USERNAME=<REGISTRY_USERNAME>
59
-
```
59
+
# [Azure PowerShell](#tab/azure-powershell)
60
60
61
-
# [Azure PowerShell](#tab/azure-powershell)
61
+
```azurepowershell-interactive
62
+
$KeyVaultName = "<KEY_VAULT_NAME>"
63
+
$UserPrincipalName = "<USER_PRINCIPAL_NAME>"
64
+
$SecretName = "<SECRET_NAME>"
65
+
$ContainerImageName = "<CONTAINER_IMAGE_NAME>"
66
+
$RegistryServer = "<REGISTRY_SERVER>"
67
+
$RegistryUsername = "<REGISTRY_USERNAME>"
68
+
```
62
69
63
-
```azurepowershell-interactive
64
-
$KeyVaultName = "<KEY_VAULT_NAME>"
65
-
$UserPrincipalName = "<USER_PRINCIPAL_NAME>"
66
-
$SecretName = "<SECRET_NAME>"
67
-
$ContainerImageName = "<CONTAINER_IMAGE_NAME>"
68
-
$RegistryServer = "<REGISTRY_SERVER>"
69
-
$RegistryUsername = "<REGISTRY_USERNAME>"
70
-
```
70
+
---
71
71
72
-
---
72
+
1. Create key vault
73
73
74
-
### Create keyvault
74
+
It is recommended to store your container registry password using a service such as [Azure Key Vault](https://learn.microsoft.com/en-us/azure/key-vault/general/basic-concepts). The steps in this section explain how to create a key vault, store your container registry password as a secret in the key vault, and then retrieve the password for use in your code.
75
75
76
-
TODO1 Explain why you should use a key vault to store your registry password. We could just link to one of the quickstarts below on creating a key vault and storing a secret in it, and only include the command for retrieving the secret here.
76
+
# [Bash](#tab/bash)
77
77
78
-
# [Bash](#tab/bash)
78
+
```bash
79
+
az keyvault create --name $KEY_VAULT_NAME --resource-group $RESOURCE_GROUP
80
+
```
79
81
80
-
```bash
81
-
az keyvault create --name $KEY_VAULT_NAME --resource-group $RESOURCE_GROUP
82
-
```
83
-
84
-
# [Azure PowerShell](#tab/azure-powershell)
82
+
# [Azure PowerShell](#tab/azure-powershell)
85
83
86
-
First make sure you have installed the [KeyVault](https://www.powershellgallery.com/packages/Az.KeyVault) module.
84
+
First make sure you have installed the [KeyVault](https://www.powershellgallery.com/packages/Az.KeyVault) module.
TODO1 We are deliberately not using an env var to store the registry password here.
118
+
TODO1 I'm deliberately not using an env var to store the registry password here. You can delete this line with a suggestion.
121
119
122
-
# [Bash](#tab/bash)
120
+
# [Bash](#tab/bash)
123
121
124
-
TODO1 There does not seem to be an Azure CLI equivalent for "convert to secure string."
122
+
TODO1 Per Copilot there does not seem to be an Azure CLI equivalent for ConvertTo-SecureString (except using Key Vault itself). You can delete this line with a suggestion.
125
123
126
-
```bash
127
-
az keyvault secret set --vault-name $KEY_VAULT_NAME --name $SECRET_NAME --value "<REGISTRY_PASSWORD>"
128
-
```
124
+
```bash
125
+
az keyvault secret set --vault-name $KEY_VAULT_NAME --name $SECRET_NAME --value "<REGISTRY_PASSWORD>"
-[Quickstart: Set and retrieve a secret from Azure Key Vault using PowerShell](../key-vault/secrets/quick-create-powershell)
159
-
-[Use Azure Key Vault in automation](../../powershell/utility-modules/secretmanagement/how-to/using-azure-keyvault?view=ps-modules)
155
+
For more information, see
156
+
- [Quickstart: Set and retrieve a secret from Azure Key Vault using PowerShell](../key-vault/secrets/quick-create-powershell)
157
+
- [Use Azure Key Vault in automation](../../powershell/utility-modules/secretmanagement/how-to/using-azure-keyvault?view=ps-modules)
160
158
161
-
---
159
+
---
162
160
163
-
###Create container app
161
+
1. Create container app
164
162
165
-
With the `containerapp create` command, deploy a container image to Azure Container Apps.
163
+
With the `containerapp create` command, deploy a container image to Azure Container Apps.
166
164
167
-
The example shown in this article demonstrates how to use a custom container image with common commands. Your container image might need more parameters for the following items:
165
+
The example shown in this article demonstrates how to use a custom container image with common commands. Your container image might need more parameters for the following items:
168
166
169
-
- Set the revision mode
170
-
- Define secrets
171
-
- Define environment variables
172
-
- Set container CPU or memory requirements
173
-
- Enable and configure Dapr
174
-
- Enable external or internal ingress
175
-
- Provide minimum and maximum replica values or scale rules
167
+
- Set the revision mode
168
+
- Define secrets
169
+
- Define environment variables
170
+
- Set container CPU or memory requirements
171
+
- Enable and configure Dapr
172
+
- Enable external or internal ingress
173
+
- Provide minimum and maximum replica values or scale rules
176
174
177
-
# [Bash](#tab/bash)
175
+
# [Bash](#tab/bash)
178
176
179
-
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).
177
+
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