You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> 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).
25
25
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.
29
29
30
30
| Setting | Value |
31
31
|--|--|
32
32
| Name | Enter **my-custom-vnet**. |
33
33
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:
36
36
37
37
| Setting | Value |
38
38
|---|---|
39
39
| Subnet Name | Enter **infrastructure-subnet**. |
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.
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.
149
146
150
147
# [Bash](#tab/bash)
151
148
@@ -167,7 +164,7 @@ $vnet | Set-AzVirtualNetwork
167
164
168
165
---
169
166
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.
Finally, create the Container Apps environment with the VNET and subnet.
183
+
Finally, create the Container Apps environment using the custom VNet.
187
184
188
185
# [Bash](#tab/bash)
189
186
@@ -196,23 +193,21 @@ az containerapp env create \
196
193
--internal-only
197
194
```
198
195
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`.
200
197
201
198
| Parameter | Description |
202
199
|---|---|
203
200
|`name`| Name of the Container Apps environment. |
204
201
|`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. |
206
203
|`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. |
208
205
|`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.) |
212
207
213
208
# [Azure PowerShell](#tab/azure-powershell)
214
209
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.
@@ -249,13 +244,11 @@ The following table describes the parameters used in for `New-AzContainerAppMana
249
244
|---|---|
250
245
|`EnvName`| Name of the Container Apps environment. |
251
246
|`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. |
253
248
|`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. |
255
250
|`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.) |
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.
354
347
355
348
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.
356
349
@@ -362,9 +355,9 @@ You must either provide values for all three of these properties, or none of the
362
355
|`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`. |
363
356
|`docker-bridge-cidr`| The address range assigned to the Docker bridge network. This range must have a size between `/28` and `/12`. |
364
357
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.
366
359
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.
368
361
369
362
# [Azure PowerShell](#tab/azure-powershell)
370
363
@@ -374,17 +367,17 @@ You must either provide values for all three of these properties, or none of the
374
367
|`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`. |
375
368
|`VnetConfigurationDockerBridgeCidr`| The address range assigned to the Docker bridge network. This range must have a size between `/28` and `/12`. |
376
369
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.
378
371
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.
380
373
381
374
---
382
375
383
376
::: zone-end
384
377
385
378
## Clean up resources
386
379
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.
0 commit comments