blueprints: add !Context to lookup things from instance context

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-08-06 20:54:00 +02:00
parent 0227ba90bb
commit dcbf106daa
6 changed files with 53 additions and 3 deletions

View File

@ -21,6 +21,12 @@ Example: `configure_flow: !Find [authentik_flows.flow, [slug, default-password-c
Looks up any model and resolves to the the matches' primary key.
First argument is the model to be queried, remaining arguments are expected to be pairs of key=value pairs to query for.
#### `!Context`
Example: `configure_flow: !Context foo`
Find values from the context. Can optionally be called with a default like `!Context [foo, default-value]`.
## Structure
```yaml
@ -32,6 +38,9 @@ metadata:
labels:
foo: bar
name: example-blueprint
# Optional default context, instance context is merged over this.
context:
foo: bar
# List of entries (required)
entries:
- # Model in app.model notation, possibilities are listed in the schema (required)