Skip to content

Commit f4dd444

Browse files
committed
Fix build issues.
1 parent cc1bcab commit f4dd444

File tree

2 files changed

+129
-129
lines changed

2 files changed

+129
-129
lines changed

articles/container-apps/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@
355355
- name: Enable User Defined Routes (UDR)
356356
href: user-defined-routes.md
357357
- name: Use path-based routing
358-
href: how-to-use-path-based-rousing.md
358+
href: how-to-use-path-based-routing.md
359359
- name: Securing a custom VNET with an NSG
360360
href: firewall-integration.md
361361
- name: Use a private endpoint

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

Lines changed: 128 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ az extension add --name containerapp --upgrade
5353
```
5454

5555
> [!NOTE]
56-
> Starting in May 2024, Azure CLI extensions no longer enable preview features by default. To access Container Apps [preview features](../articles/container-apps/whats-new.md), install the Container Apps extension with `--allow-preview true`.
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`.
5757
> ```azurecli
5858
> az extension add --name containerapp --upgrade --allow-preview true
5959
> ```
@@ -89,68 +89,68 @@ $ROUTE_CONFIG_NAME="my-route-config"
8989

9090
## Create container apps
9191

92-
Run the following command to create your first container app. This container app uses the Container Apps quickstart image.
93-
94-
```azurecli
95-
az containerapp up \
96-
--name $CONTAINER_APP_1_NAME \
97-
--resource-group $RESOURCE_GROUP \
98-
--location $LOCATION \
99-
--environment $ENVIRONMENT_NAME \
100-
--image $CONTAINER_APP_1_IMAGE \
101-
--target-port $CONTAINER_APP_1_TARGET_PORT \
102-
--ingress external \
103-
--query properties.configuration.ingress.fqdn
104-
```
105-
106-
Run the following command to create your second container app. This container app uses the ASP.NET quickstart image.
107-
108-
```azurecli
109-
az containerapp up \
110-
--name $CONTAINER_APP_2_NAME \
111-
--resource-group $RESOURCE_GROUP \
112-
--location $LOCATION \
113-
--environment $ENVIRONMENT_NAME \
114-
--image $CONTAINER_APP_2_IMAGE \
115-
--target-port $CONTAINER_APP_2_TARGET_PORT \
116-
--ingress external \
117-
--query properties.configuration.ingress.fqdn
92+
1. Run the following command to create your first container app. This container app uses the Container Apps quickstart image.
93+
94+
```azurecli
95+
az containerapp up \
96+
--name $CONTAINER_APP_1_NAME \
97+
--resource-group $RESOURCE_GROUP \
98+
--location $LOCATION \
99+
--environment $ENVIRONMENT_NAME \
100+
--image $CONTAINER_APP_1_IMAGE \
101+
--target-port $CONTAINER_APP_1_TARGET_PORT \
102+
--ingress external \
103+
--query properties.configuration.ingress.fqdn
104+
```
105+
106+
1. Run the following command to create your second container app. This container app uses the ASP.NET quickstart image.
107+
108+
```azurecli
109+
az containerapp up \
110+
--name $CONTAINER_APP_2_NAME \
111+
--resource-group $RESOURCE_GROUP \
112+
--location $LOCATION \
113+
--environment $ENVIRONMENT_NAME \
114+
--image $CONTAINER_APP_2_IMAGE \
115+
--target-port $CONTAINER_APP_2_TARGET_PORT \
116+
--ingress external \
117+
--query properties.configuration.ingress.fqdn
118118
```
119119

120120
## Create HTTP route configuration
121121

122122
1. Create the following YAML file and save it as `routing.yml`.
123123

124-
```yaml
125-
rules:
126-
- description: App 1 rule
127-
routes:
128-
- match:
129-
prefix: /app1
130-
action:
131-
prefixRewrite: /
132-
targets:
133-
- containerApp: my-container-app-1
134-
- description: App 2 rule
135-
routes:
136-
- match:
137-
path: /app2
138-
action:
139-
prefixRewrite: /
140-
targets:
141-
- containerApp: my-container-app-2
142-
```
124+
```yaml
125+
rules:
126+
- description: App 1 rule
127+
routes:
128+
- match:
129+
prefix: /app1
130+
action:
131+
prefixRewrite: /
132+
targets:
133+
- containerApp: my-container-app-1
134+
- description: App 2 rule
135+
routes:
136+
- match:
137+
path: /app2
138+
action:
139+
prefixRewrite: /
140+
targets:
141+
- containerApp: my-container-app-2
142+
```
143143
144144
1. Run the following command to create the HTTP route configuration.
145145
146-
```azurecli
147-
az containerapp env http-route-config create \
148-
--http-route-config-name $ROUTE_CONFIG_NAME \
149-
--resource-group $RESOURCE_GROUP \
150-
--name $ENVIRONMENT_NAME \
151-
--yaml routing.yml \
152-
--query properties.fqdn
153-
```
146+
```azurecli
147+
az containerapp env http-route-config create \
148+
--http-route-config-name $ROUTE_CONFIG_NAME \
149+
--resource-group $RESOURCE_GROUP \
150+
--name $ENVIRONMENT_NAME \
151+
--yaml routing.yml \
152+
--query properties.fqdn
153+
```
154154

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

@@ -160,89 +160,89 @@ az containerapp env http-route-config create \
160160

161161
1. Create the following Bicep file and save it as `routing.bicep`.
162162

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'
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+
}
190194
}
191-
action: {
192-
prefixRewrite: '/'
195+
]
196+
targets: [
197+
{
198+
containerApp: 'my-container-app-1'
193199
}
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'
200+
]
201+
}
202+
{
203+
description: 'App 2 rule'
204+
routes: [
205+
{
206+
match: {
207+
path: '/app2'
208+
}
209+
action: {
210+
prefixRewrite: '/'
211+
}
208212
}
209-
action: {
210-
prefixRewrite: '/'
213+
]
214+
targets: [
215+
{
216+
containerApp: 'my-container-app-2'
211217
}
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-
```
218+
]
219+
}
220+
]
221+
}
222+
}
223+
224+
output fqdn string = httpRouteConfig.properties.fqdn
225+
```
226226

227227
1. Deploy the Bicep file with the following command:
228228

229-
```azurecli
230-
az deployment group create `
231-
--name $ROUTE_CONFIG_NAME `
232-
--resource-group $RESOURCE_GROUP `
233-
--template-file routing.bicep
234-
```
229+
```azurecli
230+
az deployment group create `
231+
--name $ROUTE_CONFIG_NAME `
232+
--resource-group $RESOURCE_GROUP `
233+
--template-file routing.bicep
234+
```
235235

236236
1. In the output, find `outputs`, which contains your HTTP route configuration's fully qualified domain name (FQDN). For example:
237237

238-
```
239-
"outputs": {
240-
"fqdn": {
241-
"type": "String",
242-
"value": "my-route-config.ambitiouspebble-11ba6155.eastus.azurecontainerapps.io"
243-
}
244-
},
245-
```
238+
```
239+
"outputs": {
240+
"fqdn": {
241+
"type": "String",
242+
"value": "my-route-config.ambitiouspebble-11ba6155.eastus.azurecontainerapps.io"
243+
}
244+
},
245+
```
246246

247247
::: zone-end
248248

@@ -269,6 +269,6 @@ az group delete --name my-container-apps
269269
## Related content
270270

271271
- [Sample repository](https://github.com/Tratcher/HttpRouteConfigBicep/tree/master)
272-
- [Azure CLI reference](/cli/azure/containerapp/env/http-route-config?view=azure-cli-latest)
272+
- [Azure CLI reference](/cli/azure/containerapp/env/http-route-config)
273273
- [Bicep reference](/azure/templates/microsoft.app/2024-10-02-preview/managedenvironments/httprouteconfigs?pivots=deployment-language-bicep)
274274
- [ARM template reference](/azure/templates/microsoft.app/2024-10-02-preview/managedenvironments/httprouteconfigs?pivots=deployment-language-arm-template)

0 commit comments

Comments
 (0)