Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update injecting-values.md: mention other jsonnet import options #956

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/docs/jsonnet/injecting-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ There are three ways of doing so:
Also check out the [official Jsonnet docs on this
topic](https://jsonnet.org/ref/language.html#passing-data-to-jsonnet).

## JSON files
## Local files

Jsonnet is a superset of JSON, it treats any JSON as valid Jsonnet. Because many
systems can be told to output their data in JSON format, this provides a pretty
Expand All @@ -38,6 +38,9 @@ local secrets = import "secrets.json";
> use it with untrusted code.
> A safer, but more verbose, alternative is `std.parseJson(importstr 'path_to_json.json')`

You can also inject utf-8 strings or binary files directly, with `importstr` and `importbin`.
See the [Jsonnet docs on imports](https://jsonnet.org/learning/tutorial.html#imports) for more details.

## External variables

Another way of passing values from the outside are external variables, which are specified like so:
Expand Down