【发布时间】: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"
}
}
]
},
【问题讨论】:
-
为什么你有两个
resources块?第二块似乎不正确 -
VSCode ARM 插件中的自动完成提示嵌套格式
-
我没有看到
resources在这里阻止 docs.microsoft.com/en-us/azure/templates/microsoft.sql/…
标签: azure arm-template