Skip to main content

GCP Context

What

Display the currently active GCP project, region and account

Sample Configuration

{
"type": "gcp",
"style": "powerline",
"powerline_symbol": "",
"foreground": "#ffffff",
"background": "#47888d",
"template": "  {{.Project}} :: {{.Account}} "
}

Template (info)

default template
{{ if .Error }}{{ .Error }}{{ else }}{{ .Project }}{{ end }}

Properties

NameTypeDescription
.Projectstringthe currently active project
.Accountstringthe currently active account
.Regionstringdefault region for the active context
.ActiveConfigstringthe active configuration name
.Errorstringcontains any error messages generated when trying to load the GCP config