Skip to main content

Terraform Context

Whatโ€‹

Display the currently active Terraform Workspace name.

caution

This requires a terraform binary in your PATH and will only show in directories that contain a .terraform subdirectory.

Sample Configurationโ€‹

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

Propertiesโ€‹

NameTypeDefaultDescription
fetch_versionbooleanfalsefetch the version information from versions.tf, main.tf or terraform.tfstate

Template (info)โ€‹

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

Propertiesโ€‹

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