Back to Oh My Posh

Terraform Context

website/docs/segments/cli/terraform.mdx

29.12.01.5 KB
Original Source

What

Display the currently active Terraform Workspace name.

Sample Configuration

import Config from "@site/src/components/Config.js";

<Config data={{ type: "terraform", style: "powerline", powerline_symbol: "\uE0B0", foreground: "#000000", background: "#ebcc34", template: " \ue69a {{.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)

:::note default template

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

:::

Properties

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