Open tw3lveparsecs opened 2 years ago
Here's a short repro - looks like the engine treats a null variable the same as a variable not being defined:
param timeNow string = utcNow()
var foo = (timeNow == 'blah') ? {
abc: 'def'
} : null
output foo object = {
bar: foo
}
Thanks @anthony-c-martin I will remove myself, leave triage on, given you have the repro.
Can you try using nullable parameters? Here is the issue with more information on nullable parameters/variables: #6418
Bicep version Bicep CLI version 0.9.1
Describe the bug When using Bicep to deploy Azure firewall using a variable with a condition on the managementIpConfiguration property it fails with error
The template variable 'variableName' is not found.
To Reproduce
managementIpConfiguration
property.Additional context When moving the code from the variable directly to the property it works correctly.