microsoft / microsoft/aspire

Change ACA containerPort parameter to int instead of string

Open
#8,906 2 comments 0 reactions 0 assignees View on GitHub
area-integrations azure-container-apps
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

Today when we allocate the container port parameter for ACA apps we are using the default `typeof(string)`

https://github.com/dotnet/aspire/blob/1994993c5442cf0f2866a02b3497cf9554757add/src/Aspire.Hosting.Azure.AppContainers/ContainerAppContext.cs#L706-L731

Instead, this should be `typeof(int)`.

https://github.com/dotnet/aspire/blob/1994993c5442cf0f2866a02b3497cf9554757add/playground/AzureContainerApps/AzureContainerApps.AppHost/api.module.bicep#L8

https://github.com/dotnet/aspire/blob/1994993c5442cf0f2866a02b3497cf9554757add/playground/AzureContainerApps/AzureContainerApps.AppHost/api.module.bicep#L68

https://learn.microsoft.com/en-us/azure/templates/microsoft.app/containerapps?pivots=deployment-language-bicep#resource-format

```json
ingress: {
additionalPortMappings: [
{
exposedPort: int
external: bool
targetPort: int
}
]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.