Let’s say, I want to deploy a separate resource only if param isProduction bool
is true
.
Is that possible with Bicep?
I could not find this in the documentation.
There is a syntax if(isProduction)
that can be used after =
, for example:
param isProduction bool
resource prodWebApp 'Microsoft.Web/sites@2020-12-01' = if (isProduction) {
name: 'MyWebApp'
...<other props>...
}