pwillis-els / terraformsh

A wrapper for Terraform in Bash
MIT License
66 stars 12 forks source link

Fix validating options #7

Closed pwillis-els closed 2 years ago

pwillis-els commented 2 years ago

I finally got around to testing Terraform 1.0 a little, and validate has finally started dying if you pass '-var-file'. This change will only pass '-var-file' to validate command if the version of Terraform is below 0.12.

Also, terraformsh was supposed to pass arbitrary command-line options to the terraform command if they didn't match a known terraform command name. However, the functions were not actually using the "$@" being passed to them with the options. This fixes the commands to use "$@". For example, now it should correctly use the following:

  terraformsh plan -compact-warnings