Open jongio opened 10 months ago
@jongio - is there any documentation on azd environments and where they are stored? I don't quite understand how we could read anything other than the local environment variable with that specific name.
azd environments are stored in the projects .azure folder, but the interface with vscode is done via the cli.
You can get all environment variables with azd env get-values
.
I can imagine a workflow like this.
azd env list
to show them.azd env get-values -e env-user-selected
into the parameter list in the vscode ext.Still a bit lost, especially on the layering. Is bicep going to run azd up
? I thought it was azd's job to deploy bicep (and whatever else is required), so it's confusing to me that bicep would be aware of azd at all.
The bicep extension in VS code is not explicitly loading up environment variables from a special location. It is querying the environment variable on the machine. Is there a gesture in azd
to move environment variables from the .azure
location to the environment variables on the machine?
Otherwise, I feel like there would need to be a special syntax for referencing variables from another location, i.e.:
param environmentName = readFromEnvironmentVariable("AZURE_ENV_NAME", 'azd') // adding a second argument for the environment variables location
Unless there is a syntax change, wouldn't that mean that the deployment would only work within the vscode deployment pane? what would happen if I deploy the bicep code via az CLI?
This is just to add a button to deployment pane, no bicep updates.
This feature would allow the user to populate the deployment pane parameter textboxes from an azd env.
Nothing else about deployment pane or bicep changes.
We had an offline discussion. We agree to make this generic. The option proposed by Anthony is to detect env var dependencies and give the user ability to supply them. Mock up:
With Azure Developer CLI
We have bicep parameter files that read env vars:
Those values are store in current azd environment.
It would be nice if the deployment pane allowed the user to select the Azure Developer CLI environment they'd like to use.
Which would use azd to load the values needed for the parameters.