From 1bcae2dffc68a2e746510dccedfa2703655a8817 Mon Sep 17 00:00:00 2001 From: zoeyTM Date: Tue, 1 Oct 2024 02:18:31 -0400 Subject: [PATCH] add global parameters to docs --- .../content/ignition/docs/guides/deploy.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/src/content/ignition/docs/guides/deploy.md b/docs/src/content/ignition/docs/guides/deploy.md index 852c533d12..53f10b0042 100644 --- a/docs/src/content/ignition/docs/guides/deploy.md +++ b/docs/src/content/ignition/docs/guides/deploy.md @@ -40,6 +40,12 @@ An example file could be called `./ignition/parameters.json` and contain the fol } ``` +:::tip + +`JSON5` format is also supported for parameter files! + +::: + This makes the `name` parameter for the `Apollo` module be `"Saturn V"`. To execute a deployment using parameters, you need to use the `--parameters` argument, like this: @@ -74,6 +80,21 @@ To pass a `bigint` as a Module parameter, you can encode it as a string. Any str } ``` +You can also define global parameters that will be available to all modules. To do this, define a `$global` key in the parameters file: + +```json +{ + "$global": { + "shouldBeAllowed": true + }, + "MyModule": { + "shouldBeAllowed": false + } +} +``` + +In this example, the `shouldBeAllowed` parameter will be `true` for all modules except `MyModule`, where it will be `false`. Global parameters can be accessed in the same way as module parameters. + ## Inspecting an existing deployment To get a list of all the deployment IDs that exist in the current project, run: