-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Support for additionalPortMappings in azurerm_container_app #23442
Comments
@kf6kjg Thank you for taking the time to open this feature request! |
According to https://azure.microsoft.com/de-de/updates/generally-available-azure-container-apps-supports-additional-tcp-ports/ it should be generally available now. (However, so far only supported by newest CLI extension) |
This comment was marked as duplicate.
This comment was marked as duplicate.
I am sorry, but how? How do you configure it with Terraform? |
@youyinnn As fas as I know, it is not possible using Terraform yet. To enable Terraform deployments with this new feature, we probably need a new Azure Container Apps API version by Azure: https://learn.microsoft.com/en-us/azure/templates/microsoft.app/change-log/summary |
|
Unfortunately, latest version is a preview version: Hopefully, we get a 2024-0X-XX non-preview version soon |
I've stumbled upon this issue, unfortunately we need this urgently. Can someone help with this? |
I haven't seen any progress on it, I personally workarounded it using the azapi provider to update the resource JSON definition directly for this (and also for the probes that are defined one way in the portal, and differently in the API). And yes, I've been using the preview version of the API
|
Thanks, @roisanchezriveira, that definitely helps! |
There's a non-preview version 2024-03-01 that supports this feature: https://learn.microsoft.com/en-us/rest/api/containerapps/container-apps/create-or-update?view=rest-containerapps-2024-03-01&tabs=HTTP#create-or-update-container-app So, is there a chance that this could be added to terraform? |
I found also another unsupported attribute there: template.volumes[].mountOptions. This can be set via Portal but not in Terraform. |
@roisanchezriveira - I have been doing something similar except using azapi_resource_action. We were using Secrets on our container app and because the azapi_update_resource uses a PUT, it apparently uses a GET to retrieve all of the missing attributes. Because the Secrets are not returned in the GET, you end up getting an "ContainerAppSecretInvalid" error. At any rate, what I wanted to ask you was whether you experience an issue where the Additional Ports become blank after successive Apply steps? I have seemingly been observing that behavior and trying to make sure I'm not crazy. |
I had the same issue, that's why I added this to the container app resource
And this to the azapi one
My guess is that the azapi was modifying the container app resource and triggering a modification on subsequent applies (so I added the ignore changes on the probes to avoid that) and that any change on the azurerm resource wipes the azapi, so I added the trigger on it to ensure the ports always are mapped after any other change to the container app |
Thanks for confirming. And your solution to just use the replace_triggered_by on the container app is a lot more elegant than what I was considering! |
Is there an existing issue for this?
Community Note
Description
This feature is still in preview, but I figured it was worth adding to the queue so that support can be planned for and eventually land in a timely manner.
In API version
2023-05-02-preview
Azure has added support for a new block in theingress
block:additionalPortMappings
.This feature request is to track adding support for that new feature at such a time as it becomes released to their main API version.
New or Affected Resource(s)/Data Source(s)
azurerm_container_app
Potential Terraform Configuration
References
microsoft/azure-container-apps#763
The text was updated successfully, but these errors were encountered: