Closed ChrisSidebotham closed 9 months ago
@ChrisSidebotham Thanks for reporting the issue.
Tracked this one down @ChrisSidebotham, code reference was very helpful thanks. This bug is a little more specific to AVM process. When different deployments create the same resource. Sub-resources (for the diagnostics settings) were not being associated correctly.
Existing rule
Azure.ServiceBus.AuditLogs
Description of the issue
Rule is not picking up configured diagnostic settings for Premium SKU Service Bus I have checked by applying all variations of accepted logging, this is for AVM module development:
Bicep to deploy:
Result in Resource (Azure):
Configured settings:
Error messages
Error: AZR-000358: ***sbnwaf001 failed Azure.ServiceBus.AuditLogs. Ensure namespaces audit diagnostic logs are enabled.
Reproduction
See AVM Module located here: https://github.com/ChrisSidebotham/bicep-registry-modules/blob/avm-res-servicebus-namespace/avm/res/service-bus/namespace/tests/e2e/waf-aligned/main.test.bicep
Version of PSRule
2.9.0
Version of PSRule for Azure
1.31.3
Additional context
No response