Skip to content

Commit 6ff10a4

Browse files
committed
[ACA] [335389] Combine vnet-custom and vnet-custom-internal.
1 parent 260daeb commit 6ff10a4

File tree

2 files changed

+67
-75
lines changed

2 files changed

+67
-75
lines changed

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

Lines changed: 33 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Integrate a virtual network with an internal Azure Container Apps environment
3-
description: Learn how to integrate a VNET to an internal Azure Container Apps environment.
3+
description: Learn how to integrate a virtual network with an internal Azure Container Apps environment.
44
services: container-apps
55
author: craigshoemaker
66
ms.service: azure-container-apps
@@ -13,36 +13,36 @@ zone_pivot_groups: azure-cli-or-portal
1313

1414
# Provide a virtual network to an internal Azure Container Apps environment
1515

16-
The following example shows you how to create a Container Apps environment in an existing virtual network.
16+
The following example shows you how to create a Container Apps environment in an existing virtual network (VNet).
1717

1818
::: zone pivot="azure-portal"
1919

2020
<!-- Create -->
2121
[!INCLUDE [container-apps-create-portal-steps.md](../../includes/container-apps-create-portal-steps.md)]
2222

2323
> [!NOTE]
24-
> You can use an existing virtual network, but a dedicated subnet with a CIDR range of `/23` or larger is required for use with Container Apps when using the Consumption only environment. When using the workload profiles environment, a `/27` or larger is required. To learn more about subnet sizing, see the [networking environment overview](./networking.md#subnet).
24+
> An existing VNet must have a dedicated subnet with a CIDR range of `/23` or larger when using the Consumption only environemnt. It must have a CIDR range of `/27` or larger when using the workload profiles environment. To learn more about subnet sizing, see the [networking architecture overview](./networking.md#subnet).
2525
26-
7. Select the **Networking** tab to create a VNET.
27-
8. Select **Yes** next to *Use your own virtual network*.
28-
9. Next to the *Virtual network* box, select the **Create new** link and enter the following value.
26+
1. Select the **Networking** tab to create a VNet.
27+
1. Select **Yes** next to *Use your own virtual network*.
28+
1. Next to the *Virtual network* box, select the **Create new** link and enter the following value.
2929

3030
| Setting | Value |
3131
|--|--|
3232
| Name | Enter **my-custom-vnet**. |
3333

34-
10. Select the **OK** button.
35-
11. Next to the *Infrastructure subnet* box, select the **Create new** link and enter the following values:
34+
1. Select the **OK** button.
35+
1. Next to the *Infrastructure subnet* box, select the **Create new** link and enter the following values:
3636

3737
| Setting | Value |
3838
|---|---|
3939
| Subnet Name | Enter **infrastructure-subnet**. |
4040
| Virtual Network Address Block | Keep the default values. |
4141
| Subnet Address Block | Keep the default values. |
4242

43-
12. Select the **OK** button.
44-
13. Under *Virtual IP*, select **Internal**.
45-
14. Select **Create**.
43+
1. Select the **OK** button.
44+
1. Under *Virtual IP*, select **Internal**.
45+
1. Select **Create**.
4646

4747
<!-- Deploy -->
4848
[!INCLUDE [container-apps-create-portal-deploy.md](../../includes/container-apps-create-portal-deploy.md)]
@@ -83,7 +83,7 @@ Register-AzResourceProvider -ProviderNamespace Microsoft.ContainerService
8383

8484
---
8585

86-
Declare a variable to hold the VNET name.
86+
Declare a variable to hold the VNet name.
8787

8888
# [Bash](#tab/bash)
8989

@@ -99,10 +99,7 @@ $VnetName = 'my-custom-vnet'
9999

100100
---
101101

102-
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 app instance.
103-
104-
> [!NOTE]
105-
> Network subnet address prefix requires a minimum CIDR range of `/23` for use with Container Apps when using the Consumption only environment. When using the Workload Profiles environment, a `/27` or larger is required. To learn more about subnet sizing, see the [networking environment overview](./networking.md#subnet).
102+
Now create a virtual network to associate with the Container Apps environment. The virtual network must have two subnets available for the container app instance.
106103

107104
# [Bash](#tab/bash)
108105

@@ -145,7 +142,7 @@ $vnet = New-AzVirtualNetwork @VnetArgs
145142

146143
---
147144

148-
When using the Workload profiles environment, you need to update the VNET to delegate the subnet to `Microsoft.App/environments`. This delegation is not applicable to the Consumption-only environment.
145+
When using the Workload profiles environment, you need to update the VNet to delegate the subnet to `Microsoft.App/environments`. This delegation is not needed for the Consumption-only environment.
149146

150147
# [Bash](#tab/bash)
151148

@@ -167,7 +164,7 @@ $vnet | Set-AzVirtualNetwork
167164

168165
---
169166

170-
With the VNET established, you can now query for the infrastructure subnet ID.
167+
With the virtual network created, you can now query for the infrastructure subnet ID.
171168

172169
# [Bash](#tab/bash)
173170

@@ -178,12 +175,12 @@ INFRASTRUCTURE_SUBNET=`az network vnet subnet show --resource-group ${RESOURCE_G
178175
# [Azure PowerShell](#tab/azure-powershell)
179176

180177
```azurepowershell-interactive
181-
$InfrastructureSubnet = (Get-AzVirtualNetworkSubnetConfig -Name $SubnetArgs.Name -VirtualNetwork $vnet).Id
178+
$InfrastructureSubnet=(Get-AzVirtualNetworkSubnetConfig -Name $SubnetArgs.Name -VirtualNetwork $vnet).Id
182179
```
183180

184181
---
185182

186-
Finally, create the Container Apps environment with the VNET and subnet.
183+
Finally, create the Container Apps environment using the custom VNet.
187184

188185
# [Bash](#tab/bash)
189186

@@ -196,23 +193,21 @@ az containerapp env create \
196193
--internal-only
197194
```
198195

199-
The following table describes the parameters used in for `containerapp env create`.
196+
The following table describes the parameters used with `containerapp env create`.
200197

201198
| Parameter | Description |
202199
|---|---|
203200
| `name` | Name of the Container Apps environment. |
204201
| `resource-group` | Name of the resource group. |
205-
| `logs-workspace-id` | (Optional) The ID of an existing the Log Analytics workspace. If omitted, a workspace is created for you. |
202+
| `logs-workspace-id` | (Optional) The ID of an existing Log Analytics workspace. If omitted, a workspace is created for you. |
206203
| `logs-workspace-key` | The Log Analytics client secret. Required if using an existing workspace. |
207-
| `location` | The Azure location where the environment is to deploy. |
204+
| `location` | The Azure location where the environment is to deploy. |
208205
| `infrastructure-subnet-resource-id` | Resource ID of a subnet for infrastructure components and user application containers. |
209-
| `internal-only` | (Optional) The environment doesn't use a public static IP, only internal IP addresses available in the custom VNET. (Requires an infrastructure subnet resource ID.) |
210-
211-
With your environment created using your custom virtual network, you can deploy container apps into the environment using the `az containerapp create` command.
206+
| `internal-only` | (Optional) The environment doesn't use a public static IP, only internal IP addresses available in the custom VNet. (Requires an infrastructure subnet resource ID.) |
212207

213208
# [Azure PowerShell](#tab/azure-powershell)
214209

215-
A Log Analytics workspace is required for the Container Apps environment. The following commands create a Log Analytics workspace and save the workspace ID and primary shared key to environment variables.
210+
A Log Analytics workspace is required for the Container Apps environment. The following commands create a Log Analytics workspace and save the workspace ID and primary shared key to environment variables.
216211

217212
```azurepowershell-interactive
218213
$WorkspaceArgs = @{
@@ -234,7 +229,7 @@ $EnvArgs = @{
234229
EnvName = $ContainerAppsEnvironment
235230
ResourceGroupName = $ResourceGroupName
236231
Location = $Location
237-
AppLogConfigurationDestination = 'log-analytics'
232+
AppLogConfigurationDestination = "log-analytics"
238233
LogAnalyticConfigurationCustomerId = $WorkspaceId
239234
LogAnalyticConfigurationSharedKey = $WorkspaceSharedKey
240235
VnetConfigurationInfrastructureSubnetId = $InfrastructureSubnet
@@ -249,13 +244,11 @@ The following table describes the parameters used in for `New-AzContainerAppMana
249244
|---|---|
250245
| `EnvName` | Name of the Container Apps environment. |
251246
| `ResourceGroupName` | Name of the resource group. |
252-
| `LogAnalyticConfigurationCustomerId` | The ID of an existing the Log Analytics workspace. |
247+
| `LogAnalyticConfigurationCustomerId` | The ID of an existing Log Analytics workspace. |
253248
| `LogAnalyticConfigurationSharedKey` | The Log Analytics client secret.|
254-
| `Location` | The Azure location where the environment is to deploy. |
249+
| `Location` | The Azure location where the environment is to deploy. |
255250
| `VnetConfigurationInfrastructureSubnetId` | Resource ID of a subnet for infrastructure components and user application containers. |
256-
| `VnetConfigurationInternal` | (Optional) The environment doesn't use a public static IP, only internal IP addresses available in the custom VNET. (Requires an infrastructure subnet resource ID.) |
257-
258-
With your environment created using your custom virtual network, you can deploy container apps into the environment.
251+
| `VnetConfigurationInternal` | (Optional) The environment doesn't use a public static IP, only internal IP addresses available in the custom VNet. (Requires an infrastructure subnet resource ID.) |
259252

260253
---
261254

@@ -350,7 +343,7 @@ New-AzPrivateDnsRecordSet @DnsRecordArgs
350343

351344
#### Networking parameters
352345

353-
There are three optional networking parameters you can choose to define when calling `containerapp env create`. Use these options when you have a peered VNET with separate address ranges. Explicitly configuring these ranges ensures the addresses used by the Container Apps environment don't conflict with other ranges in the network infrastructure.
346+
There are three optional networking parameters you can choose to define when calling `containerapp env create`. Use these options when you have a peered VNet with separate address ranges. Explicitly configuring these ranges ensures the addresses used by the Container Apps environment don't conflict with other ranges in the network infrastructure.
354347

355348
You must either provide values for all three of these properties, or none of them. If they aren’t provided, the values are generated for you.
356349

@@ -362,9 +355,9 @@ You must either provide values for all three of these properties, or none of the
362355
| `platform-reserved-dns-ip` | An IP address from the `platform-reserved-cidr` range that is used for the internal DNS server. The address can't be the first address in the range, or the network address. For example, if `platform-reserved-cidr` is set to `10.2.0.0/16`, then `platform-reserved-dns-ip` can't be `10.2.0.0` (the network address), or `10.2.0.1` (infrastructure reserves use of this IP). In this case, the first usable IP for the DNS would be `10.2.0.2`. |
363356
| `docker-bridge-cidr` | The address range assigned to the Docker bridge network. This range must have a size between `/28` and `/12`. |
364357

365-
- The `platform-reserved-cidr` and `docker-bridge-cidr` address ranges can't conflict with each other, or with the ranges of either provided subnet. Further, make sure these ranges don't conflict with any other address range in the VNET.
358+
- The `platform-reserved-cidr` and `docker-bridge-cidr` address ranges can't conflict with each other, or with the ranges of either provided subnet. Further, make sure these ranges don't conflict with any other address range in the VNet.
366359

367-
- If these properties aren’t provided, the CLI autogenerates the range values based on the address range of the VNET to avoid range conflicts.
360+
- If these properties aren’t provided, the CLI autogenerates the range values based on the address range of the VNet to avoid range conflicts.
368361

369362
# [Azure PowerShell](#tab/azure-powershell)
370363

@@ -374,17 +367,17 @@ You must either provide values for all three of these properties, or none of the
374367
| `VnetConfigurationPlatformReservedDnsIP` | An IP address from the `VnetConfigurationPlatformReservedCidr` range that is used for the internal DNS server. The address can't be the first address in the range, or the network address. For example, if `VnetConfigurationPlatformReservedCidr` is set to `10.2.0.0/16`, then `VnetConfigurationPlatformReservedDnsIP` can't be `10.2.0.0` (the network address), or `10.2.0.1` (infrastructure reserves use of this IP). In this case, the first usable IP for the DNS would be `10.2.0.2`. |
375368
| `VnetConfigurationDockerBridgeCidr` | The address range assigned to the Docker bridge network. This range must have a size between `/28` and `/12`. |
376369

377-
- The `VnetConfigurationPlatformReservedCidr` and `VnetConfigurationDockerBridgeCidr` address ranges can't conflict with each other, or with the ranges of either provided subnet. Further, make sure these ranges don't conflict with any other address range in the VNET.
370+
- The `VnetConfigurationPlatformReservedCidr` and `VnetConfigurationDockerBridgeCidr` address ranges can't conflict with each other, or with the ranges of either provided subnet. Further, make sure these ranges don't conflict with any other address range in the VNet.
378371

379-
- If these properties aren’t provided, the range values are autogenerated based on the address range of the VNET to avoid range conflicts.
372+
- If these properties aren’t provided, the range values are autogenerated based on the address range of the VNet to avoid range conflicts.
380373

381374
---
382375

383376
::: zone-end
384377

385378
## Clean up resources
386379

387-
If you're not going to continue to use this application, you can delete the Azure Container Apps instance and all the associated services by removing the **my-container-apps** resource group. Deleting this resource group removes the resource group automatically created by the Container Apps service containing the custom network components.
380+
If you're not going to continue to use this application, you can delete the **my-container-apps** resource group. This deletes the Azure Container Apps instance and all associated services. It also deletes the resource group that the Container Apps service automatically created and which contains the custom network components.
388381

389382
::: zone pivot="azure-cli"
390383

@@ -409,7 +402,7 @@ Remove-AzResourceGroup -Name $ResourceGroupName -Force
409402

410403
## Additional resources
411404

412-
- To use VNET-scope ingress, you must set up [DNS](./networking.md#dns).
405+
- To use VNet-scope ingress, you must set up [DNS](./networking.md#dns).
413406

414407
## Next steps
415408

0 commit comments

Comments
 (0)