Skip to content

Fix ARM64 support for old terraform versions#287

Merged
Zordrak merged 3 commits intotfutils:masterfrom
Samusia:samusia/fix_arm64_support
Jul 7, 2022
Merged

Fix ARM64 support for old terraform versions#287
Zordrak merged 3 commits intotfutils:masterfrom
Samusia:samusia/fix_arm64_support

Conversation

@Samusia
Copy link
Copy Markdown
Contributor

@Samusia Samusia commented Aug 16, 2021

There are no old Terraform ARM64 versions in hashicorp repo

Examples:
0.11.14
0.12.29
0.6.16

How to reproduce issue:

# Run docker container
docker run -it --rm openresty/openresty:1.19.3.2-3-alpine-fat /bin/bash
# Install tfenv
apk add git && git clone https://github.com/tfutils/tfenv.git ~/.tfenv && ln -s ~/.tfenv/bin/* /usr/local/bin

# Install terraform 0.11.14

tfenv install 0.11.14
Installing Terraform v0.11.14
Downloading release tarball from https://releases.hashicorp.com/terraform/0.11.14/terraform_0.11.14_linux_arm64.zip                                 curl: (22) The requested URL returned error: 403

Tarball download failed

Copy link
Copy Markdown
Collaborator

@Zordrak Zordrak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the echo for?

Please use single quotes for strings without interpolation and terminate commands with semicolons

@Samusia
Copy link
Copy Markdown
Contributor Author

Samusia commented Aug 17, 2021

What's the echo for?

Please use single quotes for strings without interpolation and terminate commands with semicolons

I removed redundant echo commands

@Samusia
Copy link
Copy Markdown
Contributor Author

Samusia commented Aug 18, 2021

Tests for all versions presented on the https://releases.hashicorp.com/terraform/ website
1.1.0-alpha20210811 - arm64
1.1.0-alpha20210728 - arm64
1.1.0-alpha20210714 - arm64
1.1.0-alpha20210630 - arm64
1.1.0-alpha20210616 - arm64
1.0.5 - arm64
1.0.4 - arm64
1.0.3 - arm64
1.0.2 - arm64
1.0.1 - arm64
1.0.0 - arm64
0.15.5 - arm64
0.15.4 - arm64
0.15.3 - arm64
0.15.2 - arm64
0.15.1 - arm64
0.15.0 - arm64
0.15.0-rc2 - arm64
0.15.0-rc1 - arm64
0.15.0-beta2 - arm64
0.15.0-beta1 - arm64
0.15.0-alpha20210210 - arm64
0.15.0-alpha20210127 - arm64
0.15.0-alpha20210107 - arm64
0.14.11 - arm64
0.14.10 - arm64
0.14.9 - arm64
0.14.8 - arm64
0.14.7 - arm64
0.14.6 - arm64
0.14.5 - arm64
0.14.4 - arm64
0.14.3 - arm64
0.14.2 - arm64
0.14.1 - arm64
0.14.0 - arm64
0.14.0-rc1 - arm64
0.14.0-beta2 - arm64
0.14.0-beta1 - arm64
0.14.0-alpha20201007 - arm64
0.14.0-alpha20200923 - arm64
0.14.0-alpha20200910 - arm64
0.13.7 - arm64
0.13.6 - arm64
0.13.5 - arm64
0.13.4 - amd64
0.13.3 - amd64
0.13.2 - amd64
0.13.1 - amd64
0.13.0 - amd64
0.13.0-rc1 - arm64
0.13.0-beta3 - arm64
0.13.0-beta2 - arm64
0.13.0-beta1 - arm64
0.12.31 - arm64
0.12.30 - arm64
0.12.29 - amd64
0.12.28 - amd64
0.12.27 - amd64
0.12.26 - amd64
0.12.25 - amd64
0.12.24 - amd64
0.12.23 - amd64
0.12.22 - amd64
0.12.21 - amd64
0.12.20 - amd64
0.12.19 - amd64
0.12.18 - amd64
0.12.17 - amd64
0.12.16 - amd64
0.12.15 - amd64
0.12.14 - amd64
0.12.13 - amd64
0.12.12 - amd64
0.12.11 - amd64
0.12.10 - amd64
0.12.9 - amd64
0.12.8 - amd64
0.12.7 - amd64
0.12.6 - amd64
0.12.5 - amd64
0.12.4 - amd64
0.12.3 - amd64
0.12.2 - amd64
0.12.1 - amd64
0.12.0 - amd64
0.12.0-rc1 - arm64
0.12.0-beta2 - arm64
0.12.0-beta1 - arm64
0.12.0-alpha4 - arm64
0.12.0-alpha3 - arm64
0.12.0-alpha2 - arm64
0.12.0-alpha1 - arm64
0.11.15 - arm64
0.11.15-oci - arm64
0.11.14 - amd64
0.11.13 - amd64
0.11.12 - amd64
0.11.12-beta1 - arm64
0.11.11 - amd64
0.11.10 - amd64
0.11.9 - amd64
0.11.9-beta1 - arm64
0.11.8 - amd64
0.11.7 - amd64
0.11.6 - amd64
0.11.5 - amd64
0.11.4 - amd64
0.11.3 - amd64
0.11.2 - amd64
0.11.1 - amd64
0.11.0 - amd64
0.11.0-rc1 - arm64
0.11.0-beta1 - arm64
0.10.8 - amd64
0.10.7 - amd64
0.10.6 - amd64
0.10.5 - amd64
0.10.4 - amd64
0.10.3 - amd64
0.10.2 - amd64
0.10.1 - amd64
0.10.0 - amd64
0.10.0-rc1 - amd64
0.10.0-beta2 - amd64
0.10.0-beta1 - amd64
0.9.11 - amd64
0.9.10 - amd64
0.9.9 - amd64
0.9.8 - amd64
0.9.7 - amd64
0.9.6 - amd64
0.9.5 - amd64
0.9.4 - amd64
0.9.3 - amd64
0.9.2 - amd64
0.9.1 - amd64
0.9.0 - amd64
0.8.8 - amd64
0.8.7 - amd64
0.8.6 - amd64
0.8.5 - amd64
0.8.4 - amd64
0.8.3 - amd64
0.8.2 - amd64
0.8.1 - amd64
0.8.0 - amd64
0.7.13 - amd64
0.7.12 - amd64
0.7.11 - amd64
0.7.10 - amd64
0.7.9 - amd64
0.7.8 - amd64
0.7.7 - amd64
0.7.6 - amd64
0.7.5 - amd64
0.7.4 - amd64
0.7.3 - amd64
0.7.2 - amd64
0.7.1 - amd64
0.7.0 - amd64
0.6.16 - amd64
0.6.15 - amd64
0.6.14 - amd64
0.6.13 - amd64
0.6.12 - amd64
0.6.11 - amd64
0.6.10 - amd64
0.6.9 - amd64
0.6.8 - amd64
0.6.7 - amd64
0.6.6 - amd64
0.6.5 - amd64
0.6.4 - amd64
0.6.3 - amd64
0.6.2 - amd64
0.6.1 - amd64
0.6.0 - amd64
0.5.3 - amd64
0.5.1 - amd64
0.5.0 - amd64
0.4.2 - amd64
0.4.1 - amd64
0.4.0 - amd64
0.3.7 - amd64
0.3.6 - amd64
0.3.5 - amd64
0.3.1 - amd64
0.3.0 - amd64
0.2.2 - amd64
0.2.1 - amd64
0.2.0 - amd64
0.1.1 - amd64
0.1.0 - amd64

gdubicki added a commit to gdubicki/tfenv that referenced this pull request Sep 12, 2021
for the current TF versions.

(For complete support for the older ones
tfutils#287 is needed.)
@Samusia Samusia requested a review from Zordrak September 18, 2021 08:44
@Samusia Samusia force-pushed the samusia/fix_arm64_support branch from 51a3e9e to 3cacd91 Compare February 15, 2022 15:32
@juan-pascale
Copy link
Copy Markdown

I was running into the same issue but with M1 Macbook Pro. Minimum version for darwin with arm64 is 1.0.2. I'm going to add that case also

@the-cashman
Copy link
Copy Markdown

the-cashman commented Feb 25, 2022

Would love to see this merged. I run into this issue constantly with older versions and have to re-read all these issues and tickets because the default README.md doesn't have the right info. If this and the other half dozen PR's about apple silicon would get merged that would be great for everyday users like us who use tfenv.

At this point its hard to even find a non-M1 macbook new (apple doesnt sell them anymore directly) so this issue will only continue to be more common.

@mwarkentin
Copy link
Copy Markdown

Just ran into this as well, we're using an older version of terraform (0.13.5) and on my new MacBook it was trying to download the ARM release which doesn't exist.

I was able to override it by setting export TFENV_ARCH=amd64 but it would be nice if this could be handled out of the box.

@oscarsb66
Copy link
Copy Markdown

+1

@mhumeSF
Copy link
Copy Markdown

mhumeSF commented Apr 21, 2022

@Samusia This helps install, what does one do to run amd64 binary on m1?

@davidjeddy
Copy link
Copy Markdown
Contributor

+1
Apple M1. Error trying to curl binary for 0.12.32 arm64

@snjy991
Copy link
Copy Markdown

snjy991 commented May 16, 2022

Should we not unset TFENV_ARCH first?

@Zordrak Zordrak merged commit 80efddd into tfutils:master Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants