aspire
aspire copied to clipboard
Getting 'DotNet Component operations are not allowed for the subscription' when trying to deploy Preview 7 aspire-starter app to Azure
Description of the problem
- Using Aspire Preview 7 (Version="8.0.0-preview.7.24251.11), create a fresh new aspire sample app using
dotnet new aspire-starter -n AspireStarter7 - Run it locally from the Aspire7.AppHost directory using
dotnet run- Everything works normally. - I'm using the latest version of
azdat the time of this writing:
azd version 1.9.1 (commit aadbc26943c2e3e5437a6ffa528fe5264887a10c)
- From top-level solution directory Initialize the solution for Azure deployment using
azd init -e aspire7 - Deploy the app using
azd up
azd proceeds to try and deploy the starter app to my subscription (it's my personal Visual Studio Professional subscription) but the deployment fails:
(✓) Done: Resource group: rg-aspire7 (✓) Done: Container Registry: acrsk5cqekgs53si (✓) Done: Log Analytics workspace: law-sk5cqekgs53si (✓) Done: Container Apps Environment: cae-sk5cqekgs53si |===== | Creating/Updating resources
ERROR: error executing step command 'provision': deployment failed: error deploying infrastructure: deploying to subscription:
Deployment Error Details:
DotNetComponentsNotAllowedForSubscription: DotNet Component operations are not allowed for the subscription: '85e37ecf-bc9c-4aff-xxx-xxxxxxx'. (<-- redacted)
TraceID: f3993b2f5d00ad24dfee4e792xxxxxx
Analysis
-
I checked and double-checked my Azure Subscription to verify that the
Microsoft.Appresource provider is registered with the subscription. TheMicrosoft.Appresource provider contains theMicrosoft.App/managedEnvironments/dotNetComponents@2024-02-02-previewresource thatazd upis looking for. I have tried to deploy the starter-app on multiple subscriptions and they all fail with this error. -
Using
azd infra synthto generate the local bicep files, I can see in/infra/resources.bicepthat the Aspire Dashboard is the resource that is causing the failure:
resource aspireDashboard 'dotNetComponents' = {
name: 'aspire-dashboard'
properties: {
componentType: 'AspireDashboard'
}
}
}
-
If I comment out the
aspireDashboardresource above in theresource.bicepfile, the deployment will succeed. -
Any idea what is going on here? Thank you.
I am pretty sure this is due to the dashboard feature not being fully rolled out to all regions/users just yet on ACA. Sound right @rajeshkamal5050
Interesting observation @timheuer. Regarding the regions, I've tried deploying to both "East US" and "East US 2" with no luck. When I lookup the Resource Provider Details in my subscription for managedEnvironments/dotNetComponents, these 2 regions are included in the list of locations:
{
"resourceType": "managedEnvironments/dotNetComponents",
"locations": [
"West US 2",
"Southeast Asia",
"Sweden Central",
"Canada Central",
"West Europe",
"North Europe",
"East US",
"East US 2",
"East Asia",
"Australia East",
"Germany West Central",
"Japan East",
"UK South",
"West US",
"Central US",
"North Central US",
"South Central US",
"Korea Central",
"Brazil South",
"West US 3",
"France Central",
"South Africa North",
"Norway East",
"Switzerland North",
"UAE North",
"Canada East",
"West Central US",
"UK West",
"Central India",
"Italy North",
"Poland Central"
],
"apiVersions": [
"2024-02-02-preview",
"2023-11-02-preview"
],
"defaultApiVersion": "2023-11-02-preview",
"capabilities": "None"
}
I see that it specifies "capabilities": "None", but I'm not sure if that is relevant or what the purpose of that property is?
Specifically it's this one that I think is causing the issue:
componentType: 'AspireDashboard'
that's the one that is not fully rolled out to public regions.
Ah ok, now I think I understand @timheuer . I was following the docs at https://learn.microsoft.com/en-us/dotnet/aspire/deployment/azure/aca-deployment?tabs=visual-studio#deploy-the-net-aspire-dashboard and enabled deploying of the aspire dashboard alpha feature by doing
azd config set alpha.aspire.dashboard on
I know we are still in preview, but I thought that since this was in the docs, the feature would be available on Azure. When I turn the feature flag off (or comment out the resource in the bicep file), I can now deploy the sample, but without the dashboard :(
@kvenkatrajan / @bradygaster I think it isn't fully rolled out yet right?
That is correct. Rollout is in progress. We will keep this thread updated when its ready to use.
@kvenkatrajan I think this is ready to go now right?
Yes that's correct. @geokaps please feel free to test and report incase of any issues.
I can confirm that I'm able to deploy the v8 GA aspire-starter sample along with the dashboard to the East-US region and all is well.
Congratulations to the entire .Net Aspire team and community! Well done!