copilot-cli
copilot-cli copied to clipboard
[Bug]: validation missing: when no port specified in the manifest
Description:
This is the error:
copilot svc deploy
Name: imported-lb-svc
Only found one option, defaulting to: beta
✘ Proposing infrastructure changes for stack app-env-svc
✘ deploy service imported-lb-svc to environment beta: deploy service: check if changeset is empty: create change set copilot-1234-1234 for stack app-env-svc: ValidationError: [/Resources/TargetGroupForImportedALB/Type/Port] 'null' values are not allowed in templates
A better experience would be manifest validation of image.port before the attempted deployment.
I ran into this same issue trying to deploy a Backend Service. The documentation says you just need to add http.path to add a internal load balancer, but what it fails to mention is that the template is invalid without a healthcheck.port value