Sitemap

Terraform in Azure

2 min readJul 22, 2024

Recap to Terraform

Skip Paywall read full Article : https://harshityadav.in/posts/Terraform-in-Azure/

Terraform Installation

Press enter or click to view image in full size

Tried official installation instructions but faced some dependency issue on my machine so ended up installing using the brew recipe

brew install terraform

Getting Started

  1. Set up a Cloud Account on any cloud provider (AWS, Azure, OCI)
  2. Install Terraform
  3. Add a provider — AWS, Azure, OCI, GCP, or others
  4. Write configuration files
  5. Initialize Terraform Providers
  6. PLAN (DRY RUN) using terraform plan
  7. APPLY (Create a Resource) using terraform apply
  8. DESTROY (Delete a Resource) using terraform destroy

Terraform Providers

Press enter or click to view image in full size

Teraform Configuration Files

Press enter or click to view image in full size

Importing Existing Infrastructure

Press enter or click to view image in full size

Terraform Stages

Press enter or click to view image in full size

Commands

1$ mkdir learn-terraform-azure
$ cd learn-terraform-azure## Code in the Terraform File## Az login in between with the correct subscription selected activated$ terraform init$ terraform fmt$ terraform plan$ terraform apply

Resource :

--

--

Harshit Yadav
Harshit Yadav

Written by Harshit Yadav

Software Developer | Azure Solution Architect Expert | Technical Writer | harshityadav.in