Open VeraBE opened 1 year ago
@VeraBE Thanks for reporting the issue.
Tags for the parent resource group or subscription are tricky we'll need to add support for this ([resourceGroup().tags[parameters('tagname')]]
).
Currently we are resolving most of the policy at rule export however we won't be able to resolve these context variables because they are associated with the resource, which is not known when the policy is converted to a rule.
Description of the issue
Tags are not handled by
Export-AzPolicyAssignmentRuleData
To Reproduce
Steps to reproduce the issue:
Run
Get-AzPolicyAssignmentDataSource | Export-AzPolicyAssignmentRuleData -Verbose
against an assignment file with this content:I cleaned up all the information that was potentially private replacing it with "..."
Error output
Module in use and version:
Captured output from
$PSVersionTable
: