使用Bicep模板部署Web应用网络设置时遇‘BadRequest’错误
Azure Web应用入站流量配置Bicep部署报BadRequest错误
我在配置Web应用入站流量时,想要将Public Network Access设置为「选择虚拟网络和IP地址」,同时通过单独的专用终结点模块添加专用终结点。手动修改网络配置可以正常完成,但通过流水线部署Bicep模板时触发了BadRequest错误。
当前使用的Bicep代码
resource appPlan 'Microsoft.Web/serverfarms@2022-03-01' existing = { name: appPlan } resource webApp 'Microsoft.Web/sites@2022-03-01' = { name: webAppName location: location tags: tags kind: 'app' identity: 'SystemAssigned' properties: { reserved: true serverFarmId: serverFarm.id httpsOnly: true vnetRouteAllEnabled: false publicNetworkAccess: 'Enabled' virtualNetworkSubnetId: subnetid siteConfig: { alwaysOn: true ftpsState: 'Disabled' appSettings: AppSettings } } } // Change public access to enabled with specific access resource webAppNetworkAccess 'Microsoft.Web/sites/config@2022-03-01' = { parent: webApp name: 'config' properties: { publicNetworkAccess: 'Enabled' ipSecurityRestrictions: [ { ipAddress: '10.0.0.0/19' action: 'Allow' tag: 'Default' priority: 100 name: 'subnet1' } { ipAddress: '10.0.0.1/19' action: 'Allow' tag: 'Default' priority: 110 name: 'Subnet2' } { ipAddress: 'Any' action: 'Deny' priority: 12345678 name: 'Deny all' description: 'Deny all access' } ] } }
配置状态对比
- 当前网络配置状态:

- 期望实现的网络配置状态:

内容的提问来源于stack exchange,提问作者user
相关产品推荐
相关产品推荐

