Skip to content

Commit 5a92db1

Browse files
committed
Add App Service private endpoint for deployment
1 parent ebecb05 commit 5a92db1

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

infra/main.bicep

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,16 @@ var containerAppsPrivateEndpointConnection = (usePrivateEndpoint && deploymentTa
12061206
}
12071207
]
12081208
: []
1209+
1210+
var appServicePrivateEndpointConnection = (usePrivateEndpoint && deploymentTarget == 'appservice')
1211+
? [
1212+
{
1213+
groupId: 'sites'
1214+
dnsZoneName: 'privatelink.azurewebsites.net'
1215+
resourceIds: [backend.outputs.id]
1216+
}
1217+
]
1218+
: []
12091219
var otherPrivateEndpointConnections = (usePrivateEndpoint)
12101220
? [
12111221
{
@@ -1226,7 +1236,7 @@ var otherPrivateEndpointConnections = (usePrivateEndpoint)
12261236
]
12271237
: []
12281238

1229-
var privateEndpointConnections = concat(otherPrivateEndpointConnections, openAiPrivateEndpointConnection, cognitiveServicesPrivateEndpointConnection, containerAppsPrivateEndpointConnection)
1239+
var privateEndpointConnections = concat(otherPrivateEndpointConnections, openAiPrivateEndpointConnection, cognitiveServicesPrivateEndpointConnection, containerAppsPrivateEndpointConnection, appServicePrivateEndpointConnection)
12301240

12311241
module privateEndpoints 'private-endpoints.bicep' = if (usePrivateEndpoint) {
12321242
name: 'privateEndpoints'

infra/network-isolation.bicep

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,17 +214,16 @@ module vnet 'br/public:avm/res/network/virtual-network:0.6.1' = {
214214
deploymentTarget == 'appservice'
215215
? [
216216
{
217-
name: 'app-int-subnet'
218-
addressPrefix: '10.0.3.0/24'
217+
name: 'app-service-subnet'
218+
addressPrefix: '10.0.9.0/24'
219219
privateEndpointNetworkPolicies: 'Enabled'
220220
privateLinkServiceNetworkPolicies: 'Enabled'
221-
// TODO: Are we sure we don't need App Service Plan/ID? Test this.
222221
delegation: 'Microsoft.Web/serverFarms'
223222
}
224223
]
225224
: [
226225
{
227-
name: 'app-int-subnet'
226+
name: 'container-apps-subnet'
228227
addressPrefix: '10.0.0.0/21'
229228
networkSecurityGroupResourceId: containerAppsNSG.outputs.resourceId
230229
delegation: 'Microsoft.App/environments'

todo.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)