Skip to content

Test-AzResourceGroupDeployment outputs empty warning when it found no problems #27888

Closed
@o-l-a-v

Description

@o-l-a-v

Description

Seems Test-AzResourceGroupDeployment outputs an empty warning when it finds no errors.

Image

Tried with -Debug. Right after it says no errors were found the warning is outputted.

Image

Issue script & Debug output

See previous.

Environment data

Windows 11 24H2 x64
PowerShell v7.5.1 x64

Module versions

Az.Accounts v5.0.2
Az.Resources v8.0.0

Error output

Activity

added
bugThis issue requires a change to an existing behavior in the product in order to be resolved.
needs-triageThis is a new issue that needs to be triaged to the appropriate team.
on Jun 4, 2025
added
Service AttentionThis issue is responsible by Azure service team.
and removed
needs-triageThis is a new issue that needs to be triaged to the appropriate team.
on Jun 5, 2025
isra-fel

isra-fel commented on Jun 10, 2025

@isra-fel
Member

This seems to be related to empty diagnostics results. Should be suppressed by -SuppressDiagnostics.

Possible fix: add && validationInfo.Diagnostics.Count > 0 to

if (validationInfo.Errors.Count == 0 && !SuppressDiagnostics.IsPresent)

added
good first issueIssues suited for folks who want to help for the first time.
on Jun 10, 2025
self-assigned this
on Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ARM - TemplatesService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.good first issueIssues suited for folks who want to help for the first time.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @o-l-a-v@isra-fel@a0x1ab

    Issue actions

      `Test-AzResourceGroupDeployment` outputs empty warning when it found no problems · Issue #27888 · Azure/azure-powershell