SQL Server 防火墙规则
我想允许所有IP 访问SQL 服务器。
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
}
我已将 start_ip 和 end_ip 设置为 0.0.0.0,但是当我检查 Azure 门户时,它说没有添加防火墙规则,但是当我将自己的 IP 设置为 start_ip 和 end_ip 时,它会应用该规则。如何将所有 Ip 添加到规则中。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您希望允许所有 IP 地址通过防火墙,则
start_ip_address
应为0.0.0.0
,end_ip_address
应为255.255。 255.255。
当您将
start_ip_address
和end_ip_address
设置为0.0.0.0
时,防火墙仅允许 Azure 服务访问您的数据库。If you want to allow all IP addresses through Firewall, then your
start_ip_address
should be0.0.0.0
and yourend_ip_address
should be255.255.255.255
.When you set both
start_ip_address
andend_ip_address
to0.0.0.0
, Firewall only allows Azure services to access your database.