Nor*_*Rad 5 azure azure-resource-manager azure-rm-template azure-template
我正在尝试构建一个 ARM 模板并不断收到错误消息:
'The template resource 'udr-sub-w05-w05-w05-agw-10.10.10.32/27' for type
'Microsoft.Network/routeTables' at line '141' and column '5' has incorrect segment lengths. A nested resource type must have identical number of segments as its resource name. A root resource type must
have segment length one greater than its resource name.
Run Code Online (Sandbox Code Playgroud)
创建路由表代码的嵌套模板如下:
{
"name": "[variables('routeTable1')]",
"type": "Microsoft.Network/routeTables",
"apiVersion": "[variables('routeTableApiVersion')]",
"location": "[resourceGroup().location]",
"properties": {
"routes": [
],
"disableBgpRoutePropagation": false
}
},
{
"name": "[variables('routeTable2')]",
"type": "Microsoft.Network/routeTables",
"apiVersion": "[variables('routeTableApiVersion')]",
"location": "[resourceGroup().location]",
"properties": {
"routes": [
],
"disableBgpRoutePropagation": false
}
},
Run Code Online (Sandbox Code Playgroud)
知道这是哪里出了问题吗?我花了一些时间在谷歌上搜索,我的理解是“TYPE”应该比“NAME”少一个段,我相信它有
"name": "[variables('routeTable1')]",
"type": "Microsoft.Network/routeTables",
Run Code Online (Sandbox Code Playgroud)
路由表一变量
"routeTable1": "[tolower(concat('udr-', variables('subnetName1')))]",
"routeTable2": "[tolower(concat('udr-', variables('subnetName2')))]",
Run Code Online (Sandbox Code Playgroud)
谢谢
| 归档时间: |
|
| 查看次数: |
2584 次 |
| 最近记录: |