Terraform is an open source Infrastructure as Code (IaC) tool, created by https://www.hashicorp.com/?utm_content=inline-mention, that allows users to define and provide data center infrastructure with either HashiCorp’s declarative configuration language (known as HashiCorp Configuration Langauge) or JSON. Let’s get Terraform installed on my go-to open source server of choice Ubuntu and then see how to provision an AWS EC2 instance.

Log in to your Ubuntu instance and install those requirements with the command: sudo apt-get install software-properties-common gnupg2 curl -y

Now, we can add the official HashiCorp repository with the command: sudo apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com focal main" Finally, update apt and install Terraform with the following two commands: sudo apt update sudo apt install terraform

Related Articles