Skip to content

Commit adc7c69

Browse files
committed
Revert "Change command to secret set"
This reverts commit d33923d.
1 parent ecd1241 commit adc7c69

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

articles/container-apps/manage-secrets.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ When you create a container app, secrets are defined using the `--secrets` param
8282
```bash
8383
az containerapp create \
8484
--resource-group "my-resource-group" \
85-
--name "queuereader" \
85+
--name queuereader \
8686
--environment "my-environment-name" \
87-
--image "demos/queuereader:v1" \
87+
--image demos/queuereader:v1 \
8888
--secrets "queue-connection-string=<CONNECTION_STRING>"
8989
```
9090

@@ -175,22 +175,23 @@ Replace `<KEY-VAULT-SECRET-URI>` with the URI of your secret in Key Vault.
175175

176176
# [Azure CLI](#tab/azure-cli)
177177

178-
Secrets are managed using the `az containerapp secret` CLI subgroup.
178+
When you create a container app, secrets are defined using the `--secrets` parameter.
179179

180-
- The `--secrets` parameter accepts a space-delimited set of name/value pairs.
180+
- The parameter accepts a space-delimited set of name/value pairs.
181181
- Each pair is delimited by an equals sign (`=`).
182182
- To specify a Key Vault reference, use the format `<SECRET_NAME>=keyvaultref:<KEY_VAULT_SECRET_URI>,identityref:<MANAGED_IDENTITY_ID>`. For example, `queue-connection-string=keyvaultref:https://mykeyvault.vault.azure.net/secrets/queuereader,identityref:/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-identity`.
183183

184-
The following command sets a secret for a container app using a Key Vault reference.
185-
186184
```bash
187-
az containerapp secret set \
185+
az containerapp create \
188186
--resource-group "my-resource-group" \
189-
--name "queuereader" \
190-
--secrets "queue-connection-string=keyvaultref:<KEY_VAULT_SECRET_URI>,identityref:<MANAGED_IDENTITY_ID>"
187+
--name queuereader \
188+
--environment "my-environment-name" \
189+
--image demos/queuereader:v1 \
190+
--user-assigned "<USER_ASSIGNED_IDENTITY_ID>" \
191+
--secrets "queue-connection-string=keyvaultref:<KEY_VAULT_SECRET_URI>,identityref:<USER_ASSIGNED_IDENTITY_ID>"
191192
```
192193

193-
Here, a connection string to a queue storage account is declared in the `--secrets` parameter. Replace `<KEY_VAULT_SECRET_URI>` with the URI of your secret in Key Vault. Replace `<MANAGED_IDENTITY_ID>` with the resource ID of a user assigned identity. For system assigned identity, use `System` instead of the resource ID. The identity must have access to the Key Vault secret.
194+
Here, a connection string to a queue storage account is declared in the `--secrets` parameter. Replace `<KEY_VAULT_SECRET_URI>` with the URI of your secret in Key Vault. Replace `<USER_ASSIGNED_IDENTITY_ID>` with the resource ID of the user assigned identity. For system assigned identity, use `System` instead of the resource ID.
194195

195196
# [PowerShell](#tab/powershell)
196197

0 commit comments

Comments
 (0)