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โ
- json
- yaml
- toml
{
"type": "terraform",
"style": "powerline",
"powerline_symbol": "๎ฐ",
"foreground": "#000000",
"background": "#ebcc34",
"template": "{{.WorkspaceName}}"
}
type: terraform
style: powerline
powerline_symbol: ๎ฐ
foreground: "#000000"
background: "#ebcc34"
template: "{{.WorkspaceName}}"
type = "terraform"
style = "powerline"
powerline_symbol = "๎ฐ"
foreground = "#000000"
background = "#ebcc34"
template = "{{.WorkspaceName}}"
Propertiesโ
Name | Type | Default | Description |
---|---|---|---|
fetch_version | boolean | false | fetch the version information from versions.tf , main.tf or terraform.tfstate |
Template (info)โ
default template
{{ .WorkspaceName }}{{ if .Version }} {{ .Version }}{{ end }}
Propertiesโ
Name | Type | Description |
---|---|---|
.WorkspaceName | string | is the current workspace name |
.Version | string | terraform version (set fetch_version to true ) |