Dynamic Values
The Dynamic Values tab is where you manage the values your lab computes with, injects, or exposes at runtime: secrets, variables, locals, and outputs. Each one corresponds to an HCL resource type of the same name. This is the place to create and edit them without writing HCL directly.
The four types
Section titled “The four types”| Type | Use it to | Reference |
|---|---|---|
| Secret | Inject a team-managed secret into the lab. | secret |
| Variable | Declare a configurable input for the lab. | variable |
| Local | Define a reusable local expression. | local |
| Output | Expose a value computed by the lab. | output |
Each entry lives in the sidebar under its type, alongside a search box and an Add value menu (hidden outside edit mode) for creating a new one.
Adding a value
Section titled “Adding a value”Every type shares one field: Name (internal), used to reference the value elsewhere in the lab (e.g. variable.api_key), not shown to learners. Beyond that, the fields differ by type:
| Type | Fields |
|---|---|
| Secret | Team secret: pick from your team’s existing secrets (managed outside the lab, under your team’s settings). The lab stores a reference to the secret, not its value. |
| Variable | Description (optional) and Default value. |
| Local | Value, a literal or an HCL expression. |
| Output | Description (optional) and Value. |
Once created, a value can be referenced from other resources using its type and name, e.g. variable.api_key, local.base_url. Secrets are referenced like any other sandbox resource: resource.secret.db_password.value.
System variables
Section titled “System variables”The platform automatically provides several instruqt_-prefixed values at runtime, covering the current session, team, lab, user, and sandbox domain. You can reference any of them, e.g. variable.instruqt_session_id, without declaring a variable for it first. See System Variables for the full list and what each one contains.
Depending on how your lab was created, some of these may already appear in the Variables list with a description starting with Reserved:. That’s just documentation: their actual values always come from the platform at launch, not from whatever default value you set here.
Editing and deleting
Section titled “Editing and deleting”Selecting an existing value from the sidebar opens it: read-only outside edit mode, editable inside it. Deleting a value that’s still referenced elsewhere in the lab isn’t possible. Remove the reference first.
No values yet
Section titled “No values yet”If the lab has no dynamic values at all, the tab shows an empty state with its own Add value action instead of the sidebar list.
Saving changes
Section titled “Saving changes”Dynamic values follow the same save lifecycle as every other resource. See Editing & Publishing. Each add or edit is its own form with Discard changes / Add changes buttons, and nothing is published until you click Publish in the top bar.
