Layout
Layout
The layout resource defines the layout of the lab UI through rows and columns. These "panels" are referenced by id from the available tabs in a lab. This allows us to make layouts reusable.
resource "layout" "name" {
...
}
Attributes
Columns column
type: []block
Column
The vertical columns the layout is divided into.
column "left_panel" {
...
}
Computed Attributes
These attributes are computed when the config is parsed and applied, and are therefore only known at parsetime or runtime.
Meta ID meta.id
string
The full ID of the resource e.g. `resource.type.name`. This is computed from the full resource path:
// given the following resource
resource "container" "ubuntu" {
...
}
// the resulting id will be
resource.container.ubuntu
Meta Type meta.type
string
The type of the resource. This taken from the type label of the resource definition.
// given the following resource
resource "container" "ubuntu" {
...
}
// the resulting type will be
container
Meta Name meta.name
string
The name of the resource. This taken from the name label of the resource definition.
// given the following resource
resource "container" "ubuntu" {
...
}
// the resulting name will be
ubuntu
Column
A column is vertical panel within the layout.
resource "layout" "name" {
column "name" {
...
}
}
Attributes
ID id
required
type: string
The ID of the panel that will be referenced by the tabs.
column "id" {
...
}
Width width
type: string
The width of a column can be specified in percentages.
width = "50%"
Rows row
type: []block
Row
The horizontal rows the column is divided into.
row "top_left_panel" {
...
}
Computed Attributes
These attributes are computed when the config is parsed and applied, and are therefore only known at parsetime or runtime.
Row
A row is horizontal panel within the layout.
resource "layout" "name" {
column "name" {
row "name" {
...
}
}
}
Attributes
ID id
required
type: string
The ID of the panel that will be referenced by the tabs.
row "id" {
...
}
Height height
type: string
The height of a row can be specified in percentages.
height = "50%"
Columns column
type: []block
Column
The vertical columns the row is divided into.
column "top_left_left_panel" {
...
}
Computed Attributes
These attributes are computed when the config is parsed and applied, and are therefore only known at parsetime or runtime.
Examples
Minimal
resource "layout" "minimal" {
column "terminal" {}
column "instructions" {}
}
Last updated