在Bicep部署中,设置自定义域验证ID属性需要将其添加到Microsoft.Web/sites/config
资源中的appSettings
属性中。以下是一个示例代码:
resource appService 'Microsoft.Web/sites@2021-02-01' = {
name: 'myAppService'
location: 'eastus'
properties: {
...
}
}
resource appServiceConfig 'Microsoft.Web/sites/config@2021-02-01' = {
name: '${appService.name}/web'
properties: {
...
appSettings: {
customDomainVerificationId: '1234567890'
}
}
}
在此示例中,appServiceConfig
资源是与appService
资源相关联的资源,它包含了appSettings
属性,可以在其中设置自定义域验证ID。一旦部署完成,您可以验证自定义域并确认其已成功与AppService相关联。
上一篇:Bicep部署失败:不支持配置范围为InGuestPatch。
下一篇:Bicep更新后,代码无法运行,现在我遇到了关于变量vnetArray的错误,该变量应返回所有虚拟网络及其子网和子网ID的列表。