From 1783978da47ae6c5d0a65aed1c447e27998ff351 Mon Sep 17 00:00:00 2001 From: jmservera <8036360+jmservera@users.noreply.github.com> Date: Fri, 26 Jul 2024 16:02:38 +0200 Subject: [PATCH] private endpoint for storage --- ocpp-server/infra/main.bicep | 11 +++++++++++ ocpp-server/infra/modules/webapp.bicep | 12 +----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ocpp-server/infra/main.bicep b/ocpp-server/infra/main.bicep index 04aefc8..89fb4d4 100644 --- a/ocpp-server/infra/main.bicep +++ b/ocpp-server/infra/main.bicep @@ -86,6 +86,17 @@ module webPrivateEndpoint './modules/privateEndpoint.bicep' = { } } +module storagePrivateEndpoint './modules/privateEndpoint.bicep' = { + name: 'webStoragePrivateEndpoint' + params: { + privateLinkResource: webApp.outputs.storageAccountId + subnetId: virtualNetwork.outputs.privateSubnetId + vnetId: virtualNetwork.outputs.vnetId + targetSubResource: 'blob' + endpointName: 'webStoragePrivate${uniqueString(resourceGroup().id)}' + } +} + module appGw './modules/appgw.bicep' = { name: 'appGwService' params: { diff --git a/ocpp-server/infra/modules/webapp.bicep b/ocpp-server/infra/modules/webapp.bicep index bf72157..bd82143 100644 --- a/ocpp-server/infra/modules/webapp.bicep +++ b/ocpp-server/infra/modules/webapp.bicep @@ -55,17 +55,6 @@ module storage 'storage.bicep' = { } } -module storagePrivateEndpoint './privateEndpoint.bicep' = { - name: 'webStoragePrivateEndpoint' - params: { - privateLinkResource: storage.outputs.storageAccountId - subnetId: subNet.id - vnetId: vNet.id - endpointName: 'webStoragePrivate${uniqueString(resourceGroup().id)}' - targetSubResource: 'blob' - } -} - resource appService 'Microsoft.Web/sites@2020-06-01' = { name: webSiteName location: location @@ -157,3 +146,4 @@ resource ipSecurityRestrictions 'Microsoft.Web/sites/config@2023-12-01' = { output webSiteName string = appService.name output appServiceId string = appService.id output storageName string = storage.outputs.storageAccountName +output storageAccountId string = storage.outputs.storageAccountId