Skip to content

You are viewing documentation for Instruqt 2.0 Labs - our upcoming product releasing in September 2026. For current Tracks documentation, please visitdocs.instruqt.com.

Lab


Defined inmain.hcl

The lab resource defines the main configuration for your lab, including metadata, settings, layout, and content structure. This is equivalent to what was previously called a “track” in legacy formats.

As a lab author, you use the lab resource to define the overall lab experience:

  • Learning Structure: Organize content into logical chapters and pages that guide users through progressive learning experiences
  • Time Management: Configure time limits, extensions, and idle behavior to ensure appropriate pacing for learning objectives
  • Interactive Learning: Structure labs to include tasks, quizzes, and other interactive elements that validate learning outcomes

The lab resource serves as the foundation that ties together all other lab components into a cohesive learning experience.

resource "lab" "name" {
title = "My Lab"
description = "A brief description of what this lab teaches"
layout = resource.layout.two_column
content {
chapter "introduction" {
title = "Getting Started"
page "welcome" {
reference = resource.page.welcome
}
}
}
}
resource "lab" "name" {
title = "My Lab"
description = "A comprehensive description of the lab"
tags = ["docker", "kubernetes", "devops"]
settings {
theme = "modern_dark"
timelimit {
duration = "30m"
extend = "5m"
show_timer = true
}
idle {
enabled = true
timeout = "10m"
show_warning = true
}
controls {
show_stop = true
}
}
layout = resource.layout.default
content {
title = "Lab Instructions"
chapter "chapter1" {
title = "Introduction"
layout = resource.layout.single_column
page "page1" {
title = "Welcome"
layout = resource.layout.two_column
reference = resource.page.welcome
}
}
}
}
lab
├─ title, description, tags (metadata)
├─ layout (reference to default layout)
├─ settings
│ ├─ theme
│ ├─ timelimit
│ │ ├─ duration, extend, show_timer
│ ├─ idle
│ │ ├─ enabled, timeout, show_warning
│ └─ controls
│ └─ show_stop
└─ content
├─ title
└─ chapters[]
├─ title, layout (optional override)
└─ pages[]
├─ title (optional override), layout (optional override)
└─ reference (to page resource)

Fields

FieldTypeRequiredDescription
titlestringLab title displayed to users
descriptionstringThe description introduces your lab to learners. Explain what it covers, its purpose, and any prerequisites or outcomes.
iconstringLab icon image, either an asset path within the assets/ directory or an external URL
languageslist(string)Localization languages supported by this lab (e.g., 'en', 'es', 'ja')
settingsblockLab behavior settings
layoutreferencelayoutDefault layout for the lab
contentblockLab content structure with chapters and pages

Settings

labSettings

Lab behavior settings

FieldTypeRequiredDescription
themestringThemes define the visual style of your lab interface. Choose one that best fits your content and brand.
Allowedmodern-dark original
timelimitblockTime limit configuration
idleblockIdle timeout configuration
controlsblockUI control visibility

Time Limit

labSettingsTime Limit

Time limit configuration

FieldTypeRequiredDescription
durationstringSet how long the lab can run before it automatically shuts down.
extendstringAllow learners to extend their lab session when they reach the time limit.
show_timerboolShow or hide the timer for learners during the lab.
Defaulttrue

Idle Timeout

labSettingsIdle Timeout

Idle timeout configuration

FieldTypeRequiredDescription
enabledboolDefine how long a lab can stay inactive before it stops automatically.
Defaulttrue
timeoutstringIdle time before shutdown (e.g., '30m')
show_warningboolShow warning before timeout
Defaulttrue

Controls

labSettingsControls

UI control visibility

FieldTypeRequiredDescription
show_stopboolControl whether the stop button is visible to learners. Turning it off prevents users from stopping the lab manually.
Defaulttrue

Content

labContent

Lab content structure with chapters and pages

FieldTypeRequiredDescription
titlestringContent section title
chapterblockContent chaptersrepeatable

Chapter

labContentChapter

Content chapters

FieldTypeRequiredDescription
sluglabelChapter slug identifier
titlestringChapter title
layoutreferencelayoutChapter-specific layout override
pageblockPages within this chapterrepeatable
Page

labContentChapterPage

Pages within this chapter

FieldTypeRequiredDescription
sluglabelPage slug identifier
titlestringPage title override
layoutreferencelayoutPage-specific layout override
referencereferencepageReference to the page resource
resource "lab" "basic" {
title = "Docker Basics"
description = "Learn Docker fundamentals"
layout = resource.layout.two_column
content {
chapter "intro" {
title = "Introduction"
page "welcome" {
reference = resource.page.welcome
}
}
}
}
resource "lab" "advanced" {
title = "Kubernetes Deep Dive"
description = "Advanced Kubernetes concepts and practices"
tags = ["kubernetes", "advanced", "devops"]
settings {
theme = "original"
timelimit {
duration = "2h"
extend = "30m"
show_timer = true
}
idle {
timeout = "15m"
}
}
layout = resource.layout.three_column
content {
title = "Course Material"
chapter "setup" {
title = "Environment Setup"
page "requirements" {
reference = resource.page.requirements
}
page "installation" {
reference = resource.page.installation
}
}
chapter "basics" {
title = "Kubernetes Basics"
layout = resource.layout.two_column
page "pods" {
reference = resource.page.pods
}
page "services" {
reference = resource.page.services
}
}
}
}

Layouts are inherited in the following order (most specific wins):

  1. Page-level layout (highest priority)
  2. Chapter-level layout
  3. Lab-level layout (lowest priority)
resource "lab" "example" {
layout = resource.layout.default # Applied to all pages by default
content {
chapter "intro" {
layout = resource.layout.two_column # Overrides lab default for all pages in this chapter
page "welcome" {
reference = resource.page.welcome # Uses chapter layout
}
page "setup" {
layout = resource.layout.three_column # Overrides chapter layout for this page only
reference = resource.page.setup
}
}
}
}
  1. Descriptive Titles: Use clear, descriptive titles for labs and chapters
  2. Appropriate Timeframes: Set realistic time limits based on lab complexity
  3. Tag Consistently: Use consistent tags across labs for better organization
  4. Layout Hierarchy: Use layout inheritance to minimize repetition
  5. Chapter Organization: Group related pages into logical chapters