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

Was this helpful?

Edit on GitHub
  1. Sandboxes

Secrets and variables

PreviousAllowed services and regionsNextRuntime variables

Last updated 1 month ago

Was this helpful?

It is sometimes the case that tracks needs to be configured differently depending on a particular audience or implementation. To facilitate this, you can add Runtime Parameters when starting tracks.

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

Currently, runtime parameters can only be configured on track invites. In a future release, we will add runtime parameters to other track start mechanisms, such as the instruqt track test command, embeds and hot start.

Runtime parameters are only injected during 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. * If you are making use of hot start pools to prestart tracks runtime parameters 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.

How to configure runtime parameters

Add runtime parameters to a track invite via the UI

  1. Start by creating an invite or having an existing invite ready to edit, instruction on how to create an invite can be found in the track invites .

  2. If you would like to make use of secrets to inject sensitive credentials into your track ensure you have a secret available by following the secrets .

  3. Once you have an invite and secret to work with navigate to the edit page of the invite you would like to configure.

  4. Below the Add content section, click +Runtime parameters. ↳ Instruqt shows the Runtime Parameters section.

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

    • For both options you can define the Key of the parameter, which will be the name of the environment variable in the scripts

    • For Secrets you can select the secret that will be used

    • For Variables you can enter any value

  6. To add another parameter, repeat step 5 above.

  7. Save your invite by clicking the save changes button at the bottom of the page

  8. You are now able to make use of the environment variables defined on the invite in you tracks lifecycle scripts. For more information of lifecycle scripts have a look at the .

You can specify runtime parameters and secrets as part of the instruqt track test command. To specify runtime variables 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 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_KEY=SECRET_API_KEY

You can specify runtime parameters as part of the URL query parameters for embedded tracks. Any parameters prefixed with rtp_ will be injected as environment variables where the suffix will be the variable name and the value the variable value. Any parameters prefixed with rts_ will be injected as environment variables where the suffix is the variable name and the value is the secret from which the sensitive value should be fetched.

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

Coming soon ...

🏖️
secrets
lifecycle
guide
guide
guide