fix: make Foundry subdomain unique to avoid global CustomDomainInUse#3
Merged
Conversation
Cognitive Services / AI Foundry account names become the customSubDomainName,
which must be globally unique across all of Azure. 'foundry-demo-github-dev'
was already taken (either by an existing or soft-deleted resource in another
subscription/tenant), causing CD to fail with CustomDomainInUse.
Appending a random suffix to baseName ('foundry-demo-qgs3j') makes the resulting
account/subdomain unique per-fork while preserving the naming convention.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates infrastructure naming defaults to reduce the chance of Azure AI Foundry/Cognitive Services customSubDomainName collisions during deployment.
Changes:
- Adds a 5-character suffix to the default
baseNamein the subscription-level Bicep template. - Updates dev, test, and prod parameter files to use the suffixed
baseName.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
infra/deploy-infra.bicep |
Updates the default infrastructure base name used when no environment parameter file overrides it. |
infra/environments/dev.parameters.json |
Updates the dev environment base name. |
infra/environments/test.parameters.json |
Updates the test environment base name. |
infra/environments/prod.parameters.json |
Updates the prod environment base name. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CD is failing on
mainwith:AI Foundry / Cognitive Services account names become the
customSubDomainName, which must be globally unique across all of Azure (not just within the subscription).foundry-demo-github-devis held by some resource not visible from this account — either active in another subscription/tenant, or soft-deleted within the last 48 hours.Fix
Append a 5-char random suffix to
baseName:foundry-demo→foundry-demo-qgs3j. The resulting Foundry account name becomesfoundry-demo-qgs3j-github-dev, which is unlikely to collide.Updated:
infra/deploy-infra.bicep(default param)infra/environments/{dev,test,prod}.parameters.jsonVerification
az bicep build infra/deploy-infra.bicepcompiles cleanlykv-fd-qgs3j-github-dev= 22 charsfoundry-demo-qgs3j-github-dev= 29 charsNotes
The docs workflow failure on the same commit is a separate, transient GitHub Actions infra glitch (codeload 404 on
actions/upload-pages-artifact@v3after only 1 retry attempt). I re-triggered it; no code fix needed.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com