How do I add an environment variable (eg. 3rd party URL) to my Azure Developer CLI "todo-nodejs-mongo-aks" template?

Thomas Hansen 0 Reputation points
2023-09-05T10:33:35.6066667+00:00

Hi

I am using azd to provision and deploy the todo-nodejs-mongo-aks template.

It is working fine, and now I want to add a URL to a 3rd party API (eg. https://api.example.com) for use in the /api part of the app. For this I am creating an environment variable (azd env set 3RD_PARTY_API_URL https://api.expample.com) which creates an entry in .azure/my-company/.env file. I can now read 3RD_PARTY_API_URL when running the app locally as expected.

But when I deploy the app to azure using azd up , I can no longer read the 3RD_PARTY_URL on the deployed (live) instance. Please advice on how I should handle this.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
39,085 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. deherman-MSFT 37,081 Reputation points Microsoft Employee
    2023-09-12T17:45:49.42+00:00

    @Thomas Hansen

    Azure Developer CLI is not currently supported on Q&A. Please post your question on the GitHub discussion page.
    https://github.com/Azure/azure-dev/discussions

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.