Code Monkey home page Code Monkey logo

Comments (11)

kf6kjg avatar kf6kjg commented on August 16, 2024 2

It's not just common: Azure Key Vault explicitly bans the use of underscores in key names. On the flip side POSIX environments use underscores not hyphens.

Yes IMHO automatically converting between the two is a breaking change that should trigger a major version increment.

from get-keyvault-secrets.

darren-johnson avatar darren-johnson commented on August 16, 2024 2

We have this issue too. We use Key Vault for terraform secrets such as ARM_CLIENT_ID, but this can only be stored in the key vault as ARM-CLIENT-ID. When retrieving the secret, we can set an environment variable by adding a value to the step such as below:

env:
        ARM_CLIENT_ID: ${{ steps.get-terraform-secrets.outputs.ARM-CLIENT-ID }}

However, this then means the step has 2 environment variables presented to it, ARM_CLIENT_ID which we have set, and ARM-CLIENT-ID which comes from the Key Vault task.

This feels sub-optimal and can cause confusion. I hope that helps clear up the issue encountered.

from get-keyvault-secrets.

lukaszzdanikowski avatar lukaszzdanikowski commented on August 16, 2024

@N-Usha is this PR going to be merged? It seems like it may break a lot of actions as from the github-script action we are able to access hyphenated env variables.

from get-keyvault-secrets.

pauska avatar pauska commented on August 16, 2024

Any updates here? It's common to use hyphens for key vault secrets.

from get-keyvault-secrets.

github-actions avatar github-actions commented on August 16, 2024

This issue is idle because it has been open for 14 days with no activity.

from get-keyvault-secrets.

kanika1894 avatar kanika1894 commented on August 16, 2024

Hey @gabriel-kohen-by,
Need some help in understanding the problem better.
It will be great if you please provide some scenario where the hyphen/underscore is causing a problem?

from get-keyvault-secrets.

kf6kjg avatar kf6kjg commented on August 16, 2024

As the OP posted using hyphens for environment variables is a mismatch with POSIX. It also causes problems, all of which have workarounds, when accessing the env var with some tools - such as NodeJS: process.env.ENV-NAME will fail to execute. Like I said there are workarounds: process.env["ENV-NAME"] but they are not preferred - especially in TypeScript.

Hence many of us utilize tools to convert the env vars after the fact. In my case I've been working on rolling my own private tool that works somewhat like get-keyvault-secrets that handles both this problem and some app-specific use-cases in one shot. Once that's done I'll probably elimate this from my workflows.

from get-keyvault-secrets.

github-actions avatar github-actions commented on August 16, 2024

This issue is idle because it has been open for 14 days with no activity.

from get-keyvault-secrets.

gabriel-kohen-by avatar gabriel-kohen-by commented on August 16, 2024

Hey @gabriel-kohen-by,
Need some help in understanding the problem better.
It will be great if you please provide some scenario where the hyphen/underscore is causing a problem?

See comment mentioned by others for a typical business scenario

from get-keyvault-secrets.

github-actions avatar github-actions commented on August 16, 2024

This issue is idle because it has been open for 14 days with no activity.

from get-keyvault-secrets.

strickvl avatar strickvl commented on August 16, 2024

Also having this same problem. I'd really like to have underscores available to me to set the key names.

from get-keyvault-secrets.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.