Skip to content

Commit a1fe900

Browse files
authored
Set ACLs to Deny for storage (#1765)
1 parent ef14801 commit a1fe900

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

infra/core/storage/storage-account.bicep

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ param sku object = { name: 'Standard_LRS' }
2626
@allowed([ 'None', 'AzureServices' ])
2727
param bypass string = 'AzureServices'
2828

29-
var networkAcls = {
29+
var networkAcls = (publicNetworkAccess == 'Enabled') ? {
3030
bypass: bypass
3131
defaultAction: 'Allow'
32-
}
32+
} : { defaultAction: 'Deny' }
3333

3434
resource storage 'Microsoft.Storage/storageAccounts@2022-05-01' = {
3535
name: name
@@ -67,4 +67,4 @@ resource storage 'Microsoft.Storage/storageAccounts@2022-05-01' = {
6767

6868
output id string = storage.id
6969
output name string = storage.name
70-
output primaryEndpoints object = storage.properties.primaryEndpoints
70+
output primaryEndpoints object = storage.properties.primaryEndpoints

0 commit comments

Comments
 (0)