Azure / PSRule.Rules.Azure

Rules to validate Azure resources and infrastructure as code (IaC) using PSRule.
https://azure.github.io/PSRule.Rules.Azure/
MIT License
389 stars 84 forks source link

False positive with Azure.Deployment.Name #2109

Closed BernieWhite closed 1 year ago

BernieWhite commented 1 year ago

Description of the issue

When expanding deployments PSRule for Azure uses the file name as the name of the deployment (for display in output) as the name of the file.

Often file paths are long and do not meet the naming requirements of Azure.Deployment.Name so the deploy fails.

Expected behaviour

Using the name of the file is helpful for display, however the rule should not flag these as an issue. We need to ignore the root deployment (which has the file name), an may need to add some attribute on to support this identification.

Module in use and version:

BenjaminEngeset commented 1 year ago

Yep, getting this issue now.

BernieWhite commented 1 year ago

I've started looking at the issue, and should hope to close this off before the next pre-release so we can confirm there isn't anything hanging around with this one.