|
54 | 54 | --rsh <bin>
|
55 | 55 | Specifies the remote shell for remote installation. Defaults to ssh.
|
56 | 56 |
|
57 |
| - --install-terraform |
| 57 | + --with-terraform |
58 | 58 | Installs Terraform binary from https://releases.hashicorp.com/terraform/1.3.4/ source
|
59 | 59 | alongside coder.
|
60 | 60 | This is great for if you are having issues with Coder installing terraform, or if you
|
@@ -221,7 +221,7 @@ main() {
|
221 | 221 | usage
|
222 | 222 | exit 0
|
223 | 223 | ;;
|
224 |
| - --install-terraform) |
| 224 | + --with-terraform) |
225 | 225 | METHOD=install_terraform
|
226 | 226 | ;;
|
227 | 227 | --)
|
@@ -270,7 +270,7 @@ main() {
|
270 | 270 | # result in a broken coder.
|
271 | 271 | OS=${OS:-$(os)}
|
272 | 272 | ARCH=${ARCH:-$(arch)}
|
273 |
| - TERRA_ARCH=${TERRA_ARCH:-$(terra_arch)} |
| 273 | + TERRAFORM_ARCH=${TERRAFORM_ARCH:-$(terraform_arch)} |
274 | 274 |
|
275 | 275 | distro_name
|
276 | 276 |
|
@@ -377,13 +377,13 @@ install_terraform() {
|
377 | 377 | echoerr "Please install unzip to use this function"
|
378 | 378 | exit 1
|
379 | 379 | fi
|
380 |
| - |
381 |
| - echoh "Installing Terraform version 1.3.4 $TERRA_ARCH package from Hashicorp Source." |
| 380 | + TERRAFORM_VERSION="1.3.4" |
| 381 | + echoh "Installing Terraform version $TERRAFORM_VERSION $TERRAFORM_ARCH package from Hashicorp Source." |
382 | 382 | echoh
|
383 | 383 |
|
384 | 384 | # Download from offical source and save it to cache
|
385 |
| - fetch "https://releases.hashicorp.com/terraform/1.3.4/terraform_1.3.4_${OS}_${TERRA_ARCH}.zip" \ |
386 |
| - "$CACHE_DIR/terraform_1.3.4_${OS}_${TERRA_ARCH}.zip" |
| 385 | + fetch "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_1.3.4_${OS}_${TERRAFORM_ARCH}.zip" \ |
| 386 | + "$CACHE_DIR/terraform_${TERRAFORM_VERSION}_${OS}_${TERRAFORM_ARCH}.zip" |
387 | 387 |
|
388 | 388 | sh_c mkdir -p "$TERRAFORM_INSTALL_PREFIX" 2>/dev/null || true
|
389 | 389 |
|
@@ -580,7 +580,7 @@ arch() {
|
580 | 580 |
|
581 | 581 | # The following is to change the naming, that way people with armv7 won't recieve a error
|
582 | 582 | # List of binaries can be found here: https://releases.hashicorp.com/terraform/1.3.4/
|
583 |
| -terra_arch() { |
| 583 | +terraform_arch() { |
584 | 584 | uname_m=$(uname -m)
|
585 | 585 | case $uname_m in
|
586 | 586 | aarch64) echo arm64 ;;
|
|
0 commit comments