Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
lock

GitHub Action

AWS Secrets Manager Reader

v1.0.0

AWS Secrets Manager Reader

lock

AWS Secrets Manager Reader

Github Action to read a secret value from AWS Secret Manager'

Installation

Copy and paste the following snippet into your .yml file.

              

- name: AWS Secrets Manager Reader

uses: t-botz/[email protected]

Learn more about this action in t-botz/aws-secrets-manager-read-action

Choose a version

typescript-action status

AWS Secrets Manager Reader

Use this action to read a secret value from AWS Secret Manager.

This action assume that:

Usage

Assuming we have define in AWS Secret Manager a secret foo/bar with the following content:

{
  "MY_SECRET": "123456"
}
- uses: aws-actions/configure-aws-credentials@v1
  with:
    aws-region: us-east-1
- name: Retrieve Secrets
  id: secrets
  uses: thibaultdelor/[email protected]
  with:
    secret-id: foo/bar
    is-json: true
- name: Use Secret
  # Will actually display '***' as secret will be masked in output
  run: echo "${{ fromJSON(steps.secrets.outputs.secret).MY_SECRET }}"

Inputs

Name Type Description
secret-id String Refer to AWS Documention
version-id String Refer to AWS Documention
version-stage String Refer to AWS Documention
is-json Boolean Whether the credentials is a key/value json. Used for masking the values instead of the whole string/

Outputs

Name Type Description
secret String SecretString as return by AWS API