Skip to content

Commit

Permalink
Update install-tofu.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
yunkon-kim authored Oct 25, 2024
1 parent 9c69e8a commit 4e626a8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/install-tofu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ TOFU_VERSION=${1:-$DEFAULT_TOFU_VERSION}
apt-get update -y

# Ensure that you have installed the dependencies, such as `gnupg`, `software-properties-common`, `curl`, and unzip packages.
apt-get install -y apt-transport-https ca-certificates curl gnupg git apt-utils
apt-get install -y apt-transport-https ca-certificates curl gnupg git apt-utils lsb-release

# Set up the OpenTofu repository
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://get.opentofu.org/opentofu.gpg | tee /etc/apt/keyrings/opentofu.gpg >/dev/null
curl -fsSL https://packages.opentofu.org/opentofu/tofu/gpgkey | gpg --no-tty --batch --dearmor -o /etc/apt/keyrings/opentofu-repo.gpg >/dev/null
# chmod a+r /etc/apt/keyrings/opentofu.gpg /etc/apt/keyrings/opentofu-repo.gpg
chmod a+r /etc/apt/keyrings/opentofu.gpg /etc/apt/keyrings/opentofu-repo.gpg

# Add the OpenTofu repository to sources list
echo "deb [signed-by=/etc/apt/keyrings/opentofu-repo.gpg] https://packages.opentofu.org/opentofu/tofu/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/opentofu.list
Expand All @@ -35,4 +35,3 @@ if ! tofu --version; then
echo "Failed to retrieve OpenTofu version"
exit 1
fi

0 comments on commit 4e626a8

Please sign in to comment.