coder icon indicating copy to clipboard operation
coder copied to clipboard

feat: add `--install-terraform` command-line flag to enable or disable automatic tf installation

Open johnstcn opened this issue 3 years ago • 0 comments

Problem

When initializing the Terraform provisioner, we initially check to see if the Terraform binary is installed.

https://github.com/coder/coder/blob/43f368dfc4a0192c1e4772f535e6be59bbcdee50/provisioner/terraform/serve.go#L87

If it is not installed, we install it on demand "automagically". This can lead to strange issues, and is a red flag for folks who want to install Coder in an air-grapped environment. It also increases startup time and isn't a great experience for folks with slow or unstable connections.

Proposed Solution

Add a --install-terraform=(true|false) command-line flag to control the auto-download-terraform behaviour. Default to the current auto-download behaviour, allow switching off.

Additionally, if we fail to find the Coder binary in $PATH, we should show details of where we looked as it's currently not clear.

johnstcn avatar Sep 12 '22 10:09 johnstcn