You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
AWS Secrets Manager Reader
v1.0.0
Use this action to read a secret value from AWS Secret Manager.
This action assume that:
- The credentials are in place (see aws-actions/configure-aws-credentials)
- The AWS client has the permission required to get the secret
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 }}"
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/ |
Name | Type | Description |
---|---|---|
secret |
String | SecretString as return by AWS API |