copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

add `--manifest` flag to `copilot init` to allow initializing a service using an existing manifest.yml

Open bvtujo opened this issue 3 years ago • 5 comments

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

bvtujo avatar May 26 '21 23:05 bvtujo

We can follow the same workflow to enable multiple pipelines and their corresponding pipeline manifests!

huanjani avatar May 26 '21 23:05 huanjani

Maybe we can use the '--manifest' path instead - I'm keen on reserving import for importing existing AWS resources or services.

kohidave avatar May 27 '21 02:05 kohidave

Related: https://github.com/aws/copilot-cli/issues/1381

huanjani avatar May 27 '21 16:05 huanjani

Resolved with #3715.

huanjani avatar Jul 17 '22 20:07 huanjani

Reopening because we are missing the flag in init or deploy!

Lou1415926 avatar Dec 08 '23 19:12 Lou1415926