Chapter chapter
Bundles chapter resources together so it can be displayed in the docs resource.
Properties
- Name
title- Type
- (string: "")
- Required
- Readonly
- Description
The title of the chapter.
- Name
page- Type
- (page: {})
- Required
- required
- Readonly
- Description
A page to include in the chapter.
This stanza can be specified multiple times.
- Name
prerequisites- Type
- ([]string: [])
- Required
- Readonly
- Description
A list containing the IDs of
chapterresources that need to be completed before the tasks in this chapter unlock.
- Name
tasks- Type
- (map[string]#task: map[]{})
- Required
- Readonly
- Description
Allows you to include tasks in the pages of the chapter.
The key will be the ID that you can reference in the
Taskcomponent within the content. The value is a reference to the ID of ataskresource.
- Name
index- Type
- (string: "")
- Required
- Readonly
- readonly
- Description
A JSON index generated from the pages of the chapter.
Page page
A page containing content and tasks.
The first h1 (# Title) header in the content will be used as the title of the page.
- Name
id- Type
- (string: "")
- Required
- Readonly
- Description
The ID of the page.
- Name
content- Type
- (string: "")
- Required
- Readonly
- Description
The content of the page.
Examples
resource "chapter" "installation" {
title = "Install terraform"
tasks = {
manual_installation = resource.task.manual_installation
verify_installation = resource.task.verify_installation
terraform_version = resource.task.terraform_version
}
page "manual_installation" {
content = file("docs/installation/manual_installation.mdx")
}
page "verify_installation" {
content = file("docs/installation/verify_installation.mdx")
}
page "terraform_version" {
content = file("docs/installation/terraform_version.mdx")
}
}