diff --git a/README.md b/README.md index 7912228c..e5b5475f 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ version = "0.11.3" #### *Instead of a `.tfswitchrc` file, a `.terraform-version` file may be used for compatibility with [`tfenv`](https://github.com/tfutils/tfenv#terraform-version-file) and other tools which use it* ### Use terragrunt.hcl file -If a terragrunt.hcl file with the terraform constrain is included in the current directory, it should automatically download or switch to that terraform version. For example, the following should automatically switch terraform to the lastest version: +If a terragrunt.hcl file with the terraform constrain is included in the current directory, it should automatically download or switch to that terraform version. For example, the following should automatically switch terraform to the lastest version 0.13: ```ruby terragrunt_version_constraint = ">= 0.26, < 0.27" terraform_version_constraint = ">= 0.13, < 0.14" diff --git a/main.go b/main.go index 1ce7f77f..2842bbaa 100644 --- a/main.go +++ b/main.go @@ -58,7 +58,7 @@ func main() { custBinPath := getopt.StringLong("bin", 'b', defaultBin, "Custom binary path. Ex: /Users/username/bin/terraform") listAllFlag := getopt.BoolLong("list-all", 'l', "List all versions of terraform - including beta and rc") latestPre := getopt.StringLong("latest-pre", 'p', defaultLatest, "Latest pre-release implicit version. Ex: tfswitch --latest-pre 0.13 downloads 0.13.0-rc1 (latest)") - latestStable := getopt.StringLong("latest-stable", 's', defaultLatest, "Latest implicit version. Ex: tfswitch --latest 0.13 downloads 0.13.5 (latest)") + latestStable := getopt.StringLong("latest-stable", 's', defaultLatest, "Latest implicit version. Ex: tfswitch --latest-stable 0.13 downloads 0.13.7 (latest)") latestFlag := getopt.BoolLong("latest", 'u', "Get latest stable version") versionFlag := getopt.BoolLong("version", 'v', "Displays the version of tfswitch") helpFlag := getopt.BoolLong("help", 'h', "Displays help message") diff --git a/www/docs/Quick-Start.md b/www/docs/Quick-Start.md index 0ca136e3..8d08cf07 100644 --- a/www/docs/Quick-Start.md +++ b/www/docs/Quick-Start.md @@ -81,6 +81,14 @@ version = "0.11.3" *Instead of a `.tfswitchrc` file, a `.terraform-version` file may be used for compatibility with [`tfenv`](https://github.com/tfutils/tfenv#terraform-version-file) and other tools which use it* +### Use terragrunt.hcl file +If a terragrunt.hcl file with the terraform constrain is included in the current directory, it should automatically download or switch to that terraform version. For example, the following should automatically switch terraform to the lastest version 0.13: +```ruby +terragrunt_version_constraint = ">= 0.26, < 0.27" +terraform_version_constraint = ">= 0.13, < 0.14" +... +``` + **Automatically switch with bash** Add the following to the end of your `~/.bashrc` file: