Closed ahsulli closed 4 months ago
We'll have to make some changes to the Export-AzPolicyResources script to enable this to work - but you are correct in why it doesn't work.
@ahsulli - Can you please test the updated Export-AzPolicyResources script in the feature/aw/issue692 branch? Let me know if this fixes the issue.
@anwather, that branch's change resolves this issue. It does not resolve issue #691. I provided code to @gregslack78 that resolves issue #691. Please let me know if you need me to create a branch and provide that code.
Describe the bug Export-AzPolicyResources results in an error when trying to get the existing policy assignments. The error message indicates that the apiVersion must be specified in the REST call. Upon further investigation, Select-PacEnvironment is never called, so the apiVersion field is not ever set on the $pacEnvironment object.
To Reproduce
Expected behavior All the existing policy assignments at or below the specified pacSelector configuration should be returned as a result of the call.
EPAC Version 10.3.5