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

[AVM Question/Feedback]: managed identity/RBAC dependency loop after AVM migration #3894

Open
1 task done
sinedied opened this issue Dec 6, 2024 · 8 comments
Open
1 task done
Labels
Needs: Author Feedback 👂 Awaiting feedback from the issue/PR author Needs: Core Team 🧞 This item needs the AVM Core Team to review it Needs: Immediate Attention ‼️ Immediate attention of module owner / AVM team is needed Needs: Triage 🔍 Maintainers need to triage still Status: No Recent Activity 💤 When an issue/PR has not been modified for X amount of days Status: Response Overdue 🚩 When an issue/PR has not been responded to for X amount of days Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Type: Question/Feedback 🙋 Further information is requested or just some feedback

Comments

@sinedied
Copy link
Member

sinedied commented Dec 6, 2024

Check for previous/existing GitHub issues

  • I have checked for previous/existing GitHub issues

Description

My app create resources (ie SWA, Functions API, Cosmos DB, OpenAI), and Managed Identity/RBAC creates cross dependencies, for example:

  • Functions needs Cosmos DB endpoint as env var
  • Cosmos DB needs Functions principal ID to set up SQL roles

Before AVM I was fine, as I set up these in 3 resources:

  • Functions, with a dependency on Cosmos DB for endpoint output for app settings (env vars)
  • Cosmos DB
  • SQL Role, with a dependency on both Functions (principalId) and Cosmos DB (account name)

But migrating to AVM I'm stuck, because the SQL role can only be set up as part of Cosmos DB module and not separately (its a cosmos submodule that cannot be accessed directly, as stated in AVM FAQ).
Now I have a dependency loop that I cannot solve, using only AVM modules.

Is there an obvious way to solve this that I missed?

@sinedied sinedied added Needs: Triage 🔍 Maintainers need to triage still Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Type: Question/Feedback 🙋 Further information is requested or just some feedback labels Dec 6, 2024
@github-project-automation github-project-automation bot moved this to Needs: Triage in AVM - Issue Triage Dec 6, 2024

Important

The "Needs: Triage 🔍" label must be removed once the triage process is complete!

Tip

For additional guidance on how to triage this issue/PR, see the BRM Issue Triage documentation.

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 Dec 11, 2024
@AlexanderSehr AlexanderSehr added the Needs: Core Team 🧞 This item needs the AVM Core Team to review it label Dec 14, 2024
@AlexanderSehr
Copy link
Contributor

Hey @sinedied,
from the top of my head I'd probably advice to run the role assignment separately as you did originally in the last step using a raw RBAC deployment. It's not pretty, but I don't see how the modules could solve this issue without implementing specific code for this use case (i.e., Cosmos + Function App).
I take it the Cosmos Endpoint is not deterministic? I.e. it would not be possible to construct it and as such resolve one dependency?

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 Dec 19, 2024
@AlexanderSehr AlexanderSehr added the Needs: Author Feedback 👂 Awaiting feedback from the issue/PR author label Dec 19, 2024

Important

@sinedied, this issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

Tip

To prevent further actions to take effect, one of the following conditions must be met:

  • The author must respond in a comment within 3 days of this comment.
  • The "Status: No Recent Activity 💤" label must be removed.
  • If applicable, the "Status: Long Term ⏳" or the "Needs: Module Owner 📣" label must be added.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: No Recent Activity 💤 When an issue/PR has not been modified for X amount of days label Dec 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback 👂 Awaiting feedback from the issue/PR author Needs: Core Team 🧞 This item needs the AVM Core Team to review it Needs: Immediate Attention ‼️ Immediate attention of module owner / AVM team is needed Needs: Triage 🔍 Maintainers need to triage still Status: No Recent Activity 💤 When an issue/PR has not been modified for X amount of days Status: Response Overdue 🚩 When an issue/PR has not been responded to for X amount of days Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Type: Question/Feedback 🙋 Further information is requested or just some feedback
Projects
Status: Needs: Triage
Development

No branches or pull requests

2 participants