An expression that includes contains() seems to always returns true (at least in the repro below). See as well the correct result produced by az deployment group create --what-if ... command.
Error messages
The result of running repro steps below is incorrect - doesNotContain must be false
Existing rule
No response
Description of the issue
An expression that includes
contains()
seems to always returnstrue
(at least in the repro below). See as well the correct result produced byaz deployment group create --what-if ...
command.Error messages
The result of running repro steps below is incorrect -
doesNotContain
must befalse
Reproduction
Create bug.bicep:
Running
az deployment group create --what-if -x Ignore --subscription <SUB-ID> -g <RG-NAME> -f bug.bicep
produces the correct result:Version of PSRule
2.9.0
Version of PSRule for Azure
1.31.0
Additional context
$PSVersionTable