Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.

t-kikuc/ecsdef-export

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ecsdef-export

Fetch and export ECS definitions (service&taskdef) to files.

This is mainly created for PipeCD users.

What you'll get

Once you execute a command, you can generate ECS definition files like:

servicedef.yaml:

taskdef.yaml:

How to use it

  • Prerequisites
    • You have golang
    • You can execute AWS commands to your AWS account. (e.g. aws ecs list-services --cluster <your-cluster>)
  1. Execute the following command.

    go run main.go --cluster <YOUR_ECS_CLUSTER_NAME> --outdir ./YOUR/TARGET/DIR

    Then the definition files will be generated under ./YOUR/TARGET/DIR.

  2. (optional) If you want to remove unnecessary fields from the generated files, execute the following command.

    find ./YOUR/TARGET/DIR -type f -exec sed -i '' \
    -e '/nosmithydocumentserde:/d' \
    -e '/createdat:/d' \
    -e '/createdby:/d' \
    -e '/deployments:/d' \
    -e '/events:/d' \
    -e '/loadbalancers:/d' \
    -e '/pendingcount:/d' \
    -e '/runningcount:/d' \
    -e '/status:/d' \
    -e '/tasksets:/d' \
    -e '/deregisteredat:/d' \
    -e '/registeredat:/d' \
    -e '/registeredby:/d' {} \;

About

Export ECS Definitions (servicedef&taskdef) to YAML Files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages