Skip to content

Commit f5cc4dd

Browse files
committed
docs: envVar directive
1 parent 3e5e390 commit f5cc4dd

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/guide/intro/extensions.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,25 @@ $override:
8989
# ... default values
9090
```
9191

92+
## The `$envVar` Directive
93+
94+
Pulls in an environment variable.
95+
96+
```yaml
97+
username:
98+
$envVar: USER
99+
100+
hostname:
101+
$envVar:
102+
name: HOSTNAME
103+
allowNull: true
104+
```
105+
106+
Use `parseInt`, `parseFloat` or `parseBool` option alongside the name to parse values from the env string.
107+
92108
## The `$substitute` Directive
93109

94-
Allows environment variables to be used in strings.
110+
Allows environment variables to be used in strings. Very similar to `$envVar`, but allows embedding variables in strings.
95111

96112
```yaml
97113
apiUrl:

0 commit comments

Comments
 (0)