Editor
Editor
The editor
resource represents a target that a tab in the layout can point at.
It contains all the configuration that the participants proxy needs to route to the target service behind it.
resource "editor" "name" {
...
}
Attributes
Workspaces workspace
type: []block
Workspace
Directory trees that are exposed as workspaces in the editor.
workspace "config" {
target = resource.container.vault
directory = "/etc/vault"
}
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
Workspace
resource "editor" "name" {
workspace "name" {
...
}
}
Attributes
Name name
required
type: string
The name of the workspace.
workspace "name" {
...
}
Directory directory
required
type: string
The directory to open in the workspace.
directory = "/etc/vault"
Target target
type: Reference to Container
The target host that the directory should be opened on.
target = resource.container.vault
Computed Attributes
These attributes are computed when the config is parsed and applied, and are therefore only known at parsetime or runtime.
Examples
Full Example
resource "editor" "code" {
workspace "assets" {
directory = "files"
}
workspace "vault_config" {
target = resource.container.ubuntu
directory = "/etc/vault.d"
}
}
Last updated