Skip to content

azd up cannot provision Azure resources when the AppHost only has Aspire Integrations (no .NET Projects) #8422

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

Closed
1 task done
janeski opened this issue Mar 30, 2025 · 5 comments · May be fixed by Azure/azure-dev#5199
Closed
1 task done
Labels
area-azd Azure Developer CLI related issues
Milestone

Comments

@janeski
Copy link

janeski commented Mar 30, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I have created a simple .NET Aspire application that only has Aspire integration (PostgreSQL) and no .NET project. The application runs successfully on a local machine. When running "azd up" I encounter the following error:

`PS C:\Users\mja\source\repos\Aspire-Empty-App-Bug> azd up

Packaging services (azd package)

Provisioning Azure resources (azd provision)
Provisioning Azure resources can take some time.

Subscription: Personal-MJA-Dev (dfe850c1-aba7-48eb-ac7a-7ffc85b7579b)
Location: North Europe

You can view detailed progress in the Azure Portal:
https://portal.azure.com/#view/HubsExtension/DeploymentDetailsBlade/~/overview/id/%2Fsubscriptions%2Fdfe850c1-aba7-48eb-ac7a-7ffc85b7579b%2Fproviders%2FMicrosoft.Resources%2Fdeployments%2Fazd-empty-aspire-app-demo-1743362595

(✓) Done: Resource group: rg-azd-empty-aspire-app-demo (659ms)
(✓) Done: Log Analytics workspace: law-vnkwbrq6pkw4q (797ms)
(✓) Done: Container Apps Environment: cae-vnkwbrq6pkw4q (2m22.922s)

Deploying services (azd deploy)

(x) Failed: Deploying service postgres

ERROR: error executing step command 'deploy --all': failed deploying service 'postgres': logging in to registry: could not determine container registry endpoint, ensure 'registry' has been set in the docker options or 'AZURE_CONTAINER_REGISTRY_ENDPOINT' environment variable has been set
PS C:\Users\mja\source\repos\Aspire-Empty-App-Bug>`

Image

Expected Behavior

I want to run and deploy to Azure an Aspire application that consists only of integration (no custom .NET project)

Steps To Reproduce

  1. clone https://github.com/janeski/aspire-integrations-azd-up-issue
  2. navigete to aspire-integrations-azd-up-issue
  3. azd up

Exceptions (if any)

Deploying services (azd deploy)

(x) Failed: Deploying service postgres

ERROR: error executing step command 'deploy --all': failed deploying service 'postgres': logging in to registry: could not determine container registry endpoint, ensure 'registry' has been set in the docker options or 'AZURE_CONTAINER_REGISTRY_ENDPOINT' environment variable has been set

.NET Version info

.NET SDK:
Version: 9.0.200
Commit: 90e8b202f2
Workload version: 9.0.200-manifests.a3a1a094
MSBuild version: 17.13.8+cbc39bea8

Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.200\

.NET workloads installed:
[aspire]
Installation Source: VS 17.13.35818.85
Manifest Version: 8.2.2/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
Install Type: Msi

Configured to use loose manifests when installing new manifests.

Host:
Version: 9.0.3
Architecture: x64
Commit: 831d23e561

.NET SDKs installed:
6.0.428 [C:\Program Files\dotnet\sdk]
8.0.407 [C:\Program Files\dotnet\sdk]
9.0.104 [C:\Program Files\dotnet\sdk]
9.0.200 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Anything else?

.NET Aspire version: 9.1.0
Microsoft Visual Studio Enterprise 2022 (64-bit) - Current
Version 17.13.1

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Mar 30, 2025
@afscrome afscrome added area-deployment and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Mar 30, 2025
@davidfowl
Copy link
Member

@vhvb1989 ?

@davidfowl
Copy link
Member

@janeski can you try adding the package Aspire.Hosting.Azure.AppContainers and calling AddAzureContainerAppEnvironment?

@janeski
Copy link
Author

janeski commented May 12, 2025

@davidfowl, still the same issue. I tried azd down and azd up again without success.

This is what I've tried:

var builder = DistributedApplication.CreateBuilder(args);

builder.AddAzureContainerAppEnvironment("empty-env");

var postgres = builder.AddPostgres("postgres")
.WithEnvironment("POSTGRES_DB", "postgres")
.WithPgAdmin();

var db = postgres.AddDatabase("db");

builder.Build().Run();

@vhvb1989
Copy link

There is an issue for this @janeski
The current workaround is to add at least one project (calling builder.AddProject(.....))

It might not be fixed until Aspire 9.4

@vhvb1989
Copy link

@eerhardt had a nice catch here and figure this was actually an issue in AZD because the ACA definition provided by the AppHost contains a public image. AZD had a bug trying to log in to ACR before deploying.

Fix here: Azure/azure-dev#5199

@davidfowl you can update the tags and maybe close this?

@davidfowl davidfowl modified the milestones: 9.4, 9.3 May 15, 2025
@davidfowl davidfowl added area-azd Azure Developer CLI related issues and removed area-deployment labels May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-azd Azure Developer CLI related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants