Skip to content

Commit 780af18

Browse files
committed
Fix formatting.
1 parent 025b792 commit 780af18

File tree

1 file changed

+85
-85
lines changed

1 file changed

+85
-85
lines changed

articles/container-apps/how-to-use-private-endpoint.md

Lines changed: 85 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -156,63 +156,63 @@ An environment in Azure Container Apps creates a secure boundary around a group
156156
1. Create an Azure virtual network (VNet) to associate with the Container Apps environment. The VNet must have a subnet available for the environment deployment.
157157
You can use an existing VNet, but private endpoints are only supported by workload profiles environments, which require a subnet with a minimum CIDR range of `/27` or larger. To learn more about subnet sizing, see the [networking architecture overview](./networking.md#subnet).
158158

159-
```azurecli
160-
az network vnet create \
161-
--resource-group $RESOURCE_GROUP \
162-
--name $VNET_NAME \
163-
--location $LOCATION \
164-
--address-prefix 10.0.0.0/16
165-
```
159+
```azurecli
160+
az network vnet create \
161+
--resource-group $RESOURCE_GROUP \
162+
--name $VNET_NAME \
163+
--location $LOCATION \
164+
--address-prefix 10.0.0.0/16
165+
```
166166
167167
1. Create a subnet to associate with the VNet and to contain the private endpoint.
168168
169-
```azurecli
170-
az network vnet subnet create \
171-
--resource-group $RESOURCE_GROUP \
172-
--vnet-name $VNET_NAME \
173-
--name $SUBNET_NAME \
174-
--address-prefixes 10.0.0.0/21
175-
```
169+
```azurecli
170+
az network vnet subnet create \
171+
--resource-group $RESOURCE_GROUP \
172+
--vnet-name $VNET_NAME \
173+
--name $SUBNET_NAME \
174+
--address-prefixes 10.0.0.0/21
175+
```
176176
177177
1. Retrieve the subnet ID. You use this to create the private endpoint.
178178
179-
```azurecli
180-
SUBNET_ID=$(az network vnet subnet show \
181-
--resource-group $RESOURCE_GROUP \
182-
--vnet-name $VNET_NAME \
183-
--name $SUBNET_NAME \
184-
--query "id" \
185-
--output tsv)
186-
```
179+
```azurecli
180+
SUBNET_ID=$(az network vnet subnet show \
181+
--resource-group $RESOURCE_GROUP \
182+
--vnet-name $VNET_NAME \
183+
--name $SUBNET_NAME \
184+
--query "id" \
185+
--output tsv)
186+
```
187187
188188
## Create an environment
189189
190190
1. Create the Container Apps environment using the VNet deployed in the preceding steps. Private endpoints are only supported by workload profiles environments, which is the default type for new environments.
191191
192-
```azurecli
193-
az containerapp env create \
194-
--name $ENVIRONMENT_NAME \
195-
--resource-group $RESOURCE_GROUP \
196-
--location $LOCATION
197-
```
192+
```azurecli
193+
az containerapp env create \
194+
--name $ENVIRONMENT_NAME \
195+
--resource-group $RESOURCE_GROUP \
196+
--location $LOCATION
197+
```
198198
199199
1. Retrieve the environment ID. You use this to configure the environment.
200200
201-
```azurecli
202-
ENVIRONMENT_ID=$(az containerapp env show \
203-
--resource-group $RESOURCE_GROUP \
204-
--name $ENVIRONMENT_NAME \
205-
--query "id" \
206-
--output tsv)
207-
```
201+
```azurecli
202+
ENVIRONMENT_ID=$(az containerapp env show \
203+
--resource-group $RESOURCE_GROUP \
204+
--name $ENVIRONMENT_NAME \
205+
--query "id" \
206+
--output tsv)
207+
```
208208
209209
1. Disable public network access for the environment. This is needed to enable private endpoints.
210210
211-
```azurecli
212-
az containerapp env update \
213-
--id $ENVIRONMENT_ID \
214-
--public-network-access Disabled
215-
```
211+
```azurecli
212+
az containerapp env update \
213+
--id $ENVIRONMENT_ID \
214+
--public-network-access Disabled
215+
```
216216
217217
## Create a private endpoint
218218
@@ -233,51 +233,51 @@ az network private-endpoint create \
233233

234234
1. Retrieve the private endpoint IP address. You use this to add a DNS record to your private DNS zone.
235235

236-
```azurecli
237-
PRIVATE_ENDPOINT_IP_ADDRESS=$(az network private-endpoint show \
238-
--name $PRIVATE_ENDPOINT \
239-
--resource-group $RESOURCE_GROUP \
240-
--query 'customDnsConfigs[0].ipAddresses[0]' \
241-
--output tsv)
242-
```
236+
```azurecli
237+
PRIVATE_ENDPOINT_IP_ADDRESS=$(az network private-endpoint show \
238+
--name $PRIVATE_ENDPOINT \
239+
--resource-group $RESOURCE_GROUP \
240+
--query 'customDnsConfigs[0].ipAddresses[0]' \
241+
--output tsv)
242+
```
243243
244244
1. Retrieve the environment default domain. You use this to add a DNS record to your private DNS zone.
245245
246-
```azurecli
247-
DNS_RECORD_NAME=$(az containerapp env show \
248-
--id $ENVIRONMENT_ID \
249-
--query 'properties.defaultDomain' \
250-
--output tsv | sed 's/\..*//')
251-
```
246+
```azurecli
247+
DNS_RECORD_NAME=$(az containerapp env show \
248+
--id $ENVIRONMENT_ID \
249+
--query 'properties.defaultDomain' \
250+
--output tsv | sed 's/\..*//')
251+
```
252252
253253
1. Create a private DNS zone.
254254
255-
```azurecli
256-
az network private-dns zone create \
257-
--resource-group $RESOURCE_GROUP \
258-
--name $PRIVATE_DNS_ZONE
259-
```
255+
```azurecli
256+
az network private-dns zone create \
257+
--resource-group $RESOURCE_GROUP \
258+
--name $PRIVATE_DNS_ZONE
259+
```
260260
261261
1. Create a link between your VNet and your private DNS zone.
262262
263-
```azurecli
264-
az network private-dns link vnet create \
265-
--resource-group $RESOURCE_GROUP \
266-
--zone-name $PRIVATE_DNS_ZONE \
267-
--name $DNS_LINK \
268-
--virtual-network $VNET_NAME \
269-
--registration-enabled false
270-
```
263+
```azurecli
264+
az network private-dns link vnet create \
265+
--resource-group $RESOURCE_GROUP \
266+
--zone-name $PRIVATE_DNS_ZONE \
267+
--name $DNS_LINK \
268+
--virtual-network $VNET_NAME \
269+
--registration-enabled false
270+
```
271271
272272
1. Add a record for your private endpoint to your private DNS zone.
273273
274-
```azurecli
275-
az network private-dns record-set a add-record \
276-
--resource-group $RESOURCE_GROUP \
277-
--zone-name $PRIVATE_DNS_ZONE \
278-
--record-set-name $DNS_RECORD_NAME \
279-
--ipv4-address $PRIVATE_ENDPOINT_IP_ADDRESS
280-
```
274+
```azurecli
275+
az network private-dns record-set a add-record \
276+
--resource-group $RESOURCE_GROUP \
277+
--zone-name $PRIVATE_DNS_ZONE \
278+
--record-set-name $DNS_RECORD_NAME \
279+
--ipv4-address $PRIVATE_ENDPOINT_IP_ADDRESS
280+
```
281281
282282
## Deploy a container app
283283
@@ -404,21 +404,21 @@ The administrator password has the following requirements:
404404

405405
1. In PowerShell, run the following command. Replace the \<PLACEHOLDERS\> with your values.
406406

407-
```powershell
408-
nslookup <CONTAINER_APP_ENDPOINT>
409-
```
407+
```powershell
408+
nslookup <CONTAINER_APP_ENDPOINT>
409+
```
410410
411-
The output is similar to the following example, with your values replacing the \<PLACEHOLDERS\>.
411+
The output is similar to the following example, with your values replacing the \<PLACEHOLDERS\>.
412412
413-
```
414-
Server: UnKnown
415-
Address: 168.63.129.16
413+
```
414+
Server: UnKnown
415+
Address: 168.63.129.16
416416
417-
Non-authoritative answer:
418-
Name: <ENVIRONMENT_DEFAULT_DOMAIN>.privatelink.<LOCATION>.azurecontainerapps.io
419-
Address: 10.0.0.4
420-
Aliases: <CONTAINER_APP_ENDPOINT>
421-
```
417+
Non-authoritative answer:
418+
Name: <ENVIRONMENT_DEFAULT_DOMAIN>.privatelink.<LOCATION>.azurecontainerapps.io
419+
Address: 10.0.0.4
420+
Aliases: <CONTAINER_APP_ENDPOINT>
421+
```
422422
423423
1. Open a browser in the VM.
424424

0 commit comments

Comments
 (0)