Skip to content

Commit 1c684d8

Browse files
authored
Merge pull request #197741 from craigshoemaker/aca/networking-updates
[Container Apps] Networking: Remove control plane and App subnets
2 parents a045533 + 339c2b4 commit 1c684d8

File tree

3 files changed

+74
-130
lines changed

3 files changed

+74
-130
lines changed

articles/container-apps/vnet-custom-internal.md

Lines changed: 24 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ services: container-apps
55
author: craigshoemaker
66
ms.service: container-apps
77
ms.topic: how-to
8-
ms.date: 2/18/2022
8+
ms.date: 5/16/2022
99
ms.author: cshoe
1010
zone_pivot_groups: azure-cli-or-portal
1111
---
1212

13-
# Provide an virtual network to an internal Azure Container Apps (Preview) environment
13+
# Provide a virtual network to an internal Azure Container Apps (Preview) environment
1414

1515
The following example shows you how to create a Container Apps environment in an existing virtual network.
1616

1717
> [!IMPORTANT]
18-
> In order to ensure the environment deployment within your custom VNET is successful, configure your VNET with an "allow-all" configuration by default. The full list of traffic dependencies required to configure the VNET as "deny-all" is not yet available. Refer to [Known issues for public preview](https://github.com/microsoft/azure-container-apps/wiki/Known-Issues-for-public-preview) for additional details.
18+
> In order to ensure the environment deployment within your custom VNET is successful, configure your VNET with an "allow-all" configuration by default. The full list of traffic dependencies required to configure the VNET as "deny-all" is not yet available. For more information, see [Known issues for public preview](https://github.com/microsoft/azure-container-apps/wiki/Known-Issues-for-public-preview).
1919
2020
::: zone pivot="azure-portal"
2121

@@ -24,28 +24,24 @@ The following example shows you how to create a Container Apps environment in an
2424

2525
7. Select the **Networking** tab to create a VNET.
2626
8. Select **Yes** next to *Use your own virtual network*.
27-
9. Next to the *Virtual network* box, select the **Create new** link.
28-
10. Enter **my-custom-vnet** in the name box.
29-
11. Select the **OK** button.
30-
12. Next to the *Control plane subnet* box, select the **Create new** link and enter the following values:
27+
9. Next to the *Virtual network* box, select the **Create new** link and enter the following value.
3128

3229
| Setting | Value |
33-
|---|---|
34-
| Subnet name | Enter **my-control-plane-vnet**. |
35-
| Virtual Network Address Block | Keep the default values. |
36-
| Subnet Address Block | Keep the default values. |
30+
|--|--|
31+
| Name | Enter **my-custom-vnet**. |
3732

38-
13. Select the **OK** button.
39-
14. Next to the *Control plane subnet* box, select the **Create new** link and enter the following values:
33+
10. Select the **OK** button.
34+
11. Next to the *Infrastructure subnet* box, select the **Create new** link and enter the following values:
4035

4136
| Setting | Value |
4237
|---|---|
43-
| Subnet name | Enter **my-apps-vnet**. |
38+
| Subnet Name | Enter **infrastructure-subnet**. |
4439
| Virtual Network Address Block | Keep the default values. |
4540
| Subnet Address Block | Keep the default values. |
4641

47-
15. Under *Virtual IP*, select **Internal**.
48-
16. Select **Create**.
42+
12. Select the **OK** button.
43+
13. Under *Virtual IP*, select **Internal**.
44+
14. Select **Create**.
4945

5046
<!-- Deploy -->
5147
[!INCLUDE [container-apps-create-portal-deploy.md](../../includes/container-apps-create-portal-deploy.md)]
@@ -97,16 +93,8 @@ az network vnet create \
9793
az network vnet subnet create \
9894
--resource-group $RESOURCE_GROUP \
9995
--vnet-name $VNET_NAME \
100-
--name control-plane \
101-
--address-prefixes 10.0.0.0/21
102-
```
103-
104-
```azurecli
105-
az network vnet subnet create \
106-
--resource-group $RESOURCE_GROUP \
107-
--vnet-name $VNET_NAME \
108-
--name applications \
109-
--address-prefixes 10.0.8.0/21
96+
--name infrastructure \
97+
--address-prefixes 10.0.0.0/23
11098
```
11199

112100
# [PowerShell](#tab/powershell)
@@ -123,21 +111,13 @@ az network vnet create `
123111
az network vnet subnet create `
124112
--resource-group $RESOURCE_GROUP `
125113
--vnet-name $VNET_NAME `
126-
--name control-plane `
127-
--address-prefixes 10.0.0.0/21
128-
```
129-
130-
```powershell
131-
az network vnet subnet create `
132-
--resource-group $RESOURCE_GROUP `
133-
--vnet-name $VNET_NAME `
134-
--name applications `
135-
--address-prefixes 10.0.8.0/21
114+
--name infrastructure-subnet `
115+
--address-prefixes 10.0.0.0/23
136116
```
137117

138118
---
139119

140-
With the VNET established, you can now query for the VNET, control plane, and app subnet IDs.
120+
With the VNET established, you can now query for the VNET and infrastructure subnet ID.
141121

142122
# [Bash](#tab/bash)
143123

@@ -146,11 +126,7 @@ VNET_RESOURCE_ID=`az network vnet show --resource-group ${RESOURCE_GROUP} --name
146126
```
147127

148128
```bash
149-
CONTROL_PLANE_SUBNET=`az network vnet subnet show --resource-group ${RESOURCE_GROUP} --vnet-name $VNET_NAME --name control-plane --query "id" -o tsv | tr -d '[:space:]'`
150-
```
151-
152-
```bash
153-
APP_SUBNET=`az network vnet subnet show --resource-group ${RESOURCE_GROUP} --vnet-name ${VNET_NAME} --name applications --query "id" -o tsv | tr -d '[:space:]'`
129+
INFRASTRUCTURE_SUBNET=`az network vnet subnet show --resource-group ${RESOURCE_GROUP} --vnet-name $VNET_NAME --name infrastructure-subnet --query "id" -o tsv | tr -d '[:space:]'`
154130
```
155131

156132
# [PowerShell](#tab/powershell)
@@ -160,28 +136,21 @@ $VNET_RESOURCE_ID=(az network vnet show --resource-group $RESOURCE_GROUP --name
160136
```
161137

162138
```powershell
163-
$CONTROL_PLANE_SUBNET=(az network vnet subnet show --resource-group $RESOURCE_GROUP --vnet-name $VNET_NAME --name control-plane --query "id" -o tsv)
164-
```
165-
166-
```powershell
167-
$APP_SUBNET=(az network vnet subnet show --resource-group $RESOURCE_GROUP --vnet-name $VNET_NAME --name applications --query "id" -o tsv)
139+
$INFRASTRUCTURE_SUBNET=(az network vnet subnet show --resource-group $RESOURCE_GROUP --vnet-name $VNET_NAME --name infrastructure-subnet --query "id" -o tsv)
168140
```
169141

170142
---
171143

172-
Finally, create the Container Apps environment with the internal VNET and subnets.
144+
Finally, create the Container Apps environment with the VNET and subnet.
173145

174146
# [Bash](#tab/bash)
175147

176148
```azurecli
177149
az containerapp env create \
178150
--name $CONTAINERAPPS_ENVIRONMENT \
179151
--resource-group $RESOURCE_GROUP \
180-
--logs-workspace-id $LOG_ANALYTICS_WORKSPACE_CLIENT_ID \
181-
--logs-workspace-key $LOG_ANALYTICS_WORKSPACE_CLIENT_SECRET \
182152
--location "$LOCATION" \
183-
--app-subnet-resource-id $APP_SUBNET \
184-
--controlplane-subnet-resource-id $CONTROL_PLANE_SUBNET \
153+
--infrastructure-subnet-resource-id $INFRASTRUCTURE_SUBNET \
185154
--internal-only
186155
```
187156

@@ -191,11 +160,8 @@ az containerapp env create \
191160
az containerapp env create `
192161
--name $CONTAINERAPPS_ENVIRONMENT `
193162
--resource-group $RESOURCE_GROUP `
194-
--logs-workspace-id $LOG_ANALYTICS_WORKSPACE_CLIENT_ID `
195-
--logs-workspace-key $LOG_ANALYTICS_WORKSPACE_CLIENT_SECRET `
196163
--location "$LOCATION" `
197-
--app-subnet-resource-id $APP_SUBNET `
198-
--controlplane-subnet-resource-id $CONTROL_PLANE_SUBNET `
164+
--infrastructure-subnet-resource-id $INFRASTRUCTURE_SUBNET `
199165
--internal-only
200166
```
201167

@@ -213,11 +179,10 @@ The following table describes the parameters used in for `containerapp env creat
213179
| `logs-workspace-id` | The ID of the Log Analytics workspace. |
214180
| `logs-workspace-key` | The Log Analytics client secret. |
215181
| `location` | The Azure location where the environment is to deploy. |
216-
| `app-subnet-resource-id` | The resource ID of a subnet where containers are injected into the container app. This subnet must be in the same VNET as the subnet defined in `--control-plane-subnet-resource-id`. |
217-
| `controlplane-subnet-resource-id` | The resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet defined in `--app-subnet-resource-id`. |
182+
| `infrastructure-subnet-resource-id` | Resource ID of a subnet for infrastructure components and user application containers. |
218183
| `internal-only` | Optional parameter that scopes the environment to IP addresses only available the custom VNET. |
219184

220-
With your environment created with your custom-virtual network, you can create container apps into the environment using the `az containerapp create` command.
185+
With your environment created in your custom virtual network, you can deploy container apps into the environment using the `az containerapp create` command.
221186

222187
### Optional configuration
223188

articles/container-apps/vnet-custom.md

Lines changed: 26 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ services: container-apps
55
author: craigshoemaker
66
ms.service: container-apps
77
ms.topic: how-to
8-
ms.date: 2/18/2022
8+
ms.date: 05/16/2022
99
ms.author: cshoe
1010
zone_pivot_groups: azure-cli-or-portal
1111
---
1212

13-
# Provide an virtual network to an external Azure Container Apps (Preview) environment
13+
# Provide a virtual network to an external Azure Container Apps (Preview) environment
1414

1515
The following example shows you how to create a Container Apps environment in an existing virtual network.
1616

1717
> [!IMPORTANT]
18-
> In order to ensure the environment deployment within your custom VNET is successful, configure your VNET with an "allow-all" configuration by default. The full list of traffic dependencies required to configure the VNET as "deny-all" is not yet available. Refer to [Known issues for public preview](https://github.com/microsoft/azure-container-apps/wiki/Known-Issues-for-public-preview) for additional details.
18+
> In order to ensure the environment deployment within your custom VNET is successful, configure your VNET with an "allow-all" configuration by default. The full list of traffic dependencies required to configure the VNET as "deny-all" is not yet available. For more information, see [Known issues for public preview](https://github.com/microsoft/azure-container-apps/wiki/Known-Issues-for-public-preview).
1919
2020
::: zone pivot="azure-portal"
2121

@@ -24,28 +24,24 @@ The following example shows you how to create a Container Apps environment in an
2424

2525
7. Select the **Networking** tab to create a VNET.
2626
8. Select **Yes** next to *Use your own virtual network*.
27-
9. Next to the *Virtual network* box, select the **Create new** link.
28-
10. Enter **my-custom-vnet** in the name box.
29-
11. Select the **OK** button.
30-
12. Next to the *Control plane subnet* box, select the **Create new** link and enter the following values:
27+
9. Next to the *Virtual network* box, select the **Create new** link and enter the following value.
3128

3229
| Setting | Value |
33-
|---|---|
34-
| Subnet name | Enter **my-control-plane-vnet**. |
35-
| Virtual Network Address Block | Keep the default values. |
36-
| Subnet Address Block | Keep the default values. |
30+
|--|--|
31+
| Name | Enter **my-custom-vnet**. |
3732

38-
13. Select the **OK** button.
39-
14. Next to the *Control plane subnet* box, select the **Create new** link and enter the following values:
33+
10. Select the **OK** button.
34+
11. Next to the *Infrastructure subnet* box, select the **Create new** link and enter the following values:
4035

4136
| Setting | Value |
4237
|---|---|
43-
| Subnet name | Enter **my-apps-vnet**. |
38+
| Subnet Name | Enter **infrastructure-subnet**. |
4439
| Virtual Network Address Block | Keep the default values. |
4540
| Subnet Address Block | Keep the default values. |
4641

47-
15. Under *Virtual IP*, select **External**.
48-
16. Select **Create**.
42+
12. Select the **OK** button.
43+
13. Under *Virtual IP*, select **External**.
44+
14. Select **Create**.
4945

5046
<!-- Deploy -->
5147
[!INCLUDE [container-apps-create-portal-deploy.md](../../includes/container-apps-create-portal-deploy.md)]
@@ -78,10 +74,10 @@ $VNET_NAME="my-custom-vnet"
7874

7975
---
8076

81-
Now create an instance of the virtual network to associate with the Container Apps environment. The virtual network must have two subnets available for the container apps instance.
77+
Now create an Azure virtual network to associate with the Container Apps environment. The virtual network must have a subnet available for the environment deployment.
8278

8379
> [!NOTE]
84-
> You can use an existing virtual network, but two empty subnets are required to use with Container Apps.
80+
> You can use an existing virtual network, but a dedicated subnet is required for use with Container Apps.
8581
8682
# [Bash](#tab/bash)
8783

@@ -97,16 +93,8 @@ az network vnet create \
9793
az network vnet subnet create \
9894
--resource-group $RESOURCE_GROUP \
9995
--vnet-name $VNET_NAME \
100-
--name control-plane \
101-
--address-prefixes 10.0.0.0/21
102-
```
103-
104-
```azurecli
105-
az network vnet subnet create \
106-
--resource-group $RESOURCE_GROUP \
107-
--vnet-name $VNET_NAME \
108-
--name applications \
109-
--address-prefixes 10.0.8.0/21
96+
--name infrastructure-subnet \
97+
--address-prefixes 10.0.0.0/23
11098
```
11199

112100
# [PowerShell](#tab/powershell)
@@ -123,21 +111,13 @@ az network vnet create `
123111
az network vnet subnet create `
124112
--resource-group $RESOURCE_GROUP `
125113
--vnet-name $VNET_NAME `
126-
--name control-plane `
127-
--address-prefixes 10.0.0.0/21
128-
```
129-
130-
```powershell
131-
az network vnet subnet create `
132-
--resource-group $RESOURCE_GROUP `
133-
--vnet-name $VNET_NAME `
134-
--name applications `
135-
--address-prefixes 10.0.8.0/21
114+
--name infrastructure-subnet `
115+
--address-prefixes 10.0.0.0/23
136116
```
137117

138118
---
139119

140-
With the VNET established, you can now query for the VNET, control plane, and app subnet IDs.
120+
With the virtual network created, you can retrieve the IDs for both the VNET and the infrastructure subnet.
141121

142122
# [Bash](#tab/bash)
143123

@@ -146,11 +126,7 @@ VNET_RESOURCE_ID=`az network vnet show --resource-group ${RESOURCE_GROUP} --name
146126
```
147127

148128
```bash
149-
CONTROL_PLANE_SUBNET=`az network vnet subnet show --resource-group ${RESOURCE_GROUP} --vnet-name $VNET_NAME --name control-plane --query "id" -o tsv | tr -d '[:space:]'`
150-
```
151-
152-
```bash
153-
APP_SUBNET=`az network vnet subnet show --resource-group ${RESOURCE_GROUP} --vnet-name ${VNET_NAME} --name applications --query "id" -o tsv | tr -d '[:space:]'`
129+
INFRASTRUCTURE_SUBNET=`az network vnet subnet show --resource-group ${RESOURCE_GROUP} --vnet-name $VNET_NAME --name infrastructure-subnet --query "id" -o tsv | tr -d '[:space:]'`
154130
```
155131

156132
# [PowerShell](#tab/powershell)
@@ -160,16 +136,12 @@ $VNET_RESOURCE_ID=(az network vnet show --resource-group $RESOURCE_GROUP --name
160136
```
161137

162138
```powershell
163-
$CONTROL_PLANE_SUBNET=(az network vnet subnet show --resource-group $RESOURCE_GROUP --vnet-name $VNET_NAME --name control-plane --query "id" -o tsv)
164-
```
165-
166-
```powershell
167-
$APP_SUBNET=(az network vnet subnet show --resource-group $RESOURCE_GROUP --vnet-name $VNET_NAME --name applications --query "id" -o tsv)
139+
$INFRASTRUCTURE_SUBNET=(az network vnet subnet show --resource-group $RESOURCE_GROUP --vnet-name $VNET_NAME --name infrastructure-subnet --query "id" -o tsv)
168140
```
169141

170142
---
171143

172-
Finally, create the Container Apps environment with the VNET and subnets.
144+
Finally, create the Container Apps environment using the custom VNET deployed in the preceding steps.
173145

174146
# [Bash](#tab/bash)
175147

@@ -178,8 +150,7 @@ az containerapp env create \
178150
--name $CONTAINERAPPS_ENVIRONMENT \
179151
--resource-group $RESOURCE_GROUP \
180152
--location "$LOCATION" \
181-
--app-subnet-resource-id $APP_SUBNET \
182-
--controlplane-subnet-resource-id $CONTROL_PLANE_SUBNET
153+
--infrastructure-subnet-resource-id $INFRASTRUCTURE_SUBNET
183154
```
184155

185156
# [PowerShell](#tab/powershell)
@@ -189,8 +160,7 @@ az containerapp env create `
189160
--name $CONTAINERAPPS_ENVIRONMENT `
190161
--resource-group $RESOURCE_GROUP `
191162
--location "$LOCATION" `
192-
--app-subnet-resource-id $APP_SUBNET `
193-
--controlplane-subnet-resource-id $CONTROL_PLANE_SUBNET
163+
--infrastructure-subnet-resource-id $INFRASTRUCTURE_SUBNET
194164
```
195165

196166
---
@@ -205,11 +175,9 @@ The following table describes the parameters used in `containerapp env create`.
205175
| `name` | Name of the container apps environment. |
206176
| `resource-group` | Name of the resource group. |
207177
| `location` | The Azure location where the environment is to deploy. |
208-
| `app-subnet-resource-id` | The resource ID of a subnet where containers are injected into the container app. This subnet must be in the same VNET as the subnet defined in `--control-plane-subnet-resource-id`. |
209-
| `controlplane-subnet-resource-id` | The resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet defined in `--app-subnet-resource-id`. |
210-
| `internal-only` | Optional parameter that scopes the environment to IP addresses only available the custom VNET. |
178+
| `infrastructure-subnet-resource-id` | Resource ID of a subnet for infrastructure components and user application containers. |
211179

212-
With your environment created with your custom-virtual network, you can create container apps into the environment using the `az containerapp create` command.
180+
With your environment created using a custom virtual network, you can now deploy container apps using the `az containerapp create` command.
213181

214182
### Optional configuration
215183

0 commit comments

Comments
 (0)