microsoft / microsoft/aspire

Foundry template deployments on a resource that already exists fail

Open
#18,762 0 comments 0 reactions 0 assignees View on GitHub
area-deployment
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

Upon running a solution with a Foundry resource, which already exists in Azure, I get:

Content:
{"error":{"code":"InvalidTemplateDeployment","message":"The template deployment 'foundry' is not valid according to the validation procedure. The following resource provider(s) - 'Microsoft.CognitiveServices/accounts (2025-09-01)' reported preflight validation errors. Tracking id is '99dec1a9-1a89-4d41-80f7-7bdddbe4018b'. See inner errors for details.","details":[{"code":"UpdatingCustomDomainNotAllowed","message":"Updating or disabling sub domain is not supported."}]}}

This happens on deploy too, but since I don't need to change the Foundry as it's already in use, this is tolerable. Run mode however doesn't work, as everything else is dependent on the Foundry.

I haven't changed anything on this Foundry at the management plane level, and definitely not anything to do with subdomains.

### Expected Behavior

_No response_

### Steps To Reproduce

- Create any C# AppHost with a Foundry resource and dependent NodeApp resources. Ensure that the Foundry it deploys already exists
- `aspire start`
- Error message is logged on foundry resource start

### Exceptions (if any)

_No response_

### Aspire doctor output

_No response_

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with an AppHost containing an existing Foundry resource and dependent NodeApp resources by running `aspire start`. Trace the Foundry resource's startup and deployment path to determine why it attempts the unsupported subdomain update; done means an existing Foundry starts without the validation error and its dependent resources can run.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.