Skip to content

Commit 45a56ef

Browse files
committed
try rearranging docs
Signed-off-by: Hannah Hunter <[email protected]>
1 parent 191d0b7 commit 45a56ef

File tree

4 files changed

+146
-114
lines changed

4 files changed

+146
-114
lines changed

articles/container-apps/TOC.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -268,19 +268,23 @@
268268
displayName: Developing with Dapr overview
269269
- name: Get started
270270
items:
271-
- name: Daploy using Azure CLI
271+
- name: Deploy using Azure CLI
272272
href: microservices-dapr.md
273273
- name: Deploy using ARM or Bicep
274274
href: microservices-dapr-azure-resource-manager.md
275-
- name: Connect to Azure services via Dapr components
276-
href: dapr-component-connection.md
277-
- name: Enable Dapr
275+
- name: Enable Dapr on an existing container app
278276
href: enable-dapr.md
279-
- name: Configure
277+
- name: Dapr components
280278
items:
281-
- name: Dapr components
279+
- name: Component overview
282280
href: dapr-components.md
283-
- name: Dapr component resiliency (preview)
281+
- name: Connecting Dapr components to external
282+
href: dapr-component-authentication.md
283+
- name: Connect to Azure services using Azure portal
284+
href: dapr-component-connection.md
285+
- name: Configure
286+
items:
287+
- name: Set up Dapr resiliency policies (preview)
284288
href: dapr-component-resiliency.md
285289
- name: Scale Dapr apps with KEDA using Bicep
286290
href: dapr-keda-scaling.md
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
---
2+
title: Connecting to services via Dapr components
3+
description: Learn more about how Dapr components work on your Azure Container App service to develop applications.
4+
ms.author: hannahhunter
5+
author: hhunter-ms
6+
ms.service: azure-container-apps
7+
ms.custom: build-2023
8+
ms.topic: conceptual
9+
ms.date: 09/23/2024
10+
---
11+
12+
## Connecting to services via Dapr components
13+
14+
Securely establish connections to Azure and external services for Dapr components using any of the following approaches.
15+
16+
1. [Using managed identity](#using-managed-identity)
17+
1. Using a Dapr secret store component reference by creating either:
18+
- [An Azure Key Vault secret store](#azure-key-vault-secret-stores), which uses managed identity, or
19+
- [Platform-Managed Kubernetes secrets](#platform-managed-kubernetes-secrets)
20+
21+
### Using managed identity
22+
23+
For Azure-hosted services, Dapr can use [the managed identity of the scoped container apps][aca-managed-id] to authenticate to the backend service provider. When using managed identity, you don't need to include secret information in a component manifest. Using managed identity is preferred as it eliminates storage of sensitive input in components and doesn't require managing a secret store.
24+
25+
> [!NOTE]
26+
> The `azureClientId` metadata field (the client ID of the managed identity) is **required** for any component authenticating with user-assigned managed identity.
27+
28+
### Using a Dapr secret store component reference
29+
30+
When you create Dapr components for non-Entra ID enabled services, certain metadata fields require sensitive input values. The recommended approach for retrieving these secrets is to reference an existing Dapr secret store component that securely accesses secret information.
31+
32+
To set up a reference:
33+
34+
1. [Create a Dapr secret store component using the Azure Container Apps schema.](#creating-a-dapr-secret-store-component) The component type for all supported Dapr secret stores begins with `secretstores.`.
35+
1. [Create extra components (as needed) which reference the Dapr secret store component](#referencing-dapr-secret-store-components) you created to retrieve the sensitive metadata input.
36+
37+
#### Creating a Dapr secret store component
38+
39+
When creating a secret store component in Azure Container Apps, you can provide sensitive information in the metadata section in either of the following ways:
40+
41+
- [For an **Azure Key Vault secret store**,](#using-managed-identity) use managed identity to establish the connection.
42+
- [For **non-Azure secret stores**,](#platform-managed-kubernetes-secrets) use platform-managed Kubernetes secrets that are defined directly as part of the component manifest.
43+
44+
##### Azure Key Vault secret stores
45+
46+
The following component showcases the simplest possible secret store configuration using an Azure Key Vault secret store. In this example, publisher and subscriber applications are configured to both have a system or user-assigned managed identity with appropriate permissions on the Azure Key Vault instance.
47+
48+
```yaml
49+
componentType: secretstores.azure.keyvault
50+
version: v1
51+
metadata:
52+
- name: vaultName
53+
value: [your_keyvault_name]
54+
- name: azureEnvironment
55+
value: "AZUREPUBLICCLOUD"
56+
- name: azureClientId # Only required for authenticating user-assigned managed identity
57+
value: [your_managed_identity_client_id]
58+
scopes:
59+
- publisher-app
60+
- subscriber-app
61+
```
62+
63+
##### Platform-managed Kubernetes secrets
64+
65+
Kubernetes secrets, Local environment variables, and Local file Dapr secret stores aren't supported in Azure Container Apps. As an alternative for the upstream Dapr default Kubernetes secret store, Azure Container Apps provides a platform-managed approach for creating and leveraging Kubernetes secrets.
66+
67+
This component configuration defines the sensitive value as a secret parameter that can be referenced from the metadata section. This approach can be used to connect to non-Azure services or in dev/test scenarios for quickly deploying components via the CLI without setting up a secret store or managed identity.
68+
69+
```yaml
70+
componentType: secretstores.azure.keyvault
71+
version: v1
72+
metadata:
73+
- name: vaultName
74+
value: [your_keyvault_name]
75+
- name: azureEnvironment
76+
value: "AZUREPUBLICCLOUD"
77+
- name: azureTenantId
78+
value: "[your_tenant_id]"
79+
- name: azureClientId
80+
value: "[your_client_id]"
81+
- name: azureClientSecret
82+
secretRef: azClientSecret
83+
secrets:
84+
- name: azClientSecret
85+
value: "[your_client_secret]"
86+
scopes:
87+
- publisher-app
88+
- subscriber-app
89+
```
90+
91+
#### Referencing Dapr secret store components
92+
93+
Once you [create a Dapr secret store using one of the previous approaches](#creating-a-dapr-secret-store-component), you can reference that secret store from other Dapr components in the same environment. The following example demonstrates using Entra ID authentication.
94+
95+
```yaml
96+
componentType: pubsub.azure.servicebus.queue
97+
version: v1
98+
secretStoreComponent: "[your_secret_store_name]"
99+
metadata:
100+
- name: namespaceName
101+
# Required when using Azure Authentication.
102+
# Must be a fully-qualified domain name
103+
value: "[your_servicebus_namespace.servicebus.windows.net]"
104+
- name: azureTenantId
105+
value: "[your_tenant_id]"
106+
- name: azureClientId
107+
value: "[your_client_id]"
108+
- name: azureClientSecret
109+
secretRef: azClientSecret
110+
scopes:
111+
- publisher-app
112+
- subscriber-app
113+
```
114+
115+
## Next steps
116+
117+
[Learn how to set Dapr component resiliency.][dapr-resiliency]
118+
119+
<!-- Links Internal -->
120+
121+
[dapr-component-connection]: ./dapr-component-connection.md
122+
[dapr-keda]: ./dapr-keda-scaling.md
123+
[aca-managed-id]: ./managed-identity.md
124+
[dapr-resiliency]: ./dapr-component-resiliency.md
125+
[dapr-components-connect-services]: ./dapr-component-connect-services.md
126+
127+
<!-- Links External -->
128+
129+
[dapr-component]: https://docs.dapr.io/concepts/components-concept/
130+
[dapr-component-spec]: https://docs.dapr.io/reference/resource-specs/

articles/container-apps/dapr-components.md

Lines changed: 2 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -73,109 +73,6 @@ scopes:
7373
> [!NOTE]
7474
> Dapr component scopes correspond to the Dapr application ID of a container app, not the container app name.
7575

76-
## Connecting to external services via Dapr
77-
78-
There are a few approaches supported in container apps to securely establish connections to external services for Dapr components.
79-
80-
1. [Using managed identity](#using-managed-identity)
81-
1. Using a Dapr secret store component reference by creating either:
82-
- [An Azure Key Vault secret store](#azure-key-vault-secret-stores), which uses managed identity, or
83-
- [Platform-Managed Kubernetes secrets](#platform-managed-kubernetes-secrets)
84-
85-
### Using managed identity
86-
87-
For Azure-hosted services, Dapr can use [the managed identity of the scoped container apps][aca-managed-id] to authenticate to the backend service provider. When using managed identity, you don't need to include secret information in a component manifest. Using managed identity is preferred as it eliminates storage of sensitive input in components and doesn't require managing a secret store.
88-
89-
> [!NOTE]
90-
> The `azureClientId` metadata field (the client ID of the managed identity) is **required** for any component authenticating with user-assigned managed identity.
91-
92-
### Using a Dapr secret store component reference
93-
94-
When you create Dapr components for non-Entra ID enabled services, certain metadata fields require sensitive input values. The recommended approach for retrieving these secrets is to reference an existing Dapr secret store component that securely accesses secret information.
95-
96-
To set up a reference:
97-
98-
1. [Create a Dapr secret store component using the Azure Container Apps schema.](#creating-a-dapr-secret-store-component) The component type for all supported Dapr secret stores begins with `secretstores.`.
99-
1. [Create extra components (as needed) which reference the Dapr secret store component](#referencing-dapr-secret-store-components) you created to retrieve the sensitive metadata input.
100-
101-
#### Creating a Dapr secret store component
102-
103-
When creating a secret store component in Azure Container Apps, you can provide sensitive information in the metadata section in either of the following ways:
104-
105-
- [For an **Azure Key Vault secret store**,](#using-managed-identity) use managed identity to establish the connection.
106-
- [For **non-Azure secret stores**,](#platform-managed-kubernetes-secrets) use platform-managed Kubernetes secrets that are defined directly as part of the component manifest.
107-
108-
##### Azure Key Vault secret stores
109-
110-
The following component showcases the simplest possible secret store configuration using an Azure Key Vault secret store. In this example, publisher and subscriber applications are configured to both have a system or user-assigned managed identity with appropriate permissions on the Azure Key Vault instance.
111-
112-
```yaml
113-
componentType: secretstores.azure.keyvault
114-
version: v1
115-
metadata:
116-
- name: vaultName
117-
value: [your_keyvault_name]
118-
- name: azureEnvironment
119-
value: "AZUREPUBLICCLOUD"
120-
- name: azureClientId # Only required for authenticating user-assigned managed identity
121-
value: [your_managed_identity_client_id]
122-
scopes:
123-
- publisher-app
124-
- subscriber-app
125-
```
126-
127-
##### Platform-managed Kubernetes secrets
128-
129-
Kubernetes secrets, Local environment variables, and Local file Dapr secret stores aren't supported in Azure Container Apps. As an alternative for the upstream Dapr default Kubernetes secret store, Azure Container Apps provides a platform-managed approach for creating and leveraging Kubernetes secrets.
130-
131-
This component configuration defines the sensitive value as a secret parameter that can be referenced from the metadata section. This approach can be used to connect to non-Azure services or in dev/test scenarios for quickly deploying components via the CLI without setting up a secret store or managed identity.
132-
133-
```yaml
134-
componentType: secretstores.azure.keyvault
135-
version: v1
136-
metadata:
137-
- name: vaultName
138-
value: [your_keyvault_name]
139-
- name: azureEnvironment
140-
value: "AZUREPUBLICCLOUD"
141-
- name: azureTenantId
142-
value: "[your_tenant_id]"
143-
- name: azureClientId
144-
value: "[your_client_id]"
145-
- name: azureClientSecret
146-
secretRef: azClientSecret
147-
secrets:
148-
- name: azClientSecret
149-
value: "[your_client_secret]"
150-
scopes:
151-
- publisher-app
152-
- subscriber-app
153-
```
154-
155-
#### Referencing Dapr secret store components
156-
157-
Once you [create a Dapr secret store using one of the previous approaches](#creating-a-dapr-secret-store-component), you can reference that secret store from other Dapr components in the same environment. The following example demonstrates using Entra ID authentication.
158-
159-
```yaml
160-
componentType: pubsub.azure.servicebus.queue
161-
version: v1
162-
secretStoreComponent: "[your_secret_store_name]"
163-
metadata:
164-
- name: namespaceName
165-
# Required when using Azure Authentication.
166-
# Must be a fully-qualified domain name
167-
value: "[your_servicebus_namespace.servicebus.windows.net]"
168-
- name: azureTenantId
169-
value: "[your_tenant_id]"
170-
- name: azureClientId
171-
value: "[your_client_id]"
172-
- name: azureClientSecret
173-
secretRef: azClientSecret
174-
scopes:
175-
- publisher-app
176-
- subscriber-app
177-
```
178-
17976
## Component examples
18077

18178
# [YAML](#tab/yaml)
@@ -277,14 +174,15 @@ This resource defines a Dapr component called `dapr-pubsub` via ARM.
277174

278175
## Next steps
279176

280-
[Learn how to set Dapr component resiliency.][dapr-resiliency]
177+
[Learn how to connect to Azure and external services via Dapr components.][dapr-components-connect-services]
281178

282179
<!-- Links Internal -->
283180

284181
[dapr-component-connection]: ./dapr-component-connection.md
285182
[dapr-keda]: ./dapr-keda-scaling.md
286183
[aca-managed-id]: ./managed-identity.md
287184
[dapr-resiliency]: ./dapr-component-resiliency.md
185+
[dapr-components-connect-services]: ./dapr-component-connect-services.md
288186

289187
<!-- Links External -->
290188

articles/container-apps/enable-dapr.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
2-
title: Enable Dapr on your container app
2+
title: Enable Dapr on an existing container app
33
description: Learn more about enabling Dapr on your Azure Container App service to develop applications.
44
ms.author: hannahhunter
55
author: hhunter-ms
66
ms.service: azure-container-apps
77
ms.custom: build-2023, devx-track-bicep
88
ms.topic: conceptual
9-
ms.date: 12/18/2023
9+
ms.date: 11/25/2024
1010
---
1111

12-
# Enable Dapr on your container app
12+
# Enable Dapr on an existing container app
1313

1414
You can configure Dapr using various [arguments and annotations][dapr-args] based on the runtime context. Azure Container Apps provides three channels through which you can enable Dapr:
1515

0 commit comments

Comments
 (0)