I'm attempting to deploy a container on a private subnet that doesn't require an incoming port but requires an IP for outbound connection (azure devops build agent) however it fails to deploy when no ports are provided. I don't understand why a port is required ? I shouldn't have to define a bogus port.
condensed ARM snippet:
{
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2021-10-01",
...
"properties": {
"containers": [
{
...
}
],
"subnetIds": [
{
"id": "...",
"name": "ACI"
}
],
"osType": "Linux",
"ipAddress": {
"type": "Private",
"ports": [
]
}
}
Error:
{"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code\": \"SubnetMissingRequiredDelegation\",\r\n \"message\": \"Subnet missing required delegation 'Microsoft.ContainerInstance' for container group 'buildagent-cache-server'.\"\r\n }\r\n}"},{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code\": \"MissingIpAddressPorts\",\r\n \"message\": \"The ports in the 'ipAddress' of container group 'buildagent-build-server0' cannot be empty.\"\r\n }\r\n}"},{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code\": \"MissingIpAddressPorts\",\r\n \"message\": \"The ports in the 'ipAddress' of container group 'buildagent-build-server1' cannot be empty.\"\r\n }\r\n}"}]}}