Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set custom Environment Variable names for secrets #42

Open
operatorequals opened this issue Aug 31, 2022 · 3 comments
Open

Set custom Environment Variable names for secrets #42

operatorequals opened this issue Aug 31, 2022 · 3 comments

Comments

@operatorequals
Copy link

operatorequals commented Aug 31, 2022

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/[email protected]
  with:
    secrets: |
      my_secret_1 | A_SECRET
      dev/secrets/* | B_SECRETS
@jacobweberbowery
Copy link

Does this work with the parse-json feature? That would be very useful to me.

@operatorequals
Copy link
Author

Does this work with the parse-json feature? That would be very useful to me.

Added such support in this PR: #44 (comment)

Cheers!

@jacobweberbowery
Copy link

Does this work with the parse-json feature? That would be very useful to me.

Added such support in this PR: #44 (comment)

Cheers!

That's great -- thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants