diff --git a/avm/utilities/pipelines/staticValidation/compliance/module.tests.ps1 b/avm/utilities/pipelines/staticValidation/compliance/module.tests.ps1 index 31a641ae18..756bce7717 100644 --- a/avm/utilities/pipelines/staticValidation/compliance/module.tests.ps1 +++ b/avm/utilities/pipelines/staticValidation/compliance/module.tests.ps1 @@ -1101,6 +1101,11 @@ Describe 'Module tests' -Tag 'Module' { } $expectedSchema = $expectedSchemaFull[$expectedSchemaStartIndex..$expectedSchemaEndIndex] + if ($templateFileContentBicep -match '@sys\.([a-zA-Z]+)\(') { + # Handing cases where the template may use the @sys namespace explicitely + $expectedSchema = $expectedSchema | ForEach-Object { $_ -replace '@([a-zA-Z]+)\(', '@sys.$1(' } + } + $formattedDiff = @() foreach ($finding in (Compare-Object $implementedSchema $expectedSchema)) { if ($finding.SideIndicator -eq '=>') {