Skip to content

Commit 33329ff

Browse files
dmartin35Lawouach
authored andcommitted
Add optional default key for environment variables in configuration (chaostoolkit#74)
Signed-off-by: David Martin <david@chaoiq.io>
1 parent c6d543f commit 33329ff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sources/reference/api/experiment.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,12 +787,16 @@ Configurations MAY be retrieved from the environment. In that case, they must be
787787
declared as a JSON object with a `type` property set to `"env"`. The
788788
environment variable MUST be declared in the `key` property as a JSON string.
789789

790+
The `default` key is OPTIONAL and MAY be used when the environment variable
791+
can be undefined and fallback to a default value for the experiment.
792+
790793
```json
791794
{
792795
"configuration": {
793796
"vault_address": {
794797
"type": "env",
795-
"key": "VAULT_ADDR"
798+
"key": "VAULT_ADDR",
799+
"default": "https://127.0.0.1:8200"
796800
}
797801
}
798802
}

0 commit comments

Comments
 (0)