Skip to content

[Issue] Azure env variables not exported during packaging #3456

@sinedied

Description

@sinedied

Output from azd version
Run azd version and copy and paste the output here:
azd version 1.6.1 (commit eba2c97)

Describe the bug
When running azd package, I expected that environment variables from the current AZD environment are exported when the build/packaging commands are run, but this is not the case.

To Reproduce
See this repository: https://github.com/Azure-Samples/azure-search-openai-javascript/blob/main/azure.yaml#L22
As a workaround, I add to add predeploy hook to rebuild my webapp while exported the env variable I needed.

Expected behavior
All env variables from the current AZD environment are export when the build/packaging commands are run.

Environment
Codespaces / JavaScript / Node v18.19.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions