Skip to content

Commit 50202ac

Browse files
updates
1 parent f40f0c3 commit 50202ac

File tree

2 files changed

+46
-28
lines changed

2 files changed

+46
-28
lines changed

articles/container-apps/workload-profiles-manage-cli.md

Lines changed: 43 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,15 @@ services: container-apps
55
author: craigshoemaker
66
ms.service: container-apps
77
ms.topic: how-to
8-
ms.date: 04/10/2023
8+
ms.date: 04/11/2023
99
ms.author: cshoe
1010
zone_pivot_groups: container-apps-vnet-types
1111
---
1212

13-
<!--
14-
::: zone pivot="aca-vnet-system"
15-
::: zone-end
16-
::: zone pivot="aca-vnet-custom"
17-
::: zone-end
18-
-->
19-
2013
# Manage workload profiles in a Consumption + Dedicated workload profiles plan structure (preview)
2114

15+
Learn to manage a Container Apps environment with workload profile support.
16+
2217
## Supported regions
2318

2419
The following regions support workload profiles during preview:
@@ -32,9 +27,16 @@ The following regions support workload profiles during preview:
3227

3328
## Create a container app in a profile
3429

35-
::: zone pivot="aca-vnet-system"
30+
::: zone pivot="aca-vnet-managed"
3631

37-
A system-generated VNet manages the complexity of running a virtual network for you, which means you don't have direct control over the VNet configuration. Without direction access to the configuration, you can't use [user defined routes](user-defined-routes.md). If you want to use user defined routes, you need to create a container apps environment with a [custom VNet](./workload-profiles-manage-cli.md?pivots=aca-vnet-custom).
32+
Azure Container Apps run in an environment, which uses a virtual network (VNet). By default, your Container App environment is created with a managed VNet that is automatically generated for you. Generated VNets are inaccessible to you as they're created in Microsoft's tenant.
33+
34+
Create a container apps environment with a [custom VNet](./workload-profiles-manage-cli.md?pivots=aca-vnet-custom) if you need any of the following features:
35+
36+
- [User defined routes](user-defined-routes.md)
37+
- Integration with Application Gateway
38+
- Network Security Groups
39+
- Communicating with resources behind private endpoints in your virtual network
3840

3941
::: zone-end
4042

@@ -44,11 +46,11 @@ When you create an environment with a custom VNet, you have full control over th
4446

4547
::: zone-end
4648

47-
Use the following commands to create an environment with a workload profile.
49+
Use the following commands to create an environment with workload profile support.
4850

4951
::: zone pivot="aca-vnet-custom"
5052

51-
1. Create a VNet
53+
1. Create a VNet.
5254

5355
```bash
5456
az network vnet create \
@@ -58,7 +60,7 @@ Use the following commands to create an environment with a workload profile.
5860
--name "<VNET_NAME>"
5961
```
6062

61-
1. Create a subnet
63+
1. Create a subnet delegated to `Microsoft.App/environments`.
6264

6365
```bash
6466
az network vnet subnet create \
@@ -88,8 +90,10 @@ Use the following commands to create an environment with a workload profile.
8890

8991
1. Create *Consumption + Dedicated* environment with workload profile support
9092

93+
::: zone pivot="aca-vnet-custom"
94+
9195
>[!Note]
92-
> In Container Apps, you can configure whether your Container Apps will allow public ingress or only ingress from within your VNet at the environment level. In order to restrict ingress to just your VNet, you will need to set the `--internal-only` flag.
96+
> In Container Apps, you can configure whether your Container Apps will allow public ingress or only ingress from within your VNet at the environment level. In order to restrict ingress to just your VNet, you need to set the `--internal-only` flag.
9397

9498
# [External environment](#tab/external-env)
9599

@@ -98,40 +102,37 @@ Use the following commands to create an environment with a workload profile.
98102
--enable-workload-profiles \
99103
--resource-group "<RESOURCE_GROUP>" \
100104
--name "<NAME>" \
101-
--location "<LOCATION>" \
102-
--infrastructure-subnet-resource-id "<SUBNET_ID>"
105+
--location "<LOCATION>"
103106
```
104107

105108
# [Internal environment](#tab/internal-env)
106109

107-
::: zone pivot="aca-vnet-system"
108-
109110
```bash
110111
az containerapp env create \
111112
--enable-workload-profiles \
112113
--resource-group "<RESOURCE_GROUP>" \
113114
--name "<NAME>" \
114-
--location "<LOCATION>"
115+
--location "<LOCATION>" \
116+
--infrastructure-subnet-resource-id "<SUBNET_ID>" \
117+
--internal-only true
115118
```
116119

120+
---
121+
117122
::: zone-end
118123

119-
::: zone pivot="aca-vnet-custom"
124+
::: zone pivot="aca-vnet-managed"
120125

121126
```bash
122127
az containerapp env create \
123128
--enable-workload-profiles \
124129
--resource-group "<RESOURCE_GROUP>" \
125130
--name "<NAME>" \
126-
--location "<LOCATION>" \
127-
--infrastructure-subnet-resource-id "<SUBNET_ID>"
128-
--internal-only true
131+
--location "<LOCATION>"
129132
```
130133

131134
::: zone-end
132135

133-
---
134-
135136
This command can take up to 10 minutes to complete.
136137

137138
1. Check status of environment. Here, you're looking to see if the environment is created successfully.
@@ -146,6 +147,8 @@ Use the following commands to create an environment with a workload profile.
146147
147148
1. Create a new container app.
148149
150+
# [External environment](#tab/external-env)
151+
149152
```azurecli
150153
az containerapp create \
151154
--resource-group "<RESOURCE_GROUP>" \
@@ -157,6 +160,21 @@ Use the following commands to create an environment with a workload profile.
157160
--workload-profile-name "Consumption"
158161
```
159162
163+
# [Internal environment](#tab/internal-env)
164+
165+
```azurecli
166+
az containerapp create \
167+
--resource-group "<RESOURCE_GROUP>" \
168+
--name "<CONTAINER_APP_NAME>" \
169+
--target-port 80 \
170+
--ingress internal \
171+
--image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest \
172+
--environment "<ENVIRONMENT_NAME>" \
173+
--workload-profile-name "Consumption"
174+
```
175+
176+
---
177+
160178
This command deploys the application to the built-in Consumption workload profile. If you want to create an app in a dedicated workload profile, you first need to [add the profile to the environment](#add-profiles).
161179
162180
This command creates the new application in the environment using a specific workload profile.

articles/zone-pivot-groups.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,10 +1920,10 @@ groups:
19201920
title: Virtual network
19211921
prompt: Select a virtual network configuration
19221922
pivots:
1923-
- id: aca-vnet-system
1924-
title: System generated VNet
1923+
- id: aca-vnet-managed
1924+
title: Managed
19251925
- id: aca-vnet-custom
1926-
title: Custom VNet
1926+
title: Custom
19271927
# Owner: cshoe
19281928
- id: container-apps-registry-types
19291929
title: Registry types

0 commit comments

Comments
 (0)