Skip to content

Commit 8082aac

Browse files
committed
Updates.
1 parent 22bb5de commit 8082aac

File tree

2 files changed

+80
-2
lines changed

2 files changed

+80
-2
lines changed

articles/container-apps/how-to-use-path-based-routing.md

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,89 @@ az containerapp env http-route-config create \
152152
--query properties.fqdn
153153
```
154154

155-
Your HTTP route configuration fully qualified domain name (FQDN) looks like this example: `my-route-config.ambitiouspebble-11ba6155.eastus.azurecontainerapps.io`
155+
Your HTTP route configuration's fully qualified domain name (FQDN) looks like this example: `my-route-config.ambitiouspebble-11ba6155.eastus.azurecontainerapps.io`
156156

157157
::: zone-end
158158

159159
::: zone pivot="bicep"
160160

161+
1. Create the following Bicep file and save it as `routing.bicep`.
162+
163+
```bicep
164+
resource containerAppsEnvironment 'Microsoft.App/managedEnvironments@2024-10-02-preview' = {
165+
name: 'my-container-apps-env'
166+
location: 'eastus'
167+
tags: {}
168+
properties: {
169+
workloadProfiles: [
170+
{
171+
workloadProfileType: 'Consumption'
172+
name: 'Consumption'
173+
}
174+
]
175+
}
176+
}
177+
178+
resource httpRouteConfig 'Microsoft.App/managedEnvironments/httpRouteConfigs@2024-10-02-preview' = {
179+
parent: containerAppsEnvironment
180+
name: 'my-route-config'
181+
location: 'eastus'
182+
properties: {
183+
rules: [
184+
{
185+
description: 'App 1 rule'
186+
routes: [
187+
{
188+
match: {
189+
prefix: '/app1'
190+
}
191+
action: {
192+
prefixRewrite: '/'
193+
}
194+
}
195+
]
196+
targets: [
197+
{
198+
containerApp: 'my-container-app-1'
199+
}
200+
]
201+
}
202+
{
203+
description: 'App 2 rule'
204+
routes: [
205+
{
206+
match: {
207+
path: '/app2'
208+
}
209+
action: {
210+
prefixRewrite: '/'
211+
}
212+
}
213+
]
214+
targets: [
215+
{
216+
containerApp: 'my-container-app-2'
217+
}
218+
]
219+
}
220+
]
221+
}
222+
}
223+
224+
output fqdn string = httpRouteConfig.properties.fqdn
225+
```
226+
227+
1. In the output, find `outputs`, which contains your HTTP route configuration's fully qualified domain name (FQDN). For example:
228+
229+
```
230+
"outputs": {
231+
"fqdn": {
232+
"type": "String",
233+
"value": "my-route-config.ambitiouspebble-11ba6155.eastus.azurecontainerapps.io"
234+
}
235+
},
236+
```
237+
161238
::: zone-end
162239

163240
## Test HTTP route configuration
@@ -184,3 +261,4 @@ az group delete --name my-container-apps
184261

185262
- [Quickstart and samples](https://github.com/Tratcher/HttpRouteConfigBicep/tree/master)
186263
- [Azure CLI reference](/cli/azure/containerapp/env/http-route-config?view=azure-cli-latest)
264+
- [Bicep reference](/azure/templates/microsoft.app/2024-10-02-preview/managedenvironments/httprouteconfigs?pivots=deployment-language-bicep)

articles/container-apps/networking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ You can enable mTLS in the ARM template for Container Apps environments using th
389389

390390
### Path-based routing
391391

392-
392+
TODO1
393393

394394
## DNS
395395

0 commit comments

Comments
 (0)