从参数文件传入子网委托

2022-01-30 14:59:29 标签 azureazure-bicep

我试图从参数文件使用BICEP更新子网委托,但一直得到一个错误,我无法找出原因。

语言表达式属性“name”有一个无效的数组索引。

二头肌文件:

subnets: [for j in range(0, length(VNetSettings.subnets)): {

          {
            name: VNetSettings.subnets[j].delegations.name
            properties: {
              serviceName: VNetSettings.subnets[j].delegations.properties.serviceName
            }
          }
        ]

参数文件:

            "value": {
                "Name": "vnet",
                "addressPrefix": "10.230.0.0/23",
                "subnets": [
                    {
                        "name": "data",
                        "addressPrefix": "10.230.1.64/26",
                        "routeTable": "",
                        "unique": false,
                        "nsgRules": [
                            {
                                "name": "DENY-ALL-VNET-INBOUND",
                                "description": "Deny all Virtual Network traffic",
                                "priority": "4000",
                                "direction": "Inbound",
                                "access": "Deny",
                                "protocol": "*",
                                "sourcePortRange": "*",
                                "destinationPortRange": "*",
                                "sourceAddressPrefix": "VirtualNetwork",
                                "destinationAddressPrefix": "VirtualNetwork"
                            }
                        ],
                        "serviceEndpoints":[],
                        "delegations": [
                            {
                                "name": "Microsoft.Web.serverFarms",
                                "properties": {
                                    "serviceName": "Microsoft.Web/serverFarms"
                                }
                            } 
                        ]
                    },

只是不知道我哪里做错了。

阅读全文

▼ 版权说明

相关文章也很精彩
推荐内容
更多标签
相关热门
全站排行
随便看看

错说 cuoshuo.com —— 程序员的报错记录

部分内容根据CC版权协议转载;网站内容仅供参考,生产环境使用务必查阅官方文档

辽ICP备19011660号-5

×

扫码关注公众号:职场神器
发送: 1
获取永久解锁本站全部文章的验证码