Here is the HashiCorp tutorial link…
Install Terraform
Here is my output on a cloud9 host:
bitnami@ip-172-26-15-161:~$ sudo apt-get update && sudo apt-get install -y gnupg
... (a bunch of output)
bitnami@ip-172-26-15-161:~$ curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
OK
bitnami@ip-172-26-15-161:~$ sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
bitnami@ip-172-26-15-161:~$ sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
bitnami@ip-172-26-15-161:~$ sudo apt-get update && sudo apt-get install terraform
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://cdn-aws.deb.debian.org/debian buster InRelease
Hit:3 http://cdn-aws.deb.debian.org/debian buster-updates InRelease
Hit:4 http://cdn-aws.deb.debian.org/debian buster-backports InRelease
Get:5 https://apt.releases.hashicorp.com buster InRelease [4,421 B]
Get:6 https://apt.releases.hashicorp.com buster/main amd64 Packages [31.2 kB]
Fetched 35.6 kB in 1s (69.2 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
terraform
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 32.7 MB of archives.
After this operation, 79.4 MB of additional disk space will be used.
Get:1 https://apt.releases.hashicorp.com buster/main amd64 terraform amd64 1.0.6 [32.7 MB]
Fetched 32.7 MB in 0s (70.6 MB/s)
Selecting previously unselected package terraform.
(Reading database ... 33067 files and directories currently installed.)
Preparing to unpack .../terraform_1.0.6_amd64.deb ...
Unpacking terraform (1.0.6) ...
Setting up terraform (1.0.6) ...
bitnami@ip-172-26-15-161:~$ terraform -help
Usage: terraform [global options] [args]
The available commands for execution are listed below.
The primary workflow commands are given first, followed by
less common or more advanced commands.
Main commands:
init Prepare your working directory for other commands
validate Check whether the configuration is valid
plan Show changes required by the current configuration
apply Create or update infrastructure
destroy Destroy previously-created infrastructure
All other commands:
console Try Terraform expressions at an interactive command prompt
fmt Reformat your configuration in the standard style
force-unlock Release a stuck lock on the current workspace
get Install or upgrade remote Terraform modules
graph Generate a Graphviz graph of the steps in an operation
import Associate existing infrastructure with a Terraform resource
login Obtain and save credentials for a remote host
logout Remove locally-stored credentials for a remote host
output Show output values from your root module
providers Show the providers required for this configuration
refresh Update the state to match remote systems
show Show the current state or a saved plan
state Advanced state management
taint Mark a resource instance as not fully functional
test Experimental support for module integration testing
untaint Remove the 'tainted' state from a resource instance
version Show the current Terraform version
workspace Workspace management
Global options (use these before the subcommand, if any):
-chdir=DIR Switch to a different working directory before executing the
given subcommand.
-help Show this help output, or the help for a specified subcommand.
-version An alias for the "version" subcommand.
bitnami@ip-172-26-15-161:~$