Giter Site home page Giter Site logo

aws-secrets-manager-actions's Introduction

AWS Secrets Manager Actions

npm version GitHub Actions Test GitHub Actions Publish GitHub license

This GitHub Action helps you define your secrets that stored in AWS Secrets Manager to environment values.

Usage

steps:
 - name: Store ENV from AWS SecretManager
   uses: say8425/aws-secrets-manager-actions@v1
   with:
     AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
     AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
     AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
     SECRET_NAME: ${{ secrets.SECRET_NAME }}
     OUTPUT_PATH: '.env' # optional

Add your AWS IAM keys and you secret name that you want to use from your AWS Secrets Manager secrets list. Then your secrets will be defined environment values.

AWS IAM

You need AWS IAM user that has proper policy to access AWS Secrets Manager. If you have it, then add this IAM user keys at AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and region AWS_DEFAULT_REGION. But we greatly recommend to store these keys at GitHub Secrets.

Policy

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "secretsmanager:GetSecretValue",
            "Resource": "*"
        }
    ]
}

If you need policy example, then feel free to use this above policy. And you can get more information at AWS User Guide.

Secret Name

Add you want to use secret name from your AWS Secrets Manager secrets list. You can use only one secret name.

Environment Values

Your secrets will be environment values. And these environment values are masked with ***. So never be revealed.

Export environment variables to file

You can export these environment variables to file with OUTPUT_PATH input parameter. When you define OUTPUT_PATH, then action create a file named as you defined. And environments will be exported into this file.

Contributing

Your Contributions are always welcome! Feel free to check issues or Pull Requests

License

This project is MIT licensed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.