我正在尝试构建一个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.
创建路由表代码的嵌套模板如下:
{
"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
}
},
知道这是怎么回事吗?我花了一段时间搜索,我的理解是"TYPE“应该比"NAME”少一个片段,我相信它有
"name": "[variables('routeTable1')]",
"type": "Microsoft.Network/routeTables",
路由表一变量
"routeTable1": "[tolower(concat('udr-', variables('subnetName1')))]",
"routeTable2": "[tolower(concat('udr-', variables('subnetName2')))]",
谢谢
发布于 2018-10-30 21:18:54
路由表名称包含/
,因此它认为您正在尝试创建一个子资源,并要求您提供它的类型(您只提供父资源类型)。移除/27
,或用-27
或类似的东西替换它。
https://stackoverflow.com/questions/53074116
复制