aws / copilot-cli

The AWS Copilot CLI is a tool for developers to build, release and operate production ready containerized applications on AWS App Runner or Amazon ECS on AWS Fargate.
https://aws.github.io/copilot-cli/
Apache License 2.0
3.42k stars 397 forks source link

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

Open bvtujo opened 3 years ago

bvtujo commented 3 years ago

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
huanjani commented 3 years ago

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

kohidave commented 3 years ago

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

huanjani commented 3 years ago

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

huanjani commented 1 year ago

Resolved with #3715.

Lou1415926 commented 6 months ago

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