Learn how to install, configure, and deploy infrastructure using infrastructure as code. Follow these steps to start managing your cloud infrastructure with Terraform.
Download and install the Terraform CLI for your operating system from the official HashiCorp website.
curl -O https://releases.hashicorp.com/terraform/1.4.6/terraform_1.4.6_linux-amd64.zip
unzip terraform_1.4.6_linux-amd64.zip
sudo mv terraform /usr/local/bin/
Create a Terraform configuration file (.tf) to declare your infrastructure in code.
provider "aws" {
region = "us-west-2"
}
resource "aws_instance" "example" {
ami = "ami-12345678"
instance_type = "t2.micro"
}
Initialize your working directory and apply your configuration to provision resources.
terraform init
terraform apply
Our beginner-friendly guide walks you through creating your first Terraform configuration and deploying your first infrastructure.
View Getting Started GuideGo deeper with advanced Terraform techniques, including modules, state management, and enterprise workflows.
View Advanced TutorialsGet help from our active global community of developers, operators, and enterprise users. Ask questions, share your Terraform experiences, and explore use cases shared by other users.
Join the Community ForumJoin the 3.2 million+ users who trust Terraform to manage infrastructure at scale.