Skip to content

Commit

Permalink
Merge pull request #2068 from devops-infra/feature/opentofu
Browse files Browse the repository at this point in the history
Add support for OpenTofu
  • Loading branch information
ChristophShyper authored Mar 27, 2024
2 parents 0e81758 + 787ddf3 commit 6fd23bf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,18 @@ RUN if [ "${SLIM}" = "no" ]; then \
mv ./hcledit /usr/bin/hcledit ;\
fi

# Get latest OpenTofu
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
# hadolint ignore=SC2015
RUN if [ "${SLIM}" = "no" ]; then \
if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then ARCHITECTURE=amd64; elif [ "${TARGETPLATFORM}" = "linux/arm64" ]; then ARCHITECTURE=arm64; else ARCHITECTURE=amd64; fi ;\
DOWNLOAD_URL="$( curl -LsS https://api.github.com/repos/opentofu/opentofu/releases/latest | grep -o -E "https://.+?_${ARCHITECTURE}.deb" | head -1)" ;\
echo -e "Downloading OpenTofu from ${DOWNLOAD_URL}" ;\
for i in {1..5}; do curl -LsS "${DOWNLOAD_URL}" -o ./tofu.deb && break || sleep 15; done ;\
dpkg -i ./tofu.deb ;\
rm -f ./tofu.deb ;\
fi

# Get latest sops
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
# hadolint ignore=SC2015
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Supporting `amd64` and `aarch64/arm64` images!

### Supporting `slim-latest` version having only Terraform, Terragrunt and TFlint
### Supporting now latest OpenTofu version for every release


Docker image with Terraform, Terragrunt, Go, Python, Make, Docker, Git, and all needed components to easily manage cloud
Expand Down Expand Up @@ -222,6 +222,7 @@ Some are conditional, depending on the selected flavour, marked with `*`
| ncurses | Binary | For expanding `Makefile` with some colors. | https://invisible-island.net/ncurses/announce.html |
| openssh | Binary | For allowing outgoing SSH connections. | https://www.openssh.com/ |
| openssl | Binary | For calculating BASE64SHA256 hash of Lambda packages. Assures updating Lambdas only when package hash changed. | https://github.com/openssl/openssl |
| opentofu | Binary | As open-source alternative to Terraform. | https://github.com/opentofu/opentofu |
| PyGithub | Python library | For interacting with GitHub API. | https://github.com/PyGithub/PyGithub |
| python-hcl2 | Python library | For reading HCL files in Python. | https://github.com/amplify-education/python-hcl2 |
| python3 | Binary | For running more complex scripts during deployment process. | https://www.python.org/ |
Expand Down

0 comments on commit 6fd23bf

Please sign in to comment.