# Getting started with Terraform in 2026

Source: https://www.thirdrocktechkno.com/blog/getting-started-with-terraform/
Updated: 2026-04-23T06:58:46.000Z

Welcome to our blog on Getting Started with Terraform! If you're new to Terraform, you're in the right place. Terraform is a powerful tool that allows you to define, preview, and deploy infrastructure as code. This means that you can use a single configuration file to manage resources across multiple providers, including public cloud providers like AWS, Azure, and Google Cloud, as well as on-premises and edge infrastructure.

One of the main benefits of using Terraform is that it enables you to 

Author: Abhilash
Published: 2023-01-20T11:30:22.000Z

Welcome to our blog on Getting Started with Terraform! If you're new to Terraform, you're in the right place. Terraform is a powerful tool that allows you to define, preview, and deploy infrastructure as code. This means that you can use a single configuration file to manage resources across multiple providers, including public cloud providers like AWS, Azure, and Google Cloud, as well as on-premises and edge infrastructure.

One of the main benefits of using Terraform is that it enables you to version your infrastructure, just like you would with code. This makes it easy to track changes and roll back if needed. It also makes it easier to collaborate with your team, as you can share and review configuration files in the same way you would with code.

In this blog, we'll cover the basics of Terraform and walk you through the process of getting started. We'll also provide tips and best practices along the way to help you get the most out of Terraform.

So let's dive in and start using Terraform to manage your infrastructure!

## 1. Install Terraform 

The first step in getting started with Terraform is to [install it](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) on your local machine. Terraform is a command-line tool, so you can download the appropriate binary for your operating system from the Terraform website. Once you have it downloaded, make sure it is in your system's PATH so that you can run it from the command line. 

**For macOS, you can use the below command to install terraform**

```sh
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
```
macOS

**For Linux[Ubuntu/Debian], you can use the below command to install terraform **

```sh
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg

echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list

sudo apt update && sudo apt install terraform
```
Ubuntu/Debian

For Windows, you can directly download the binary from [here](https://developer.hashicorp.com/terraform/downloads)

## 2. Initialize a Terraform project

Once you have Terraform installed, you can initialize a new Terraform project by running the `terraform init` command. This command will create a new folder called ".terraform" in your current working directory, where Terraform will store all of its state files.

### Prerequisites

To follow this tutorial you will need the following:


- The Terraform CLI is installed.

- The AWS CLI is installed.

- AWS account and associated credentials that allow you to create resources.


```
terraform init  //assuming AWS and Terraform CLI is installed and configured
```


## 3. Write your Terraform Configuration 

Next, you'll need to write your Terraform configuration. The configuration is written in the HashiCorp Configuration Language (HCL), and it describes the resources you want to create. For example, if you want to create an AWS EC2 instance, you would write the following configuration:

```hcl
resource "aws_s3_bucket" "gallery" {
  bucket = "mygalleryapptrt"

  tags = {
    Name        = "GalleryApp"
    Environment = "Dev"
  }
}

```
Creating s3 bucket

## 4. Validate your Terraform Configuration 

You'll need to validate your Terraform configuration. This can be done using the "terraform plan" command. The "terraform plan" command is used to create an execution plan for your Terraform configuration. It allows you to preview the changes that Terraform will make before applying them to your infrastructure, making it easier to avoid costly mistakes.

```hcl
terraform plan
```


When you run the "terraform plan" command, Terraform will check the current state of your infrastructure, compare it to the configuration file, and generate a plan of the changes that will be made. The plan will show you the resources that will be created, updated, or destroyed, along with the details of the changes that will be made. This allows you to review the changes and make sure that they are what you intended before applying them to your infrastructure.

```terraform
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_s3_bucket.gallery will be created
  + resource "aws_s3_bucket" "gallery" {
      + acceleration_status         = (known after apply)
      + acl                         = (known after apply)
      + arn                         = (known after apply)
      + bucket                      = "mygalleryapp"
      + bucket_domain_name          = (known after apply)
      + bucket_regional_domain_name = (known after apply)
      + force_destroy               = false
      + hosted_zone_id              = (known after apply)
      + id                          = (known after apply)
      + object_lock_enabled         = (known after apply)
      + policy                      = (known after apply)
      + region                      = (known after apply)
      + request_payer               = (known after apply)
      + tags                        = {
          + "Environment" = "Dev"
          + "Name"        = "GalleryApp"
        }
      + tags_all                    = {
          + "Environment" = "Dev"
          + "Name"        = "GalleryApp"
        }
    ........... 
Plan: 1 to add, 0 to change, 0 to destroy.
```
Sample Terraform plan output for the above terraform configuration

## 5. Apply the Configuration

Once you are satisfied with the changes that Terraform will make, you can apply the configuration by running the "terraform apply" command. This will create or update all the resources defined in your configuration, and Terraform will keep track of all the resources it creates in its state files, allowing you to manage and update them in the future.

```hcl
terraform apply
```


**It's important to note that "terraform apply" command should be used with caution, as it will make real changes to your infrastructure. It is also important to keep in mind that any errors that occur during the execution of "terraform apply" command might cause the provisioning to be in an unknown state, so always validate the changes with "terraform plan" command before applying them.**

```
Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value:
```
Once Terraform apply command is entered 

you need to confirm the changes before typing yes and then the changes will be applied to your cloud.

```
aws_s3_bucket.gallery: Creating...
aws_s3_bucket.gallery: Still creating... [10s elapsed]
aws_s3_bucket.gallery: Creation complete after 10s [id=mygalleryapptrt]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
```
Output for terraform apply

In conclusion, Terraform is a game-changer for managing your infrastructure, providing a unified and efficient way to manage resources across different cloud providers, while also allowing you to version, collaborate and roll back changes. The unique features of Terraform make it

Terraform is a powerful infrastructure as code (IAC) tool that allows users to provision and manage resources across multiple cloud providers and on-premises environments. Some of its key features include:

- Cross-platform compatibility: Terraform supports a wide range of cloud providers and on-premises environments, including AWS, Azure, Google Cloud, and more. This allows users to manage their entire infrastructure using a single tool, regardless of where their resources are located.
- State management: [Terraform](/blog/working-with-terraform-modules/) keeps track of the current state of your infrastructure, allowing you to easily see what resources are currently running, and making it easy to roll back changes if necessary.
- Modularity: Terraform's use of modules makes it easy to organize and reuse infrastructure code. By breaking your infrastructure down into smaller, reusable modules, you can reduce duplication, and increase scalability and maintainability.
- Versioning: Terraform's ability to version control your infrastructure code and state files, makes it easy to collaborate and track changes over time.
- Previewing changes: Terraform's "plan" command allows you to preview the changes that will be made to your infrastructure before they're applied. This makes it easy to catch errors before they happen and ensure that your infrastructure stays in the desired state
- Automation: With Terraform, you can automate the process of provisioning, updating, and deleting resources, which can save you a lot of time and effort.
- Open source tool: Terraform is an open-source tool and is actively maintained by a community of developers and contributors around the world which makes it more reliable and efficient to use.

In summary, Terraform is an efficient and powerful tool for managing infrastructure across multiple cloud providers and environments. Its features enable users to easily provision and manage resources, preview changes, automate processes, version control and maintain their infrastructure in a modular way.



## FAQs

### 1. What is IAC? 

IAC stands for Infrastructure as Code. It's a way of managing and provisioning IT infrastructure using code, rather than manual configuration.

### 2. What is Terraform?

HashiCorp Terraform is a powerful, open-source tool that allows engineers to automate the process of creating and managing IT infrastructure. With Terraform, you can use code to define the resources your application needs and then use that code to provision and manage those resources in a consistent and repeatable way.

### 3. When do we need to use terraform?

Mainly terraform is used for provisioning the infrastructure in the cloud. apart from that it is also used to automate infrastructure deployments and manage multiple environments.



## Featured Insights

### Build vs Buy Adaptive Learning Platform: A Decision Framework for 2026



Tapan Patel
July 9, 2026

![Build vs Buy Adaptive Learning Platform: A Decision Framework for 2026](https://www.thirdrocktechkno.com/api/media/file/06b6cdc76812181392c4.png?prefix=payload%2Ftrt-platform%2F&v=2026-11-12T11%3A58%3A47.810Z)
[Build vs Buy Adaptive Learning Platform: A Decision Framework for 2026](/blog/build-vs-buy-adaptive-learning-platform/)

### Academic Integrity in the Age of AI: How GCC Universities Are Responding in 2026



Tapan Patel
July 1, 2026

![Academic Integrity in the Age of AI: How GCC Universities Are Responding in 2026](https://www.thirdrocktechkno.com/api/media/file/6a0617955855edc91996.png?prefix=payload%2Ftrt-platform%2F&v=2026-11-12T11%3A58%3A46.968Z)
[Academic Integrity in the Age of AI: How GCC Universities Are Responding in 2026](/blog/academic-integrity-ai-gcc-universities/)

### How to Modernise Your School ERP System With AI in the UAE and Saudi Arabia



Krunal Shah
June 26, 2026

![How to Modernise Your School ERP System With AI in the UAE and Saudi Arabia](https://www.thirdrocktechkno.com/api/media/file/faf6e4c86c928d59c483.png?prefix=payload%2Ftrt-platform%2F&v=2026-11-12T11%3A58%3A46.230Z)
[How to Modernise Your School ERP System With AI in the UAE and Saudi Arabia](/blog/ai-school-erp-modernisation-uae-saudi-arabia/)

### Best LMS for Corporate Training in 2026: AI-Powered Platforms and Custom Build Options



Tapan Patel
June 26, 2026

![Best LMS for Corporate Training in 2026: AI-Powered Platforms and Custom Build Options](https://www.thirdrocktechkno.com/api/media/file/c3f804b3109ad726e6af.png?prefix=payload%2Ftrt-platform%2F&v=2026-11-12T11%3A58%3A45.328Z)
[Best LMS for Corporate Training in 2026: AI-Powered Platforms and Custom Build Options](/blog/best-lms-for-corporate-training/)

### AI Powered LMS in 2026: What to Look For and When to Build Custom



Krunal Shah
June 24, 2026

![AI Powered LMS in 2026: What to Look For and When to Build Custom](https://www.thirdrocktechkno.com/api/media/file/9f82f160cfd29db7f3c0.png?prefix=payload%2Ftrt-platform%2F&v=2026-11-12T11%3A58%3A44.582Z)
[AI Powered LMS in 2026: What to Look For and When to Build Custom](/blog/custom-build-ai-powered-lms/)

### AI Teacher Training in Saudi Arabia: What Schools Need to Prepare For in 2026



Tapan Patel
June 24, 2026

![AI Teacher Training in Saudi Arabia: What Schools Need to Prepare For in 2026](https://www.thirdrocktechkno.com/api/media/file/fcc5c83e0bbcfb752bb7.png?prefix=payload%2Ftrt-platform%2F&v=2026-11-12T11%3A58%3A43.901Z)
[AI Teacher Training in Saudi Arabia: What Schools Need to Prepare For in 2026](/blog/ai-teacher-training-saudi-arabia-2/)

### AI Student Assessment Platforms in 2026: Best Tools, Core Features, and When to Build Custom



Tapan Patel
June 23, 2026

![AI Student Assessment Platforms in 2026: Best Tools, Core Features, and When to Build Custom](https://www.thirdrocktechkno.com/api/media/file/1598bcacdb680382c52f.png?prefix=payload%2Ftrt-platform%2F&v=2026-11-12T11%3A58%3A43.241Z)
[AI Student Assessment Platforms in 2026: Best Tools, Core Features, and When to Build Custom](/blog/ai-student-assessment-platform/)

### School Management Software in 2026: Best Platforms, Features, and Custom Development



Tapan Patel
June 19, 2026

![School Management Software in 2026: Best Platforms, Features, and Custom Development](https://www.thirdrocktechkno.com/api/media/file/59062fa23089b6025851.png?prefix=payload%2Ftrt-platform%2F&v=2026-11-12T11%3A58%3A42.220Z)
[School Management Software in 2026: Best Platforms, Features, and Custom Development](/blog/school-management-software-best-platforms-features-custom-development/)

### Generative AI in Education 2026: Platforms, Use Cases, and a Custom Build Guide for EdTech Teams



Tapan Patel
June 19, 2026

![Generative AI in Education 2026: Platforms, Use Cases, and a Custom Build Guide for EdTech Teams](https://www.thirdrocktechkno.com/api/media/file/f45fea34e6170d13209f.png?prefix=payload%2Ftrt-platform%2F&v=2026-11-12T11%3A58%3A41.219Z)
[Generative AI in Education 2026: Platforms, Use Cases, and a Custom Build Guide for EdTech Teams](/blog/generative-ai-education-2026/)

### ChatGPT Integration for EdTech Platforms: What Buyers Need to Know in 2026



Tapan Patel
June 15, 2026

![ChatGPT Integration for EdTech Platforms: What Buyers Need to Know in 2026](https://www.thirdrocktechkno.com/api/media/file/8e4109a5e4ce945568c4.png?prefix=payload%2Ftrt-platform%2F&v=2026-11-12T11%3A58%3A40.563Z)
[ChatGPT Integration for EdTech Platforms: What Buyers Need to Know in 2026](/blog/chatgpt-integration-edtech-platforms/)

### Is Your School Ready for AI? 12 Questions Every UAE School Should Answer First



Krunal Shah
June 15, 2026

![Is Your School Ready for AI? 12 Questions Every UAE School Should Answer First](https://www.thirdrocktechkno.com/api/media/file/f3eb1350eb13dc17270d.png?prefix=payload%2Ftrt-platform%2F&v=2026-11-12T11%3A58%3A39.740Z)
[Is Your School Ready for AI? 12 Questions Every UAE School Should Answer First](/blog/is-your-school-ready-for-ai/)

### Parent-Teacher Communication in 2026: How AI Is Replacing Manual Systems in UAE Schools



Tapan Patel
June 10, 2026

![Parent-Teacher Communication in 2026: How AI Is Replacing Manual Systems in UAE Schools](https://www.thirdrocktechkno.com/api/media/file/88ec24db5c15d1b7673e.png?prefix=payload%2Ftrt-platform%2F&v=2026-11-12T11%3A58%3A38.645Z)
[Parent-Teacher Communication in 2026: How AI Is Replacing Manual Systems in UAE Schools](/blog/ai-parent-teacher-communication-uae-schools/)

### Custom AI Education Platform Development Cost, Timeline, and What to Expect in 2026



Krunal Shah
June 9, 2026

![Custom AI Education Platform Development Cost, Timeline, and What to Expect in 2026](https://www.thirdrocktechkno.com/api/media/file/ed2767b3f4420fe7d0bc.png?prefix=payload%2Ftrt-platform%2F&v=2026-11-12T11%3A58%3A37.734Z)
[Custom AI Education Platform Development Cost, Timeline, and What to Expect in 2026](/blog/custom-ai-education-platform-development/)

### How to Choose a FlutterFlow Development Company in 2026



Krunal Shah
May 28, 2026

![How to Choose a FlutterFlow Development Company in 2026](https://www.thirdrocktechkno.com/api/media/file/blog-50f472074c46d9c4f3669725.webp?prefix=payload%2Ftrt-platform&v=2026-11-12T13%3A28%3A08.901Z)
[How to Choose a FlutterFlow Development Company in 2026](/blog/choose-flutterflow-development-company/)

### FlutterFlow: Complete Beginner's Guide 2026



Krunal Shah
May 12, 2026

![FlutterFlow: Complete Beginner's Guide 2026](https://www.thirdrocktechkno.com/api/media/file/blog-30816a0d79da3c386d2ecb15.webp?prefix=payload%2Ftrt-platform&v=2026-11-12T13%3A28%3A11.319Z)
[FlutterFlow: Complete Beginner's Guide 2026](/blog/flutterflow-complete-beginners-guide/)


## LET'S WORK
TOGETHER

Team up with us to enhance and achieve your business objectives.

![Third Rock Techkno 3d logo ](https://www.thirdrocktechkno.com/api/media/file/61f6a30d228988df7f79.svg?prefix=payload%2Ftrt-platform%2F&v=2026-11-12T11%3A58%3A47.940Z)
[Consult Our Experts](/contact-us/)
