Using keyvault secrets as environment variables in local nodejs project

Uttam S 1 Reputation point
2021-10-22T12:36:41.037+00:00

Is there any way by which I can load ketvault values in local nodejs project as environment variables. And when I have to access that value I can do that by process.env.VARIABLE_NAME instead of calling javascript function to access keyvault value.

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,108 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JamesTran-MSFT 36,361 Reputation points Microsoft Employee
    2021-10-25T20:53:57.57+00:00

    @Uttam S
    Thank you for your post and I apologize for the delayed response!

    For your scenario of accessing Key Vault Secrets locally, I found an article that might help point you in the right direction - Configuring your local JS dev environment for Azure. Within this doc you'll be Working with Azure and the Azure SDK client libraries to Create environment variables for the Azure libraries.

    Additional Links:
    Use Key Vault references for App Service and Azure Functions
    What are the advantages for storing simple secrets in Key Vault over Environment variables
    Using Environment Variables with Express for Local Dev & Azure App Service - 3rd party article

    If you have any other questions, please let me know.
    Thank you for your time and patience throughout this issue.

    ----------

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    0 comments No comments