Terraform Basics

Example: Let's assume AWS is the Provider for the entire blog
access key, secret key -- authentication
terraform init #Initializes the working directory
Whatever is required to run a terraform script, the "Init" helps to get all the information.
terraform plan #create the plan /ex: the blueprint of a house
For Example, we have a 2-tier application --- RDS, EC2, VPC, SG, SUBNET, RT sequence of code doesn't matter in terraform. Terraform auto-detects the sequence in the "plan" section as VPC, SUBNET, RT, SG, EC2, RDS
terraform apply # creates resources on AWS
terraform destroy # Destroys the resources created.
Terraform script doesn't destroy the resources which are manually created on the AWS console, It only destroys the resources created via terraform script.
Resources are nothing but EC2, VPC, Subnet, and Security Group...
Terraform Installation
Go to https://developer.hashicorp.com/terraform/downloads
Download the AMD version of Terraform on your local machine
Extract the .zip download, copy the location of the extracted file
Go to Windows properties --advance settings---env variables--add the path
Check if Terraform was successfully installed. Go to CMD -> terraform -version
Now the environment variable is set successfully.
go to registry.terraform.io for the best terraform documentation
Subscribe to my newsletter
Read articles from Neelima Thumma directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
