Skip to content

Commit 68ee68a

Browse files
updates from engineering review
1 parent 7b13605 commit 68ee68a

File tree

2 files changed

+50
-38
lines changed

2 files changed

+50
-38
lines changed

articles/container-apps/rule-based-routing-custom-domain.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ author: craigshoemaker
66
ms.service: azure-container-apps
77
ms.custom: devx-track-azurecli, devx-track-bicep
88
ms.topic: how-to
9-
ms.date: 04/15/2025
9+
ms.date: 04/16/2025
1010
ms.author: cshoe
11-
zone_pivot_groups: azure-cli-bicep
1211
---
1312

1413
# Use a custom domain with rule-based routing in Azure Container Apps (preview)
@@ -44,7 +43,7 @@ rules:
4443
action:
4544
prefixRewrite: "/"
4645
targets:
47-
- containerApp: "<CONTAINER_APP_NAME>"
46+
- containerApp: "<APP1_CONTAINER_APP_NAME>"
4847
- description: "Routing to App2"
4948
routes:
5049
- match:
@@ -54,20 +53,20 @@ rules:
5453
- match:
5554
prefix: "/"
5655
targets:
57-
- containerApp: "<CONTAINER_APP_NAME>"
56+
- containerApp: "<APP2_CONTAINER_APP_NAME>"
5857
```
5958
60-
This YAML configuration defines two routing rules for HTTP traffic.
59+
This configuration defines two routing rules for HTTP traffic.
6160
6261
| Property | Description |
6362
|---|---|
6463
| `customDomains.name` | The domain name you want to use (example: "app.contoso.com") |
6564
| `customDomains.certificateId` | Resource ID of your certificate (not needed with `bindingType: "Auto"`) |
6665
| `customDomains.bindingType` | How SSL is handled: "SniEnabled" (Server Name Indication), "Disabled" (HTTP only), or "Auto" (automatic certificate) |
6766
| `description` | Human-readable label for the rule |
68-
| `routes.match.prefix` | URL path prefix to match (example: "/api") |
69-
| `routes.action.prefixRewrite` | What to replace the matched prefix with before forwarding |
70-
| `targets.containerApp` | The name of the container app to route matching requests to |
67+
| `routes.match.prefix` | URL path prefix to match. For example, `/api`. |
68+
| `routes.action.prefixRewrite` | What to replace the matched prefix with before forwarding. |
69+
| `targets.containerApp` | The name of the container app where matching route request are sent. |
7170

7271
These rules allow different paths on your custom domain to route to different container apps while also modifying the request path before it reaches the destination app.
7372

articles/container-apps/rule-based-routing.md

Lines changed: 43 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: craigshoemaker
66
ms.service: azure-container-apps
77
ms.custom: devx-track-azurecli, devx-track-bicep
88
ms.topic: tutorial
9-
ms.date: 04/15/2025
9+
ms.date: 04/16/2025
1010
ms.author: cshoe
1111
zone_pivot_groups: azure-cli-bicep
1212
---
@@ -30,44 +30,44 @@ In this article, you learn how to use rule-based routing with Azure Container Ap
3030

3131
## Setup
3232

33-
To sign in to Azure from the CLI, run the following command and follow the prompts to complete the authentication process.
33+
1. Run the following command so sign in to Azure from the CLI.
3434

35-
```azurecli
36-
az login
37-
```
35+
```azurecli
36+
az login
37+
```
3838
39-
To ensure you're running the latest version of the CLI, run the upgrade command.
39+
1. To ensure you're running the latest version of the CLI, run the upgrade command.
4040
41-
```azurecli
42-
az upgrade
43-
```
41+
```azurecli
42+
az upgrade
43+
```
4444
45-
Ignore any warnings about modules currently in use.
45+
Ignore any warnings about modules currently in use.
4646
47-
Install or update the Azure Container Apps extension for the CLI.
47+
Install or update the Azure Container Apps extension for the CLI.
4848
49-
If you receive errors about missing parameters when you run `az containerapp` commands in Azure CLI or cmdlets from the `Az.App` module in PowerShell, be sure you have the latest version of the Azure Container Apps extension installed.
49+
If you receive errors about missing parameters when you run `az containerapp` commands in Azure CLI or cmdlets from the `Az.App` module in PowerShell, be sure you have the latest version of the Azure Container Apps extension installed.
5050
51-
```azurecli
52-
az extension add --name containerapp --upgrade
53-
```
51+
```azurecli
52+
az extension add --name containerapp --upgrade
53+
```
5454
55-
> [!NOTE]
56-
> Starting in May 2024, Azure CLI extensions no longer enable preview features by default. To access Container Apps [preview features](whats-new.md), install the Container Apps extension with `--allow-preview true`.
57-
>
58-
> ```azurecli
59-
> az extension add --name containerapp --upgrade --allow-preview true
60-
> ```
55+
> [!NOTE]
56+
> Starting in May 2024, Azure CLI extensions no longer enable preview features by default. To access Container Apps [preview features](whats-new.md), install the Container Apps extension with `--allow-preview true`.
57+
>
58+
> ```azurecli
59+
> az extension add --name containerapp --upgrade --allow-preview true
60+
> ```
6161
62-
Now that the current extension or module is installed, register the `Microsoft.App` and `Microsoft.OperationalInsights` namespaces.
62+
1. Now that the current extension or module is installed, register the `Microsoft.App` and `Microsoft.OperationalInsights` namespaces.
6363
64-
```azurecli
65-
az provider register --namespace Microsoft.App
66-
```
64+
```azurecli
65+
az provider register --namespace Microsoft.App
66+
```
6767
68-
```azurecli
69-
az provider register --namespace Microsoft.OperationalInsights
70-
```
68+
```azurecli
69+
az provider register --namespace Microsoft.OperationalInsights
70+
```
7171
7272
::: zone pivot="azure-cli"
7373
@@ -118,9 +118,9 @@ $ROUTE_CONFIG_NAME="my-route-config"
118118
--query properties.configuration.ingress.fqdn
119119
```
120120
121-
## Create HTTP route configuration
121+
1. Create HTTP route configuration.
122122
123-
1. Create the following YAML file and save it as `routing.yml`.
123+
Create the following file and save it as `routing.yml`.
124124
125125
```yaml
126126
rules:
@@ -144,6 +144,17 @@ $ROUTE_CONFIG_NAME="my-route-config"
144144
- containerApp: my-container-app-2
145145
```
146146
147+
This configuration defines two routing rules for HTTP traffic.
148+
149+
| Property | Description |
150+
|---|---|
151+
| `description` | Human-readable label for the rule |
152+
| `routes.match.prefix` | URL path prefix to match. For example, `/api`. |
153+
| `routes.action.prefixRewrite` | What to replace the matched prefix with before forwarding. |
154+
| `targets.containerApp` | The name of the container app where matching route request are sent. |
155+
156+
These rules allow different paths on your custom domain to route to different container apps while also modifying the request path before it reaches the destination app.
157+
147158
1. Run the following command to create the HTTP route configuration.
148159
149160
```azurecli
@@ -161,6 +172,8 @@ $ROUTE_CONFIG_NAME="my-route-config"
161172
162173
::: zone pivot="bicep"
163174
175+
1. Ensure both container apps already exist.
176+
164177
1. Create the following Bicep file and save it as `routing.bicep`.
165178
166179
```bicep

0 commit comments

Comments
 (0)