I've been working with Microsoft.DBforPostgreSQL/servers
resource and Azure Bicep specifically using
I thought publicNetworkAccess: 'Enabled'
should do the trick, but it's not. Any thoughts / recommendations?
Thanks.
CodePudding user response:
The Allow access to Azure services
setting can be scripted using a firewall rule for IP 0.0.0.0
:
param serverName string
resource server 'Microsoft.DBforPostgreSQL/servers@2017-12-01' existing = {
name: serverName
}
resource allowAllWindowsAzureIps 'Microsoft.DBforPostgreSQL/servers/firewallRules@2017-12-01' = {
name: 'AllowAllWindowsAzureIps' // don't change the name
parent: server
properties: {
endIpAddress: '0.0.0.0'
startIpAddress: '0.0.0.0'
}
}