Skip to content

afterthought/action-aws-cf-to-dotenv

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Project base created from very similar action, https://github.com/deptno/action-aws-ssm-to-dotenv.

action aws CF to dotenv

create .env or shell script via AWS Cloudformation outputs

usage

- uses: afterthought/action-aws-cf-to-dotenv@v1
  env:
    AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} # required
    AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} # required
    AWS_DEFAULT_REGION: ap-northeast-2 # required
  with:
    stack-names: stack1, stack2, stackN
    format: shell
    output: .env.development
    prefix: CF_

Output parameter names are converted to UPPER_SNAKE_CASE.

⚠️ if output file already exists action_aws_cf_to_dotenv will append data to output file

option

stack-names(optional)

Name of cloudformation stacks separated by commas.

tag-filters(optional)

Comma separated list of tag name:value pairs. I.e. env:prod,service:web1. Include only stacks with matching tag name/values.

format(default dotenv)

optional, default=dotenv

  • dotenv: KEY="value" (default)
  • shell: export KEY="value"
  • yaml: KEY: "value"

output(default .env)

output filename

prefix(optional)

add prefix to exported variable name
eg) prefix: ACTION_ will export ACTION_ENV_VAR="value"

.github/workflows/test.yml


License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published