Closed BrianLanghoor closed 1 month ago
Hi @BrianLanghoor , thanks for opening the issue. In container app resource, if transport
under ingress
is set to tcp
, exposed_port
and target_port
should be set at the same time. The doc is not very clear about this, we will put it in the note
section.
Ah makes sense thanks! If you are changing the docs could it also be possible to change the error message to say "targetport AND exposedport" instead of or. Thanks again
@BrianLanghoor I submitted a PR adding a note in the documentation, but I am not able to find where that error is generated. Could you test again with the latest version and share the debug output that might give more information?
Just saw this same error. Had the Target Port but not the Exposed Port set on the container.
az containerapp update --name {container name} --resource-group {resource group} --image {image name}
(ContainerAppTcpIngressPortRequired) The Ingress's TargetPort or ExposedPort must be specified for TCP apps.
Got it working once I set the Exposed Port == Target Port on the Azure Portal
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Is there an existing issue for this?
Community Note
Terraform Version
1.9.3
AzureRM Provider Version
3.113.0
Affected Resource(s)/Data Source(s)
azurerm_container_app ingress
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The target_port is provided as in the docs as a number so my assumtion would be that a container app with this port will be set and the container to be created.
Actual Behaviour
terraform command validate, init, plan all succeed. When trying to apply while creating the container app it states that the targetport for ingress is required for TCP apps while it is clearly in the main.tf. If the transport protocol is changed to auto/http/http2 everything works fine and also the port is correctly shown in the azure portal.
Steps to Reproduce
run terraform apply
Important Factoids
No response
References
No response