copilot-cli
copilot-cli copied to clipboard
add `--manifest` flag to `copilot init` to allow initializing a service using an existing manifest.yml
copilot svc init
is currently overloaded, as it's the only way to initialize a service, either from scratch or from an existing manifest. We should allow customers with existing manifests to specify the location of a manifest.yml
file and use that file to recreate the input parameters for svc init
.
$ copilot svc init --manifest copilot/fe/manifest.yml
Ok, we'll create a Load Balanced Web Service named fe listening on port 8080 using the Dockerfile located at ./path/to/Dockerfile.
Or using an image and a scheduled job:
$ copilot init --manifest copilot/job/manifest.yml --deploy
Ok, we'll create a Scheduled Job named job which will run every 4 hours using the image located at amazon/amazon-ecs-sample.
Creating ECR Repositories...
Deploying...
We should error out on any other flag input.
$ copilot svc init --manifest copilot/fe/manifest.yml --name backend
✘ `--manifest` cannot be specified with any other flags
We can follow the same workflow to enable multiple pipelines and their corresponding pipeline manifests!
Maybe we can use the '--manifest' path instead - I'm keen on reserving import for importing existing AWS resources or services.
Related: https://github.com/aws/copilot-cli/issues/1381
Resolved with #3715.
Reopening because we are missing the flag in init
or deploy
!