(cli): Every CLI option should be supported as env variable
- Dominant language
- TypeScript
- Stars
- 105
- Forks
- 122
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 71
Description
Follow up on https://github.com/aws/aws-cdk-cli/issues/743 and https://github.com/aws/aws-cdk-cli/issues/808
Every CLI option (that's in the schema) should be also be supported as an env var, using a standardized naming scheme.
For example:
```
AWS_CDK_CONFIG_STRICT=true
aws_cdk_config_strict=true
```
- This requires the schema to be aware of types and to parse values accordingly.
- Naming needs to be consistent and support nested structures
- Consider if we want to support both all upper and all lower or just one of them
- Windows support
---
In it's final form, the configuration should be read with the following priority order (first in list takes precedence):
1. **Command-line options**
2. Environment variables
3. Per-app configuration in `$PWD/cdk.json`
4. Per-user configuration in `$HOME/cdk.json`
5. Built-in defaults
Contributor guide
Assessment
This issue has not been assessed yet.