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

Download multiple versions of OpenTofu in container by default, including 1.6.2, 1.7.1, and 1.8.2 #5187

Open
1 task done
obscurerichard opened this issue Dec 21, 2024 · 0 comments
Labels
feature New functionality/enhancement

Comments

@obscurerichard
Copy link

obscurerichard commented Dec 21, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Describe the user story

As an Atlantis user, I would like multiple versions of OpenTofu to be available in the container, so that I might follow the OpenTofu migration guides as conservatively as possible.

I'm so glad Preinstall opentofu in containers #4337 brought in tofu. However, inspecting the container for v0.31.0 (commit: 245044c) (build date: 2024-11-22T17:58:20.688Z) shows multiple versions of Terraform preinstalled, but not for OpenTofu.

See this terminal transcript for evidence:

/ # tofu --version
OpenTofu v1.8.5
on linux_amd64
/ # tofu
tofu       tofu1.8.5
/ # which tofu
/usr/local/bin/tofu
/ # ls -l /usr/local/bin/tofu*
-rwxr-xr-x    1 root     root      82448384 Nov  4 20:16 /usr/local/bin/tofu
-rwxr-xr-x    1 root     root      82448384 Nov  4 20:16 /usr/local/bin/tofu1.8.5
/ # ls /usr/local/bin
atlantis              terraform             terraform1.8.5        tofu1.8.5
conftest              terraform1.6.6        terraform1.9.8
docker-entrypoint.sh  terraform1.7.5        tofu
/ #

(See also Dockerfile#L121-L130 - fixing this would be really, really easy)

atlantis/Dockerfile

Lines 121 to 130 in b5b95a7

RUN ./download-release.sh \
"terraform" \
"${TARGETPLATFORM}" \
"${DEFAULT_TERRAFORM_VERSION}" \
"1.6.6 1.7.5 1.8.5 ${DEFAULT_TERRAFORM_VERSION}" \
&& ./download-release.sh \
"tofu" \
"${TARGETPLATFORM}" \
"${DEFAULT_OPENTOFU_VERSION}" \
"${DEFAULT_OPENTOFU_VERSION}"

Describe the solution you'd like
I'd like it if Atlantis pre-installed these versions per the migration instructions for migrating from various versions of Terraform to OpenTofu:

  1. 1.6.2 for Migrating from Terraform 1.5.x or lower and Migrating from Terraform 1.6.x
  2. 1.7.1 for Migrating from Terraform 1.7.x
  3. 1.8.2 for Migrating from Terraform 1.8.x

Describe the drawbacks of your solution
This would make the Dockerfile slightly more complicated, and would bloat the container image size by a couple hundred megabytes.

Describe alternatives you've considered

@obscurerichard obscurerichard added the feature New functionality/enhancement label Dec 21, 2024
@obscurerichard obscurerichard changed the title Download multiple versions of OpenTofu in container by default, including Download multiple versions of OpenTofu in container by default, including 1.6.2, 1.7.1, and 1.8.2 Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality/enhancement
Projects
None yet
Development

No branches or pull requests

1 participant