ecsenv

command module
v0.0.0-...-afaa0d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 7 Imported by: 0

README

ECS Environment Generator

The ECS Environment Generator is a utility program that extracts environment variables and secrets from an AWS ECS task definition and generates a .env file.

Features

  • Extract environment variables and secrets from ECS task definitions.
  • Cache secrets to improve performance and reduce AWS Secret Manager API calls.
  • Support for different cloud providers (currently AWS is supported).
  • Verbose logging for debugging purposes.

Prerequisites

  • Go (v1.16 or later)
  • AWS credentials set up, either as environment variables (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) or via the AWS credentials file.

Usage

Build

To build the binary:

go build -o ecsenv
Run

To generate a .env file from an ECS task definition:

./ecsenv generate-env [taskDefinitionName] --region [region] --provider aws

To list all support cloud providers:

./ecsenv list-providers
Options
  • -v, --verbose: Enable verbose output.
  • -r, --region: Specify the AWS region. Defaults to us-west-2.
  • -p, --provider: Specify the cloud provider. Defaults to aws.

Testing

To run the unit tests:

go test -v ./...

Contributing

Feel free to submit pull requests for new features or bug fixes. Please ensure that any changes include relevant unit tests.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
aws

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL