Azure / Azure/azure-dev

[feat] module to import appropriate .env

Open
#2,336 10 comments 0 reactions 1 assignee Claimed by @vhvb1989 View on GitHub
area/core-cli feature needs-discussion
Dominant language
Go
Stars
569
Forks
364
Avg merge
2d 19h
Merged PRs (30d)
136

Description

It's great using azd to provision resources and being able to load the _.env_ files using godotenv or whatever, but it would be even easier in projects using azd this way if we provided a library to make it easier e.g.,

```go
func LoadEnv(env string) error {
if env == "" {
// get .azure/config@defaultEnvironment or err
}
// use godotenv to load environment's .env file,
// optionally supporting fallback to/inclusion of any repo/ancestor .env file
}
```

It's not hard code to write, but any module support for azd (in Go or other languages) might help adoption.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.