Skip to content

[AVM Module Issue]: avm/ptn/lz/sub-vending Custom RBAC Configuration #4965

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

Open
1 task done
ChrisSidebotham opened this issue Apr 1, 2025 · 13 comments · May be fixed by #4967
Open
1 task done

[AVM Module Issue]: avm/ptn/lz/sub-vending Custom RBAC Configuration #4965

ChrisSidebotham opened this issue Apr 1, 2025 · 13 comments · May be fixed by #4967
Assignees
Labels
Class: Pattern Module 📦 This is a pattern module Status: In PR 👉 This is when an issue is due to be fixed in an open PR Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Type: Feature Request ➕ New feature or request

Comments

@ChrisSidebotham
Copy link
Contributor

Check for previous/existing GitHub issues

  • I have checked for previous/existing GitHub issues

Issue Type?

Feature Request

Module Name

avm/ptn/lz/sub-vending

(Optional) Module Version

0.3

Description

Scenario: Many of our Customers work sensitive environments in which giving tenant root permissions is not acceptable. To overcome this the default Management Group for new subscription is changed in the Azure Tenant Settings. Customers spin up a 'commissioning' management group on the same level as the intermediate root and use this as the target management group for the new subscriptions, this prevents permissions being needed at the tenant root group and means that SCF & SCF Policies (These are deployed by Microsoft Employees in projects with complex customer) are compliant.

Issue: When creating a subscription in complex environments, not all custom roles will be assignable at the scope the subscription is created (Commissioning MG as above or Tenant Root). Therefore deployments will fail if you want to target a custom role

Possible Fix: Enable a customRolesAssignment block to take action after the subscription has been moved to the landing zone. Therefore, enabling and expediting the process of ownership for application teams that are using the Landing Zones.

(Optional) Correlation Id

No response

@ChrisSidebotham ChrisSidebotham added Needs: Triage 🔍 Maintainers need to triage still Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue labels Apr 1, 2025
@github-project-automation github-project-automation bot moved this to Needs: Triage in AVM - Module Issues Apr 1, 2025
@avm-team-linter avm-team-linter bot added the Class: Pattern Module 📦 This is a pattern module label Apr 1, 2025
Copy link

@ChrisSidebotham, thanks for submitting this issue for the avm/ptn/lz/sub-vending module!

Important

A member of the @Azure/avm-ptn-lz-subvending-module-owners-bicep or @Azure/avm-ptn-lz-subvending-module-contributors-bicep team will review it soon!

@jtracey93
Copy link
Contributor

Hey @ChrisSidebotham thanks for the issue. Its an interesting one and one that im wondering will actually fail pre-flight checks. Have you been able to test a customized version of this module with a customer?

@jtracey93 jtracey93 added the Needs: Author Feedback 👂 Awaiting feedback from the issue/PR author label Apr 1, 2025
@ChrisSidebotham
Copy link
Contributor Author

In a way yes, we currently do 2 calls of the sub vending module in the same main.bicep, first call configure the new subscription, move and resources etc. The second utilises the existingSubscriptionId input with an output from the first call, but the second call is only used to configure RBAC for the custom roles

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 Reply has been added to issue, maintainer to review and removed Needs: Author Feedback 👂 Awaiting feedback from the issue/PR author labels Apr 1, 2025
@jtracey93
Copy link
Contributor

Cool, that would work and pass a pre-flight. Have you been able to test it as one module call as you proposed in the issue?

#RR

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Author Feedback 👂 Awaiting feedback from the issue/PR author label Apr 1, 2025
@ChrisSidebotham
Copy link
Contributor Author

Yes, initally we had a customRoleAssignments block, which was being called separately to roleAssignments like how pimRoleAssignments are configured. However as we are not 'inner sourcing' patterns we couldn't continue with this approach

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs: Author Feedback 👂 Awaiting feedback from the issue/PR author label Apr 1, 2025
@jtracey93
Copy link
Contributor

jtracey93 commented Apr 1, 2025

So it did work in a single module call just with the ordering set in the module correctly?

Are you willing to put a PR in for this?

#RR

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Author Feedback 👂 Awaiting feedback from the issue/PR author label Apr 1, 2025
@ChrisSidebotham
Copy link
Contributor Author

@jtracey93 / @sebassem - I am working on the PR for this, we have two options and I would like to run it past you, As this is only effected for Subscription level custom role assignments, we either:

Option 1: Add additional parameter for customRoleAssignments which only runs at subscription level (all other levels can be handled if needed but this would duplicate the behaviour of the roleAssignments param. The new param would inherit the roleAssignmentType

Option 2: add a boolean value to the current type for roleAssignmentType to declare if it is a custom role or not, if it is then another filter and resource deployment would be added to deploy the role assignment after the subscription move takes place.

If we can decide this today I can get it in and working by the evening.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs: Author Feedback 👂 Awaiting feedback from the issue/PR author label Apr 2, 2025
@sebassem
Copy link
Contributor

sebassem commented Apr 3, 2025

@jtracey93 / @sebassem - I am working on the PR for this, we have two options and I would like to run it past you, As this is only effected for Subscription level custom role assignments, we either:

Option 1: Add additional parameter for customRoleAssignments which only runs at subscription level (all other levels can be handled if needed but this would duplicate the behaviour of the roleAssignments param. The new param would inherit the roleAssignmentType

Option 2: add a boolean value to the current type for roleAssignmentType to declare if it is a custom role or not, if it is then another filter and resource deployment would be added to deploy the role assignment after the subscription move takes place.

If we can decide this today I can get it in and working by the evening.

I'm leaning towards option 2 , but we need to make it clear in the description on what that does and maybe add a test to show an example

@jtracey93
Copy link
Contributor

im happy with option 2 also @ChrisSidebotham

@ChrisSidebotham
Copy link
Contributor Author

Cool Option 2 is in the PR - I am just having some issues with the creation of a custom role :D

@github-project-automation github-project-automation bot moved this from Needs: Triage to Done in AVM - Module Issues Apr 4, 2025

Warning

Tagging the AVM Core Team (@Azure/avm-core-team-technical-bicep) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly.

Tip

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage 🔍" label must be removed as part of the triage process (when the issue is first responded to)!

@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: Response Overdue 🚩 When an issue/PR has not been responded to for X amount of days label Apr 9, 2025

Warning

Tagging the AVM Core Team (@Azure/avm-core-team-technical-bicep) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly.

Tip

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage 🔍" label must be removed as part of the triage process (when the issue is first responded to)!

Caution

**This issue requires the AVM Core Team's (@Azure/avm-core-team-technical-bicep) immediate attention as it hasn't been responded to within 6 business days. **

Tip

  • To avoid this rule being (re)triggered, the "Needs: Triage 🔍" and "Status: Response Overdue 🚩" labels must be removed when the issue is first responded to!
  • Remove the "Needs: Immediate Attention ‼️" label once the issue has been responded to.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Immediate Attention ‼️ Immediate attention of module owner / AVM team is needed label Apr 15, 2025
@ChrisSidebotham ChrisSidebotham added Status: In PR 👉 This is when an issue is due to be fixed in an open PR and removed Needs: Triage 🔍 Maintainers need to triage still Needs: Attention 👋 Reply has been added to issue, maintainer to review Needs: Immediate Attention ‼️ Immediate attention of module owner / AVM team is needed Status: Response Overdue 🚩 When an issue/PR has not been responded to for X amount of days labels Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Class: Pattern Module 📦 This is a pattern module Status: In PR 👉 This is when an issue is due to be fixed in an open PR Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Type: Feature Request ➕ New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

3 participants