d79086bc87a8728121526081ad8b81e635904f55

Author
Matt Lewin <matt@mogroups.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Update terraform plugin with v0.11.7 commands and help (#6834)

Diff

This diff is truncated to protect this page.

  1diff --git a/plugins/terraform/README.md b/plugins/terraform/README.md
  2index 46855e4172a9e5770db7ab88840eacfcc01ac0c9..e5d9e47b667d68058dffcdd7eb96a55c4addba0b 100644
  3--- a/plugins/terraform/README.md
  4+++ b/plugins/terraform/README.md
  5@@ -1,7 +1,9 @@
  6-## atom
  7+## Terraform oh-my-zsh plugin
  8 
  9 Plugin for Terraform, a tool from Hashicorp for managing infrastructure safely and efficiently.
 10 
 11+Current as of Terraform v0.11.7
 12+
 13 ### Requirements
 14 
 15  * [Terraform](https://terraform.io/)
 16@@ -12,8 +14,8 @@ Plugin for Terraform, a tool from Hashicorp for managing infrastructure safely a
 17 
 18 ### Expanding ZSH prompt with current Terraform workspace name
 19 
 20-If you want to get current Terraform workspace name in your ZSH prompt open 
 21-your .zsh-theme file and in a choosen place insert:
 22+If you want to get current Terraform workspace name in your ZSH prompt open
 23+your .zsh-theme file and in a chosen place insert:
 24 
 25 ```
 26 $FG[045]\
 27diff --git a/plugins/terraform/_terraform b/plugins/terraform/_terraform
 28index 285d83ec7e1b84501ef9c28a61d49a6c2b31d050..1d1315a8ace23de7434782432ab8db8097dc09e0 100644
 29--- a/plugins/terraform/_terraform
 30+++ b/plugins/terraform/_terraform
 31@@ -3,91 +3,151 @@
 32 local -a _terraform_cmds
 33 _terraform_cmds=(
 34     'apply:Builds or changes infrastructure'
 35+    'console:Interactive console for Terraform interpolations'
 36     'destroy:Destroy Terraform-managed infrastructure'
 37+    'fmt:Rewrites config files to canonical format'
 38     'get:Download and install modules for the configuration'
 39     'graph:Create a visual graph of Terraform resources'
 40-    'init:Initializes Terraform configuration from a module'
 41+    'import:Import existing infrastructure into Terraform'
 42+    'init:Initialize a Terraform working directory'
 43     'output:Read an output from a state file'
 44     'plan:Generate and show an execution plan'
 45-    'pull:Refreshes the local state copy from the remote server'
 46-    'push:Uploads the local state to the remote server'
 47+    'providers:Prints a tree of the providers used in the configuration'
 48+    'push:Upload this Terraform module to Atlas to run'
 49     'refresh:Update local state file against real resources'
 50-    'remote:Configures remote state management'
 51     'show:Inspect Terraform state or plan'
 52-    'taint:Manually forcing a destroy and recreate on the next plan/apply'
 53+    'taint:Manually mark a resource for recreation'
 54+    'untaint:Manually unmark a resource as tainted'
 55+    'validate:Validates the Terraform files'
 56     'version:Prints the Terraform version'
 57+    'workspace:Workspace management'
 58 )
 59 
 60 __apply() {
 61     _arguments \
 62-        '-auto-approve[Skip interactive approval of plan before applying.]' \
 63         '-backup=[(path) Path to backup the existing state file before modifying. Defaults to the "-state-out" path with ".backup" extension. Set to "-" to disable backup.]' \
 64+        '-auto-approve[Skip interactive approval of plan before applying.]' \
 65+        '-lock=[(true) Lock the state file when locking is supported.]' \
 66+        '-lock-timeout=[(0s) Duration to retry a state lock.]' \
 67         '-input=[(true) Ask for input for variables if not directly set.]' \
 68-        '-no-color[If specified, output will not contain any color.]' \
 69+        '-no-color[If specified, output wil be colorless.]' \
 70+        '-parallelism=[(10) Limit the number of parallel resource operations.]' \
 71         '-refresh=[(true) Update state prior to checking for differences. This has no effect if a plan file is given to apply.]' \
 72-        '-state=[(path) Path to read and save state (unless state-out is specified). Defaults to "terraform.tfstate".]' \
 73+        '-state=[(terraform.tfstate) Path to read and save state (unless state-out is specified).]' \
 74         '-state-out=[(path) Path to write state to that is different than "-state". This can be used to preserve the old state.]' \
 75-        '-target=[(resource) A Resource Address to target. Operation will be limited to this resource and its dependencies. This flag can be used multiple times.]' \
 76+        '-target=[(resource) Resource to target. Operation will be limited to this resource and its dependencies. This flag can be used multiple times.]' \
 77         '-var[("foo=bar") Set a variable in the Terraform configuration. This flag can be set multiple times.]' \
 78-        '-var-file=[(path) Set variables in the Terraform configuration from a file. If "terraform.tfvars" is present, it will be automatically loaded if this flag is not specified.]'
 79+        '-var-file=[(foo) Set variables in the Terraform configuration from a file. If "terraform.tfvars" or any ".auto.tfvars" files are present, they will be automatically loaded.]'
 80+}
 81+
 82+__console() {
 83+    _arguments \
 84+        '-state=[(terraform.tfstate) Path to read state.]' \
 85+        '-var[("foo=bar") Set a variable in the Terraform configuration. This flag can be set multiple times.]' \
 86+        '-var-file=[(foo) Set variables in the Terraform configuration from a file. If "terraform.tfvars" or any ".auto.tfvars" files are present, they will be automatically loaded.]'
 87 }
 88 
 89 __destroy() {
 90     _arguments \
 91         '-backup=[(path) Path to backup the existing state file before modifying. Defaults to the "-state-out" path with ".backup" extension. Set to "-" to disable backup.]' \
 92-        '-force[If set, then the destroy confirmation will not be shown.]' \
 93-        '-input=[(true) Ask for input for variables if not directly set.]' \
 94-        '-no-color[If specified, output will not contain any color.]' \
 95+        '-auto-approve[Skip interactive approval before destroying.]' \
 96+        '-force[Deprecated: same as auto-approve.]' \
 97+        '-lock=[(true) Lock the state file when locking is supported.]' \
 98+        '-lock-timeout=[(0s) Duration to retry a state lock.]' \
 99+        '-no-color[If specified, output will contain no color.]' \
100+        '-parallelism=[(10) Limit the number of concurrent operations.]' \
101         '-refresh=[(true) Update state prior to checking for differences. This has no effect if a plan file is given to apply.]' \
102-        '-state=[(path) Path to read and save state (unless state-out is specified). Defaults to "terraform.tfstate".]' \
103+        '-state=[(terraform.tfstate) Path to read and save state (unless state-out is specified).]' \
104         '-state-out=[(path) Path to write state to that is different than "-state". This can be used to preserve the old state.]' \
105-        '-target=[(resource) Instead of affecting "dependencies" will instead also destroy any resources that depend on the target(s) specified.]' \
106+        '-target=[(resource) Resource to target. Operation will be limited to this resource and its dependencies. This flag can be used multiple times.]' \
107         '-var[("foo=bar") Set a variable in the Terraform configuration. This flag can be set multiple times.]' \
108-        '-var-file=[(path) Set variables in the Terraform configuration from a file. If "terraform.tfvars" is present, it will be automatically loaded if this flag is not specified.]'
109+        '-var-file=[(foo) Set variables in the Terraform configuration from a file. If "terraform.tfvars" or any ".auto.tfvars" files are present, they will be automatically loaded.]'
110+}
111+
112+__fmt() {
113+    _arguments \
114+        '-list=[(true) List files whose formatting differs (always false if using STDIN)]' \
115+        '-write=[(true) Write result to source file instead of STDOUT (always false if using STDIN or -check)]' \
116+        '-diff=[(false) Display diffs of formatting changes]' \
117+        '-check=[(false) Check if the input is formatted. Exit status will be 0 if all input is properly formatted and non-zero otherwise.]'
118 }
119 
120 __get() {
121     _arguments \
122-        '-update=[(false) If true, modules already downloaded will be checked for updates and updated if necessary.]'
123+        '-update=[(false) If true, modules already downloaded will be checked for updates and updated if necessary.]' \
124+        '-no-color[If specified, output will contain no color.]'
125 }
126 
127 __graph() {
128     _arguments \
129         '-draw-cycles[Highlight any cycles in the graph with colored edges. This helps when diagnosing cycle errors.]' \
130-        '-module-depth=[(n) The maximum depth to expand modules. By default this is zero, which will not expand modules at all.]' \