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}}"
}

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)