pearcec/Invoke-Terraform

Provide a binary without a version reference in the filename

Closed this issue · 0 comments

Describe the solution you'd like

A best recommended practice is to remove all version of terraform from the PATH and let the terraform alias handle the invocation. But here are times when other projects need to call and reference a binary. For example in vscode-terraform. This breaks vscode-terraform. It is possible to reference the version installed, but it is not easily transparent the location of the binary Invoke-Terraform installs. Additionally a user might preferred to reference what is consider the "latest".

  • Best practice is to remove terraform binaries from your path
  • Update README.md with a code snippet for vscode
  • Get cmdlet - get the path of the non-versioned binary
  • Set cmdlet - Sets the version of the non-version binary (and installs if needed)
  • If Switch-TerraformVersion is called and AutoStableBinary is $true it also switches the non-versioned binary (ie stable binary)