【问题标题】:ARM Template: Firewall rule is not being created for database serverARM 模板:没有为数据库服务器创建防火墙规则
【发布时间】:2022-01-22 19:08:47
【问题描述】:

我正在部署一个带有 ARM 模板的 Azure 数据库服务器,该模板包含允许所有 IP 地址的防火墙规则。部署完成没有错误,但是,当我检查门户时,似乎没有创建防火墙规则。

  "resources": {
        "name": "mydbserver",
        "type": "Microsoft.Sql/servers",
        "apiVersion": "2014-04-01",
        "location": "[resourceGroup().location]",
        "tags": {
            "displayName": "mydbserver"
        },
        "properties": {
            "administratorLogin": "[parameters('dbserverUsername')]",
            "administratorLoginPassword": "[parameters('dbserverPassword')]"
        },
        "resources": [
            {
                "type": "firewallRules",
                "apiVersion": "2014-04-01",
                "dependsOn": [
                    "[resourceId('Microsoft.Sql/servers', 'mydbserver')]"
                ],
                "location": "[resourceGroup().location]",
                "name": "AllowAllWindowsAzureIps",
                "properties": {
                    "startIpAddress": "0.0.0.0",
                    "endIpAddress": "0.0.0.0"
                }
            }
        ]
    },

Azure 门户

【问题讨论】:

标签: azure arm-template


【解决方案1】:

在门户中手动添加此规则 (AllowAllWindowsAzureIps) 会导致错误提示“此规则名称已用于‘允许 Azure 服务和资源访问此服务器’设置。”。

因此,很明显,规则名称是为以下概述的设置保留的。毕竟一切都按预期工作。

【讨论】:

    猜你喜欢
    • 2021-09-27
    • 1970-01-01
    • 2013-09-05
    • 1970-01-01
    • 2023-03-14
    • 2016-11-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多