Skip to main content

Terraform Context

Whatโ€‹

Display the currently active Terraform Workspace name.

Sample Configurationโ€‹

{
"type": "terraform",
"style": "powerline",
"powerline_symbol": "๎‚ฐ",
"foreground": "#000000",
"background": "#ebcc34",
"template": " ๎šš {{.WorkspaceName}}"
}

Optionsโ€‹

NameTypeDefaultDescription
fetch_versionbooleanfalsefetch the version information from versions.tf, main.tf or terraform.tfstate
commandstringterraformthe command(s) to run, allows support for tofu

Template (info)โ€‹

default template
 {{ .WorkspaceName }}{{ if .Version }} {{ .Version }}{{ end }}

Propertiesโ€‹

NameTypeDescription
.WorkspaceNamestringis the current workspace name
.Versionstringterraform version (set fetch_version to true)