Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪲 Bug Report - PolicyAssignment lib generating wrong name/paths #426

Closed
JimmyKarlsson112 opened this issue Jan 4, 2023 · 3 comments · Fixed by #427
Closed

🪲 Bug Report - PolicyAssignment lib generating wrong name/paths #426

JimmyKarlsson112 opened this issue Jan 4, 2023 · 3 comments · Fixed by #427

Comments

@JimmyKarlsson112
Copy link

Describe the bug

There is two issues with Lib generation for Policy assignment.

  1. The generated lib file adds '${modManagementGroups.outputs.outTopLevelManagementGroupId} instead of '${varTopLevelManagementGroupResourceId} for definationID.
  2. The path deep is "one to few" on loadjsoncontent
    loadJsonContent('../../policy/.. should be loadJsonContent('../../../policy/..

To Reproduce

Steps to reproduce the behaviour is to check the difference between

  1. Can view the difference between _policyAssignmentsBicepInput.txt and variable section alzDefaultPolicyAssignments.bicep

Expected behaviour

Lib files generated should have the correct filename and the path should be correct

Additional context

@ghost ghost added the Needs: Triage 🔍 Needs triaging by the team label Jan 4, 2023
@jtracey93
Copy link
Collaborator

Hey @JimmyKarlsson112,

Good spot. Are you spotting this as you are adding additional policy assignments as per the guidance https://github.com/Azure/ALZ-Bicep/wiki/AssigningPolicies here?

Just trying to gauge the urgency on the bug 👍

Let me know

Thanks

Jack

@JimmyKarlsson112
Copy link
Author

Correct! Working on a brownfield scenario where we are adding customers custom policies.
As we are aware of it and can do a "manual" workaround it is not super urgent.

@ghost ghost added Needs: Attention 👋 Needs attention from the maintainers and removed Needs: Author Feedback labels Jan 5, 2023
@jtracey93
Copy link
Collaborator

jtracey93 commented Jan 5, 2023

Hey @JimmyKarlsson112,
Thanks for the info that you are able to workaround this. Related to AB#25950 - new bug we created and will include to look into in January sprint.

@jtracey93 jtracey93 removed Needs: Triage 🔍 Needs triaging by the team Needs: Attention 👋 Needs attention from the maintainers labels Jan 5, 2023
@jtracey93 jtracey93 linked a pull request Jan 20, 2023 that will close this issue
10 tasks
@ghost ghost locked as resolved and limited conversation to collaborators Feb 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants