The ports '0' are invalid for container 'downloader' in container group 'downloader'. The port must be beteween 1 and 65535.
Error: Error creating/updating container group "mesh-downloader-kmben" (Resource Group "crimp-processing-daves"): containerinstance.ContainerGroupsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="InvalidContainerPorts" Message="The ports '0' are invalid for container 'downloader' in container group 'downloader'. The port must be beteween 1 and 65535."
on ../modules/container_instance/main.tf line 16, in resource "azurerm_container_group" "mesh_downloader":
16: resource "azurerm_container_group" "mesh_downloader" {
Steps to Reproduce
terraform apply
Important Factoids
The Azure Spec agrees, partially, that on a port the port property is required and protocol is optional.
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_container_group
When deploying a container without any
ports
specified an error is returnedTerraform Configuration Files
Debug Output
Panic Output
Expected Behaviour
Creation to succeed as docs/schema flag
ports
property as optionalhttps://github.com/terraform-providers/terraform-provider-azurerm/blob/2996ca7d66ccfe0a80550e600818813fd294eb59/azurerm/internal/services/containers/container_group_resource.go#L244-L269
Actual Behaviour
Steps to Reproduce
terraform apply
Important Factoids
The Azure Spec agrees, partially, that on a
port
theport
property is required andprotocol
is optional.https://github.com/Azure/azure-rest-api-specs/blob/961799e77f5e9b81208384a1c6ce3a6bc9e84a93/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-04-01/containerInstance.json#L933
References