[BUG] Export-AzPolicyAssignmentRuleData unable to export Azure policy as PSRule (The function "field" was not found) [Custom policy: Prevent cross tenant Private Link for eventgrid domains] #2732
An error occurred evaluating expression '[split(concat(field('Microsoft.EventGrid/domains/privateEndpointConnections/privateEndpoint.id'), '//'), '/')[2]]' line 57. The function "field" was not found.
Currently we need to support indexing into an array of string with a runtime token to fully complete this implementation which requires support to be added to PSRule.
Existing rule
No response
Description of the issue
Unable to export policy assignment data to PSRule.
Error messages
An error occurred evaluating expression '[split(concat(field('Microsoft.EventGrid/domains/privateEndpointConnections/privateEndpoint.id'), '//'), '/')[2]]' line 57. The function "field" was not found.
Reproduction
Exporting policy assignment data
Version of PSRule
2.9.0
Version of PSRule for Azure
1.33.2
Additional context
This bug is related to #1323