Open MichielVanHerreweghe opened 1 month ago
@MichielVanHerreweghe, thanks for submitting this issue for the avm/res/app/container-app
module!
[!IMPORTANT] A member of the @Azure/avm-res-app-containerapp-module-owners-bicep or @Azure/avm-res-app-containerapp-module-contributors-bicep team will review it soon!
Just a question: Did you set the "trafficLabel"
parameter to an empty string?
Because the default value would be "label-1" and as the error message says, this wouldn't be allowed for TCP.
I'm going to add a condition to not deploy the traffic label if TCP is set.
I'm going to add a condition to not deploy the traffic label if TCP is set.
Yup. Would have been my suggestion/PR too, but I would first make sure there isn't another problem. Possibly extend tests in the direction of TCP. Something like that.
Agreed, I have started testing and will add another test case to watch out for this scenario in the future. Will try and get this done this month.
Check for previous/existing GitHub issues
Issue Type?
Bug
Module Name
avm/res/app/container-app
(Optional) Module Version
No response
Description
When setting up an Azure Container App that uses TCP, I get the following error:
{"status":"Failed","error":{"code":"DeploymentFailed","target":"/subscriptions/37a5d1db-57b3-42dc-adfe-9315355cf466/resourceGroups/rg-bw-odoo-dev/providers/Microsoft.Resources/deployments/main","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"ResourceDeploymentFailure","target":"/subscriptions/37a5d1db-57b3-42dc-adfe-9315355cf466/resourceGroups/rg-bw-odoo-dev/providers/Microsoft.Resources/deployments/containerAppResources-deployment","message":"The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.","details":[{"code":"DeploymentFailed","target":"/subscriptions/37a5d1db-57b3-42dc-adfe-9315355cf466/resourceGroups/rg-bw-odoo-dev/providers/Microsoft.Resources/deployments/containerAppResources-deployment","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"InvalidTemplateDeployment","message":"The template deployment 'ca-bw-odoo-batch-dev-weu-deployment' is not valid according to the validation procedure. The tracking id is '00d69dcb-a6a2-4df9-af4c-c03122982bc8'. See inner errors for details.","details":[{"code":"ValidationForResourceFailed","message":"Validation failed for a resource. Check 'Error.Details[0]' for more information.","details":[{"code":"ContainerAppInvalidIngressTrafficLabelForTcpApp","message":"Traffic label can only be set for http transport."}]}]},{"code":"InvalidTemplateDeployment","message":"The template deployment 'ca-bw-odoo-frontend-dev-weu-deployment' is not valid according to the validation procedure. The tracking id is '8379391d-9541-485f-830e-29f397cf35c0'. See inner errors for details.","details":[{"code":"ValidationForResourceFailed","message":"Validation failed for a resource. Check 'Error.Details[0]' for more information.","details":[{"code":"ContainerAppInvalidIngressTrafficLabelForTcpApp","message":"Traffic label can only be set for http transport."}]}]}]}]}]}}
(Optional) Correlation Id
No response