Azure Container App Environment (ACA) with external container registry
- 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
Publish of a project with an external (non Azure) container registry fails:
```C#
#:package Aspire.Hosting.Azure.AppContainers@*
#:sdk Aspire.AppHost.Sdk@13.1.0
var builder = DistributedApplication.CreateBuilder(args);
#pragma warning disable ASPIRECOMPUTE003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
var registry = builder.AddContainerRegistry("github", "ghcr.io");
var acaEnv = builder.AddAzureContainerAppEnvironment("test-env")
.WithContainerRegistry(registry);
#pragma warning restore ASPIRECOMPUTE003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
```
```txt
$/aspire publish
✗ Failed to write Azure Bicep templates: The given key 'Aspire.Hosting.Azure.AzureContainerRegistryResource' was not present in the dictionary. (0.0s)
✗ [ERR] Failed to write Azure Bicep templates to [..]\aspire-output
✗ [ERR] Step 'publish-azuree7f9f' failed.
✗ Step 'publish-azuree7f9f' failed: The given key 'Aspire.Hosting.Azure.AzureContainerRegistryResource' was not present in the dictionary.
```
### Expected Behavior
- Using external container registry instead of Azure Container Registry is possible.
- Using public / no container registry instead of Azure Container Registry is possible.
### Steps To Reproduce
_No response_
### Exceptions (if any)
_No response_
### .NET Version info
```
$/aspire --version
13.1.0+8a4db1775c3fbae1c602022b636299cb04971fde
```txt
### Anything else?
```
$/aspire --version
13.1.0+8a4db1775c3fbae1c602022b636299cb04971fde
```txt
Contributor guide
Assessment
This issue has not been assessed yet.