Comments (11)
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.
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.
@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.
Any updates here? It's common to use hyphens for key vault secrets.
from get-keyvault-secrets.
This issue is idle because it has been open for 14 days with no activity.
from get-keyvault-secrets.
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.
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.
This issue is idle because it has been open for 14 days with no activity.
from get-keyvault-secrets.
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.
This issue is idle because it has been open for 14 days with no activity.
from get-keyvault-secrets.
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)
- Add Support for Sovereign clouds like AzureUSGovernment HOT 5
- Support Managed Service Identity KeyVault access for Self-Hosted Runners HOT 9
- Action need to update to deal with CVE vulnerabilities HOT 16
- Receiving Error: Unable to process command '::set-env HOT 9
- Handling dynamic key names HOT 6
- RBAC based access policies on the Key Vault HOT 4
- GA Date HOT 4
- Failure to login AKV using SPN Certificate Credentials. HOT 5
- Invalid regular expression: /*/: Nothing to repeat on self-hosted GithubRunner HOT 1
- Action never fails when trying to access non-existing KV
- Deprecation info HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from get-keyvault-secrets.