Skip to content

Commit e6b5229

Browse files
authored
Remove networkAcls for storage account if in development (#396)
1 parent cd4a1c7 commit e6b5229

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

infra/core/storage/storage-account.bicep

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ import { PrivateEndpointSettings } from '../../types/PrivateEndpointSettings.bic
1212
import { DiagnosticSettings } from '../../types/DiagnosticSettings.bicep'
1313
import { ApplicationIdentity } from '../../types/ApplicationIdentity.bicep'
1414

15-
type FirewallRules = {
16-
@description('The list of IP address CIDR blocks to allow access from.')
17-
allowedIpAddresses: string[]
18-
}
19-
2015
// ========================================================================
2116
// PARAMETERS
2217
// ========================================================================
@@ -73,9 +68,6 @@ param sku object = { name: 'Standard_LRS' }
7368
@description('Determines whether or not trusted azure services are allowed to connect to this account')
7469
param bypass string = 'AzureServices'
7570

76-
@description('The firewall rules to install on the sql-server.')
77-
param firewallRules FirewallRules?
78-
7971
// ========================================================================
8072
// VARIABLES
8173
// ========================================================================
@@ -91,11 +83,6 @@ var storageBlobDataContributorRoleId = 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'
9183
var defaultToOAuthAuthentication = false
9284
var dnsEndpointType = 'Standard'
9385

94-
95-
var allowedCidrBlocks = firewallRules != null ? map(firewallRules!.allowedIpAddresses, ipaddr => {
96-
value: ipaddr
97-
}) : []
98-
9986
// ========================================================================
10087
// AZURE RESOURCES
10188
// ========================================================================
@@ -115,13 +102,9 @@ resource storage 'Microsoft.Storage/storageAccounts@2022-05-01' = {
115102
dnsEndpointType: dnsEndpointType
116103
minimumTlsVersion: minimumTlsVersion
117104
publicNetworkAccess: enablePublicNetworkAccess ? 'Enabled' : 'Disabled'
118-
networkAcls: enablePublicNetworkAccess ? {
105+
networkAcls: enablePublicNetworkAccess ? null : {
119106
bypass: bypass
120107
defaultAction: 'Deny'
121-
ipRules: allowedCidrBlocks
122-
} : {
123-
defaultAction:'Deny'
124-
bypass: bypass
125108
}
126109
}
127110
}

infra/modules/application-resources.bicep

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,6 @@ module storageAccount '../core/storage/storage-account.bicep' = {
443443
resourceGroupName: resourceNames.spokeResourceGroup
444444
subnetId: subnets[resourceNames.spokePrivateEndpointSubnet].id
445445
} : null
446-
447-
firewallRules: clientIpAddress != '' ? { allowedIpAddresses: [clientIpAddress]} : null
448446
}
449447
}
450448

0 commit comments

Comments
 (0)