Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expected a single file: /tmp/getter3359610012/archive: Downloading terraform Version 1.8.2 #35075

Closed
FernandoMiguel opened this issue Apr 24, 2024 · 12 comments
Labels
enhancement new new issue not yet triaged

Comments

@FernandoMiguel
Copy link

FernandoMiguel commented Apr 24, 2024

Terraform Version

terraform version 1.8.2

Terraform Configuration Files

NA

Debug Output

downloading terraform version 1.8.2 at "https://releases.hashicorp.com/terraform/1.8.2/terraform_1.8.2_linux_amd64.zip?checksum=file:https://releases.hashicorp.com/terraform/1.8.2/terraform_1.8.2_SHA256SUMS": expected a single file: /tmp/getter3359610012/archive: Downloading terraform Version 1.8.2

Expected Behavior

for atlantis to pull the correct version of terraform sig

Actual Behavior

we have a recent version of atlantis.
a newer version of terraform came out today, 1.8.2
and when atlantis pulls that version, the SUM seems to fail

Steps to Reproduce

atlantis plan

Additional Context

No response

References

No response

@FernandoMiguel
Copy link
Author

downstream issue runatlantis/atlantis#4472

@jbardin
Copy link
Member

jbardin commented Apr 24, 2024

Hi @FernandoMiguel,

Thanks for filing the issue. Unfortunately the Terraform project does not have absolute control over the packaging and licensing requirements for distribution. The release archives often contain multiple files, and software which fetches the binaries should not expect a single file in the archive. I'm not sure if there's anything we can do from our side, but we can look into it.

@FernandoMiguel
Copy link
Author

Some heads up before this sort of changes would help downstream organisations as well as clients.

We now have to pin back every project to 1.8.1 until atlantis addresses this breaking change.

@radeksimko
Copy link
Member

I'm sorry this change has caused issues and I understand this may not be helpful but this is unfortunately one of those changes we did not anticipate to cause enough issues that would warrant additional heads up. It is however noted in the Changelog and also called out in the announcement on Discourse.

On a more constructive note, we do maintain a library that can aid with installation of HashiCorp products, including Terraform - hc-install and we use it ourselves in a number of places. Atlantis would be welcomed to use it as well. That library does not make assumptions about the archive having just one file. Our enterprise packages (although not relevant for Terraform here specifically) already have multiple files and the API accounts for this too, where the consumers specify a path where the license should be placed.

For Terraform CE, the API would let you specify Dir as a path to the directory where the archive gets unpacked, including terraform binary and the license file. What consumers decide to do with those files after the installation would be up to them. The API does not currently make any further assumptions about those files for non-Enterprise versions.

Just for posterity, go-getter (which is library Atlantis appears to be using) was not designed for this use case of installing products like Terraform, or broadly interacting with releases.hashicorp.com and we do not intend to make changes in that library to accommodate that use case.

I will comment in the linked issue also, for visibility.

@radeksimko radeksimko removed the bug label Apr 24, 2024
@arohter
Copy link

arohter commented Apr 24, 2024

Shame this breaking distribution change was pushed out in a "bugfix" release.

@thomaschaplin
Copy link

correct downstream issue - runatlantis/atlantis#4471

@sperts-liveramp
Copy link

sperts-liveramp commented Jul 8, 2024

Hello Team, what is the status of this issue?

We explicitly set the atlantis version in our atlantis.yaml file like the following:

  - name: atlantis-project-example
    dir: dir/foo/bar
    workspace: default
    workflow: core
    terraform_version: v1.9.1

Currently, we are still unable to use terraform versions 1.8.2 or later with the atlantis version we are using v0.28.1. I see this issue is closed, is that fix released? cc: @lukemassa

@lukemassa
Copy link

Atlantis has switched to using hc-install in runatlantis/atlantis#4494, which was released as part of v0.28.2 (https://github.com/runatlantis/atlantis/releases/tag/v0.28.2).

This issue therefore no longer affects Atlantis and can likely be closed, cc @FernandoMiguel

@FernandoMiguel
Copy link
Author

Thanks for the heads up @lukemassa
We have upgraded and are already using tf v1.9.x
Thanks.

@bml1g12
Copy link

bml1g12 commented Aug 2, 2024

@lukemassa I hit this issue today, upgrade server to ghcr.io/runatlantis/atlantis:v0.28.5 but it did not resolve the issue

downloading terraform version 1.9.3 at "https://releases.hashicorp.com/terraform/1.9.3/terraform_1.9.3_linux_amd64.zip?checksum=file:https://releases.hashicorp.com/terraform/1.9.3/terraform_1.9.3_SHA256SUMS": expected a single file: /tmp/getter2511542877/archive: Downloading terraform Version 1.9.3

Any suggestions on how we can debug or workaround this issue?

@bml1g12
Copy link

bml1g12 commented Aug 9, 2024

Update: I fixed this issue by chaning main.tf from ">= 1.2.0" terraform to "~> 1.4.6" terraform version with atlantis:v0.28.5

Copy link
Contributor

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement new new issue not yet triaged
Projects
None yet
Development

No branches or pull requests

9 participants