假设,仅当 param isProduction bool
时我才想部署单独的资源
是true
。
二头肌可能做到这一点吗?
我在文档中找不到这个。
最佳答案
有一个语法if(isProduction)
可以在=
之后使用,例如:
param isProduction bool
resource prodWebApp 'Microsoft.Web/sites@2020-12-01' = if (isProduction) {
name: 'MyWebApp'
...<other props>...
}
关于azure - 如何在 ARM Bicep 模板中添加条件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67077228/