I want to allow all IP's to access the SQL server.
resource "azurerm_sql_firewall_rule" "fw" {
name = "${var.db_name}-fwrules"
resource_group_name = var.resource_group_name
server_name = azurerm_sql_server.server.name
start_ip_address = var.start_ip_address
end_ip_address = var.end_ip_address
}
I have set the start_ip and end_ip to 0.0.0.0 but when I check in the Azure portal it says no firewall rule added but when I put my own IP as start_ip and end_ip, it applies the rule. How do I add all Ip's to the rule.
CodePudding user response:
If you want to allow all IP addresses through Firewall, then your start_ip_address
should be 0.0.0.0
and your end_ip_address
should be 255.255.255.255
.
When you set both start_ip_address
and end_ip_address
to 0.0.0.0
, Firewall only allows Azure services to access your database.