Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove networkAcls for storage account if in development #396

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions infra/core/storage/storage-account.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ param sku object = { name: 'Standard_LRS' }
@description('Determines whether or not trusted azure services are allowed to connect to this account')
param bypass string = 'AzureServices'

@description('The firewall rules to install on the sql-server.')
param firewallRules FirewallRules?
twsouthwick marked this conversation as resolved.
Show resolved Hide resolved

// ========================================================================
// VARIABLES
// ========================================================================
Expand All @@ -91,11 +88,6 @@ var storageBlobDataContributorRoleId = 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'
var defaultToOAuthAuthentication = false
var dnsEndpointType = 'Standard'


var allowedCidrBlocks = firewallRules != null ? map(firewallRules!.allowedIpAddresses, ipaddr => {
value: ipaddr
}) : []

// ========================================================================
// AZURE RESOURCES
// ========================================================================
Expand All @@ -115,13 +107,9 @@ resource storage 'Microsoft.Storage/storageAccounts@2022-05-01' = {
dnsEndpointType: dnsEndpointType
minimumTlsVersion: minimumTlsVersion
publicNetworkAccess: enablePublicNetworkAccess ? 'Enabled' : 'Disabled'
networkAcls: enablePublicNetworkAccess ? {
networkAcls: enablePublicNetworkAccess ? null : {
bypass: bypass
defaultAction: 'Deny'
ipRules: allowedCidrBlocks
} : {
defaultAction:'Deny'
bypass: bypass
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions infra/modules/application-resources.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,6 @@ module storageAccount '../core/storage/storage-account.bicep' = {
resourceGroupName: resourceNames.spokeResourceGroup
subnetId: subnets[resourceNames.spokePrivateEndpointSubnet].id
} : null

firewallRules: clientIpAddress != '' ? { allowedIpAddresses: [clientIpAddress]} : null
}
}

Expand Down
Loading