Skip to content

Commit 75137c8

Browse files
committed
update
1 parent 596c3e1 commit 75137c8

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

articles/azure-resource-manager/bicep/deployment-script-vnet-pe.md renamed to articles/azure-resource-manager/bicep/deployment-script-vnet-private-endpoint.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,32 @@ title: Access a private virtual network from a Bicep deployment script
33
description: Learn how to run and test Bicep deployment scripts in private networks.
44
ms.custom: devx-track-bicep
55
ms.topic: how-to
6-
ms.date: 12/13/2023
6+
ms.date: 06/04/2024
77
---
88

99
# Run Bicep deployment script privately over a private endpoint
1010

11-
With the `2023-08-01` API version of the `Microsoft.Resources/deploymentScripts` resource it is possible to run deployment scripts privately in an Azure Container Instance.
11+
With the [`Microsoft.Resources/deploymentScripts`](/azure/templates/microsoft.resources/deploymentscripts?pivots=deployment-language-bicep) resource API version `2023-08-01`, you can run deployment scripts privately within an Azure Container Instance (ACI).
1212

13-
This means that the Azure Container Instance created by the deployment script resource is running in a virtual network and is assigned a private IP address. The Azure Container Instance connects to a new or existing storage account over a private endpoint.
13+
## Configure the environment
1414

15-
The `2023-08-01` API version introduces the `subnetIds` property under `containerSettings` to specify that the Azure Container Instance must be deployed in a subnet in the virtual network.
15+
In this setup, the ACI created by deployment script runs within a virtual network and obtains a private IP address. It then establishes a connection to a new or pre-existing storage account via a private endpoint. The `containerSettings/subnetIds` property specifies the ACI that must be deployed in a subnet of the virtual network.
1616

17-
:::image type="content" source="./media/deployment-script-vnet-pe/bicep-deployment-script-pe-design.png" alt-text="Screenshot of high-level architecture showing how the infrastructure is connected to run deployment scripts privately.":::
17+
:::image type="content" source="./media/deployment-script-vnet-private-endpoint/bicep-deployment-script-vnet-private-endpoint-diagram.jpg" alt-text="Screenshot of high-level architecture showing how the infrastructure is connected to run deployment scripts privately.":::
1818

19-
To run deployment scripts privately you need the following infrastructure as seen in the architecture image above:
19+
To run deployment scripts privately you need the following infrastructure as seen in the architecture diagram:
2020

2121
- Create a virtual network with two subnets:
22-
- Subnet for private endpoint
23-
- Subnet for Azure Container Instance, this subnet needs a `Microsoft.ContainerInstance/containerGroups` delegation.
22+
- A subnet for the private endpoint.
23+
- A subnet for the ACI, this subnet needs a `Microsoft.ContainerInstance/containerGroups` delegation.
2424
- Create a storage account with public network access `disabled`
2525
- Create a private endpoint configured with the `file` sub-resource on the storage account
2626
- Create a private DNS zone `privatelink.file.core.windows.net` and register the private endpoint IP address as an A record. Link the private DNS zone to the created virtual network.
27-
- Create a user-assigned managed identity with `Storage File Data Privileged Contributor` permissions on the storage account and specify it in the `identity` property in the deployment script resource. To assign the identity, see [Identity](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/deployment-script-develop#identity).
27+
- Create a user-assigned managed identity with `Storage File Data Privileged Contributor` permissions on the storage account and specify it in the `identity` property in the deployment script resource. To assign the identity, see [Identity](/azure/azure-resource-manager/bicep/deployment-script-develop#identity).
2828

29-
The Azure Container Instance is deployed implicitly by the deployment script resource.
29+
The ACI is deployed implicitly by the deployment script resource.
3030

31-
The following Bicep template shows the Bicep code needed to configure the infrastructure required for running a deployment script privately:
31+
The following Bicep file configures the infrastructure required for running a deployment script privately:
3232

3333
```bicep
3434
@maxLength(10) // Required maximum length, because the storage account has a maximum of 26 characters
@@ -193,9 +193,7 @@ resource privateDeploymentScript 'Microsoft.Resources/deploymentScripts@2023-08-
193193
}
194194
```
195195

196-
## Firewall
197-
198-
The Azure Container Instance downloads container images from the Microsoft Container Registry. If you make use of a firewall whitelist the URL [mcr.microsoft.com](http://mcr.microsoft.com) to download the image successfully. If the container image cannot be downloaded it will go into a `waiting` state and will eventually throw a timeout error.
196+
The ACI downloads container images from the Microsoft Container Registry. If you use a firewall, whitelist the URL [mcr.microsoft.com](http://mcr.microsoft.com) to download the image. Failure to download the container image will result in the ACI entering a `waiting` state, eventually leading to a timeout error.
199197

200198
## Next steps
201199

Loading

articles/azure-resource-manager/bicep/toc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,9 @@
400400
- name: Access private virtual networks
401401
displayName: deployment script
402402
href: deployment-script-vnet.md
403+
- name: Use over private Endpoint
404+
displayName: deployment script
405+
href: deployment-script-vnet-private-endpoint.md
403406
- name: Create script development environments
404407
displayName: deployment script
405408
href: deployment-script-bicep-configure-dev.md

0 commit comments

Comments
 (0)