|
1 | | -# Bicep Deployment of ACA + Private Endpoint + Azure Front Door |
2 | | - |
3 | | -These Bicep files automate the process outlined in these two articles: |
4 | | - |
5 | | -* [Create a private link to an Azure Container App with Azure Front Door](https://learn.microsoft.com/en-us/azure/container-apps/how-to-integrate-with-azure-front-door) |
6 | | -* [Use a private endpoint with an Azure Container Apps environment](https://learn.microsoft.com/en-us/azure/container-apps/how-to-use-private-endpoint?pivots=azure-cli) |
7 | | - |
8 | | - |
9 | | -# Usage |
10 | | - |
11 | | -## Deployment |
12 | | - |
13 | | -1. Define some variables: |
14 | | - |
15 | | -```bash |
16 | | -export RESOURCE_GROUP="my-resource-group" |
17 | | -export LOCATION="centralus" |
18 | | -``` |
19 | | - |
20 | | - |
21 | | -2. Create a resource group of your choosing: |
22 | | - |
23 | | -```bash |
24 | | -az group create --location $LOCATION --name $RESOURCE_GROUP |
25 | | -``` |
26 | | - |
27 | | - |
28 | | -3. Deploy the Bicep |
29 | | -If you want to change any of the names for any of the deployed resources please edit the top of `main-mgd-net.bicep`. After you're satisfied we start the deployment. |
30 | | - |
31 | | -```bash |
32 | | -az deployment group create --resource-group $RESOURCE_GROUP --template-file main-mgd-net.bicep |
33 | | -``` |
34 | | - |
35 | | - |
36 | | -## Approving the Connection |
37 | | - |
38 | | -As the last step you have to approve the private endpoint from AFD into ACA. This can be done by following first [listing your private endpoint](https://learn.microsoft.com/en-us/azure/container-apps/how-to-integrate-with-azure-front-door#list-private-endpoint-connections) connections, and then [approving them](https://learn.microsoft.com/en-us/azure/container-apps/how-to-integrate-with-azure-front-door#approve-the-private-endpoint-connection). |
39 | | - |
40 | | -```bash |
41 | | -export ENVIRONMENT_NAME=mycontainerappenv # Assuming names are kept as they are in the Bicep file |
42 | | - |
43 | | -az network private-endpoint-connection list \ |
44 | | - --name $ENVIRONMENT_NAME \ |
45 | | - --resource-group $RESOURCE_GROUP \ |
46 | | - --type Microsoft.App/managedEnvironments |
47 | | - |
48 | | -# Record the private endpoint connection resource ID from the response. Don't confuse this with the private endpoint ID. Replace the <PLACEHOLDER> with the private endpoint connection resource ID. |
49 | | -az network private-endpoint-connection approve --id <PRIVATE_ENDPOINT_CONNECTION_RESOURCE_ID> |
50 | | -``` |
51 | | - |
52 | | - |
53 | | -# NOTES |
54 | | - |
55 | | -* Not all warnings have been eliminated in this Bicep |
56 | | -* The connection approval is still manual, PRs welcome |
| 1 | +# Bicep Deployment of ACA + Private Endpoint + Azure Front Door |
| 2 | + |
| 3 | +These Bicep files automate the process outlined in these two articles: |
| 4 | + |
| 5 | +* [Create a private link to an Azure Container App with Azure Front Door](https://learn.microsoft.com/en-us/azure/container-apps/how-to-integrate-with-azure-front-door) |
| 6 | +* [Use a private endpoint with an Azure Container Apps environment](https://learn.microsoft.com/en-us/azure/container-apps/how-to-use-private-endpoint?pivots=azure-cli) |
| 7 | + |
| 8 | +# Usage |
| 9 | + |
| 10 | +## Deployment |
| 11 | + |
| 12 | +1. Define some variables: |
| 13 | + |
| 14 | +```bash |
| 15 | +export RESOURCE_GROUP="my-resource-group" |
| 16 | +export LOCATION="centralus" |
| 17 | +``` |
| 18 | + |
| 19 | +1. Create a Resource Group: |
| 20 | + |
| 21 | +```bash |
| 22 | +az group create --location $LOCATION --name $RESOURCE_GROUP |
| 23 | +``` |
| 24 | + |
| 25 | +1. Deploy the Bicep Template |
| 26 | +If you want to change the name of any of the deployed resources, please edit the top of `main-mgd-net.bicep`. After you're satisfied, start the deployment. |
| 27 | + |
| 28 | +```bash |
| 29 | +az deployment group create --resource-group $RESOURCE_GROUP --template-file main-mgd-net.bicep |
| 30 | +``` |
0 commit comments