Instruqt Docs
  • ๐ŸšฉGetting started
    • Overview
    • Setting up
      • Study Room
    • Quickstart
  • ๐Ÿ›ค๏ธTracks
    • Manage tracks
      • Create tracks
      • Edit locally
      • Test tracks
      • Track logs
      • Track time limits
      • Track feedback
      • Developer workflow
      • Track tags
      • Track authors
      • Delete tracks
      • Custom layouts
      • Version control
      • Loading experience
    • Challenges
      • Create challenges
      • Challenge tabs
      • Challenge order
      • Skip challenges
      • Add quizzes
      • Assignment display
      • Assignment editor
    • Share tracks
      • Live Events
        • Instructor tools
      • Track invites
      • Embed tracks
      • Landing pages
  • ๐Ÿ–๏ธSandboxes
    • Overview
    • Sandbox hosts
      • Add hosts
      • Custom VM images
      • Custom container images
      • Public images
      • Windows VMs
      • Website service
      • SSL certificates
    • Cloud accounts
      • Securing your cloud accounts
      • Cloud Client
      • AWS accounts
        • AWS Environment Variables
        • AWS Managed Policies
        • AWS IAM Policies
        • AWS SCP Policies
      • Azure subscriptions
        • Azure Environment Variables
        • Azure Roles
        • Azure Resource Providers
      • GCP projects
        • GCP Environment Variables
        • GCP IAM Permissions
    • Lifecycle scripts
      • Scripting overview
      • Track scripts
      • Challenge scripts
      • Example scripts
      • Helper scripts
    • UI Checks
    • Global Sandbox Settings
      • Hot start
      • Sandbox presets
      • Custom resources
      • Cloud services and regions
        • Allowed services and regions
    • Secrets and variables
      • Runtime variables
      • Runtime parameters
      • Secrets
  • โš™๏ธSettings
    • Integrations
      • Salesforce (Beta)
      • HubSpot (Beta)
      • HubSpot (Using zapier)
      • LTI
      • Version control
        • GitHub
    • Authentication
      • SSO
      • API keys
    • Platform
      • API
      • Webhooks
      • Track limits
  • ๐Ÿ’กReference
    • Feature overview
    • Instruqt CLI
      • Commands
      • Configuration files
      • Assets
    • Instruqt platform
      • Networking
      • Host machine types
      • Quotas and limits
      • Roles and permissions
      • Network access
      • Requirements
  • ๐Ÿ›ŸResources
    • Content design tips
    • Advanced use cases
    • Templates
    • FAQ
      • Running Windows Client Hosts on Instruqt
      • Using Cleanup Scripts in SaaS and Cloud Environments
      • Instruqt Regional Configurations and Restrictions
      • Troubleshooting Instruqt CLI Authentication Issues
      • Copy a Track from One Organization to Another via CLI
      • Network Configuration: IP and MAC Address Control
      • Container Troubleshooting in Instruqt
Powered by GitBook
On this page
  • Overview
  • Configure runtime parameters

Was this helpful?

Edit on GitHub
  1. Sandboxes
  2. Secrets and variables

Runtime parameters

Inject parameters at runtime to alter tracks.

PreviousRuntime variablesNextSecrets

Last updated 1 year ago

Was this helpful?

Overview

Runtime parameters are key/value pairs that are injected as environment variables into . The values for runtime parameters can be hard coded values, or sensitive values fetched from our feature.

Runtime parameters are only injected during lifecycle script executions and are by default not stored in / accessible via containers or virtual machines.

Runtime parameters specified when starting a track via the API will override the values configured on an invite if there are duplicate keys.

Configure runtime parameters

Select the sharing method appropriate to your use case.

  1. Copy the of the track you want to add runtime parameters to.

  2. Append rtp_<name>=<value> or rts_<name>=<value> to the URL for runtime parameters and secrets, respectively. In either case, the <name> value will be available as an environment variable in lifecycle scripts.

The following example sets an environment variable called USER_ID to the value testuser and an environment variable called API_KEY to the value in the configured in the secret named SECRET_API_KEY.

https://play.instruqt.com/embed/TEAM/tracks/EXAMPLE?token=TOKEN&rtp_USER_ID=testuser&rts_API_KEY=SECRET_API_KEY
  1. Select the invite you want to add runtime parameters to. Learn how to create invites .

  2. Below the Add content section, beside Advanced options, click +Runtime parameters.

  3. Click the Add secret or Add variable buttons to add a secret or variable parameters.

    • For Secrets you will input a key (any name you like) and select a value (an existing secret)

    • For Variables you will input a key and a value.

  4. Repeat as needed, adding as many parameters as needed.

  5. Click Save changes in the bottom-left corner.

To specify runtime parameters in track tests, use the --runtime-parameters flag where the value is a comma delimited list of key/value pairs separated by an = sign.

To specify runtime secrets use the --runtime-secrets flag where the value is a comma delimited list of key/value pairs separated by an = sign and the value part is the name of a secret.

The following example sets an environment variable called USER_ID to the value testuser and an environment variable called API_KEY to the value in the configured in the secret named SECRET_API_KEY.

instruqt track test TEAM/TRACK --runtime-parameters=USER_ID=testuser --runtime-secrets=API

If you are making use of tracks, runtime parameters will not be available in the sandbox setup script. Tracks that need to be hot started and make use of runtime parameters should do setup in the first challenges setup script.

๐Ÿ–๏ธ
lifecycle scripts
secrets
embed URL
here
hot start