2018-05-17 22:18:20 +08:00
|
|
|
## Terraform oh-my-zsh plugin
|
2015-08-05 02:42:28 +08:00
|
|
|
|
|
|
|
Plugin for Terraform, a tool from Hashicorp for managing infrastructure safely and efficiently.
|
|
|
|
|
2020-09-30 16:50:33 +08:00
|
|
|
Current as of Terraform v0.13
|
2018-05-17 22:18:20 +08:00
|
|
|
|
2015-08-05 02:42:28 +08:00
|
|
|
### Requirements
|
|
|
|
|
2015-08-05 03:54:01 +08:00
|
|
|
* [Terraform](https://terraform.io/)
|
2015-08-05 02:42:28 +08:00
|
|
|
|
|
|
|
### Usage
|
|
|
|
|
2019-06-26 21:20:41 +08:00
|
|
|
To use it, add `terraform` to the plugins array of your `~/.zshrc` file:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
plugins=(... terraform)
|
|
|
|
```
|
|
|
|
|
2015-08-05 02:42:28 +08:00
|
|
|
* Type `terraform` into your prompt and hit `TAB` to see available completion options
|
2020-09-30 16:50:33 +08:00
|
|
|
* Type `tf` into your prompt as a short alias to `terraform`
|
2017-11-07 23:45:25 +08:00
|
|
|
|
|
|
|
### Expanding ZSH prompt with current Terraform workspace name
|
|
|
|
|
2018-05-17 22:18:20 +08:00
|
|
|
If you want to get current Terraform workspace name in your ZSH prompt open
|
|
|
|
your .zsh-theme file and in a chosen place insert:
|
2017-11-07 23:45:25 +08:00
|
|
|
|
2019-06-26 21:20:41 +08:00
|
|
|
```shell
|
|
|
|
PROMPT=$'%{$fg[white]%}$(tf_prompt_info)%{$reset_color%} '
|
2017-11-07 23:45:25 +08:00
|
|
|
```
|