Reputation: 485
I have create few keys and secrets in my Azure Key Vault. And my Single Page Application developed in reactjs needs some of these keys which are basically API urls. These keys are common for few other SPAs.
I have gone through one article here, but i have no idea how to bring it to the single page web app.
https://thorsten-hans.com/integrating-azure-keyvault-with-azure-container-services
Is there a way we can make these azure key vault keys/secrets to be available to Azure Devops build (we are using docker file and AKS) and then it can be consumed by the build of my front end app?
Upvotes: 1
Views: 1482
Reputation: 222712
It's same as how you would consume keyvault in any other application on Azure Devops.
If you are starting with KeyVault, here is a great tutorial on setting up keyvault
with Azure Devops using the Keyvault task
Which includes steps as
Upvotes: 1
Reputation: 18387
you can add a key vault task in your pipeline to get the secrets:
then, you'll need to pass them as environment variables to your SPA:
How to use environment variables in React app hosted in Azure
Upvotes: 1