Skip to content

Set custom Environment Variable names for secrets #42

@operatorequals

Description

@operatorequals

Coming from Vault as a SecretsManager engine, I miss the Github Action feature that Vault implements as below:

<path> <key-irrelevant-in-AWS> | <ENV-VAR-name>

https://github.com/hashicorp/vault-action#key-syntax

This way, the action does not try to create a POSIX compatible EnvVar name, but takes what the user provides for the specific secret, and loads the value directly in ENV-VAR-name.

I would suggest a similar syntax where:

  • if no | is provided - the current behavior still happens (backward compatible)
  • if there is a | - the described behavior happens.

Example

- name: Read secrets from AWS Secrets Manager into environment variables
  uses: abhilash1in/aws-secrets-manager-action@v2.1.0
  with:
    secrets: |
      my_secret_1 | A_SECRET
      dev/secrets/* | B_SECRETS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions