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
394 stars 86 forks source link

Rule annotations are null in C# library #1949

Closed VeraBE closed 1 year ago

VeraBE commented 1 year ago

Description of the issue

When running PSRule through the C# library, in Record(IResultRecord record) of the HostContext, ruleRecord.Info.Annotations is null even though the rule has annotations defined like this:

{
   "apiVersion":"github.com/microsoft/PSRule/v1",
   "kind":"Rule",
   "metadata":{
      "name":"Azure.Policy.f35b4954cba2",
      "tags":{
         "Azure.Policy/category":"App Service"
      },
      "annotations":{
         "Azure.Policy/id":"/providers/Microsoft.Authorization/policyDefinitions/5bb220d9-2698-4ee4-8404-b9c30c9df609",
         "Azure.Policy/version":"3.0.0"
      }
   },
   "spec":{
      [...]
   }
}

Module in use and version:

BernieWhite commented 1 year ago

@VeraBE This should be fixed with PSRule v2.7.0-B0070.

VeraBE commented 1 year ago

@BernieWhite it is, thank you!