Skip to content

variable name as id #20

@CanRau

Description

@CanRau

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions