Commit 07e148f
feat: add optional ACR with Private Endpoint to Bicep VNet scenarios (#519)
* feat: add optional ACR with Private Endpoint to all Bicep VNet scenarios
Add an enableContainerRegistry parameter (bool, default false) to all 8
Bicep VNet infrastructure scenarios. When enabled, creates:
- Azure Container Registry (Premium SKU, no public access, no admin user)
- Private Endpoint in the PE subnet (subresource: registry)
- Private DNS Zone (privatelink.azurecr.io) with VNet link
- DNS Zone Group for the Private Endpoint
Implemented as a shared reusable module (container-registry.bicep) in each
scenario's modules-network-secured/ directory.
Scenarios updated:
- 10-private-network-basic
- 11-private-network-basic-vnet
- 15-private-network-standard-agent-setup
- 15a-private-network-evaluation-only-setup
- 16-private-network-standard-agent-apim-setup
- 17-private-network-standard-user-assigned-identity-agent-setup
- 18-managed-virtual-network
- 19-private-network-agent-tools
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: remove ACR from scenarios without network injection (10, 18)
The optional ACR with Private Endpoint should only be available in
scenarios that have network injection (agent VNet integration), not in
PE-only or managed-network scenarios.
Removed from:
- 10-private-network-basic (PE-only, no agent subnet)
- 18-managed-virtual-network (managed network, no agent subnet injection)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: default enableContainerRegistry to true for network injection scenarios
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: add canadacentral to allowed locations in scenario 11
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: add optional developer IP CIDR allowlist for ACR push access
Adds a developerIpCidr parameter (string, default empty) to the ACR
module. When provided, enables public network access on the ACR with a
network rule that only allows the specified CIDR (e.g., /26). When empty,
public access remains fully disabled.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* docs: clarify developerIpCidr accepts any CIDR size
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: make uniqueSuffix deterministic for idempotent re-deploys (scenario 11)
Remove utcNow() from the uniqueSuffix calculation so that re-deploying
to the same resource group produces the same resource names. This makes
deployments idempotent (patch-on-existing) rather than creating new
resources on each run.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: make all VNet templates idempotent by removing utcNow from suffix
Remove deploymentTimestamp/utcNow() from uniqueSuffix calculation in all
templates. The suffix is now derived solely from resourceGroup().id,
making deployments idempotent — re-deploying to the same RG updates
existing resources in-place rather than creating duplicates.
Affected templates: 15, 15a, 16, 17, 18, 19
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: grant AcrPull role to project managed identity on ACR
Adds an AcrPull role assignment in the container-registry module so the
project's managed identity can pull images from the ACR. The principal ID
is passed from each scenario's main.bicep (system-assigned identity for
most, user-assigned for scenario 17).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: rebuild compiled JSON templates to include canadacentral
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: add canadacentral to allowed locations in scenario 19
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: add canadacentral to allowed locations in scenario 15
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Karthik Saligrama <ksaligrama@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 73df0d7 commit 07e148f
15 files changed
Lines changed: 1685 additions & 69 deletions
File tree
- infrastructure/infrastructure-setup-bicep
- 11-private-network-basic-vnet
- modules-network-secured
- 15-private-network-standard-agent-setup
- modules-network-secured
- 15a-private-network-evaluation-only-setup
- modules-network-secured
- 16-private-network-standard-agent-apim-setup
- modules-network-secured
- 17-private-network-standard-user-assigned-identity-agent-setup
- modules-network-secured
- 18-managed-virtual-network
- 19-private-network-agent-tools
- modules-network-secured
Lines changed: 300 additions & 27 deletions
Large diffs are not rendered by default.
Lines changed: 38 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | | - | |
63 | | - | |
| 63 | + | |
| 64 | + | |
64 | 65 | | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
97 | 105 | | |
98 | 106 | | |
99 | 107 | | |
| |||
103 | 111 | | |
104 | 112 | | |
105 | 113 | | |
| 114 | + | |
106 | 115 | | |
107 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
108 | 125 | | |
109 | 126 | | |
110 | 127 | | |
| |||
185 | 202 | | |
186 | 203 | | |
187 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
188 | 224 | | |
189 | 225 | | |
190 | 226 | | |
| |||
0 commit comments