Skip to content

fix: same-RG Foundry project resource name collisions#71

Open
anchenyi wants to merge 1 commit into
Azure-Samples:mainfrom
anchenyi:anchenyi/existing-rg
Open

fix: same-RG Foundry project resource name collisions#71
anchenyi wants to merge 1 commit into
Azure-Samples:mainfrom
anchenyi:anchenyi/existing-rg

Conversation

@anchenyi

Copy link
Copy Markdown

Purpose

Summary

  • Include the Foundry project name when generating the shared resource token.
  • Include the Foundry project name in the Azure AI User role assignment GUID seed.
  • Move the project name parameter before the resource token variable for readability.

Why

Previously, the shared resource token was generated only from the subscription ID, resource group ID, and location, with an optional salt. The role assignment GUID was generated only from the subscription ID, resource group ID, principal ID, and role definition ID.

That made collisions likely when provisioning multiple Foundry projects in the same resource group, because those inputs are identical across projects unless a separate salt is provided.

Including aiFoundryProjectName makes the generated resource names and role assignment names distinct per Foundry project while remaining stable across repeated azd provision runs for the same environment.

Validation

  • Ran bicep build infra/core/ai/ai-project.bicep --stdout
  • Ran git diff --check -- infra/core/ai/ai-project.bicep

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

@therealjohn therealjohn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@hemarina

Copy link
Copy Markdown

@vhvb1989 @JeffreyCA @tg-msft Do you have write access to this repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants