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

variable name as id #20

Open
CanRau opened this issue Jun 25, 2023 · 1 comment
Open

variable name as id #20

CanRau opened this issue Jun 25, 2023 · 1 comment

Comments

@CanRau
Copy link

CanRau commented Jun 25, 2023

Hey, just finally started integrating Secrets Manager into my workflow and am in general pretty happy to finally get more structure and clarity.

I was wondering if it'd be possible to define the secrets using their name instead of id like so

- name: Step name
  uses: bitwarden/sm-action@v1
  with:
    access_token: ${{ secrets.ACCESS_TOKEN }}
    secrets: |
      MY_SECRET > ENVIRONMENT_VARIABLE_NAME

instead of shtg like this

- name: Step name
  uses: bitwarden/sm-action@v1
  with:
    access_token: ${{ secrets.ACCESS_TOKEN }}
    secrets: |
      b1885261-f75e-43e6-9353-7bc6cffff554 > ENVIRONMENT_VARIABLE_NAME

if this would be possible it could bring a couple of benefits, though I'm certainly interested in possible downsides/issues

  1. No confusion as to if I've mapped the right id to ENVIRONMENT_VARIABLE_NAME
  2. No need to get the id from the CLI (couldn't find another way currently to get the id)
  3. I could have different projects for staging, production etc each with the same set of equally named secrets, so I'd only have to provide a different access_token to the action instead of defining a separate step and having to map all secrets again because they have different IDs.

Or maybe I'm using it currently wrong and there's other ways of achieving the same?

@CanRau
Copy link
Author

CanRau commented Oct 2, 2023

Getting closer:

The team is currently evaluating the retrieval of secrets by name for consideration in a future release.
As an initial improvement, the process of retrieving the UUID has been streamlined and is now conveniently displayed below every secret.

From https://twitter.com/Bitwarden/status/1708894990766895280?t=8IAjXjcBB8uNHGOcSMvp9w&s=19

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

1 participant