aws / aws/aws-cdk-cli

(cli): Every CLI option should be supported as env variable

Open
#809 1 comment 3 reactions 1 assignee Claimed by @9pace View on GitHub
aws-cdk effort/medium feature-request p1
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

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.