Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!
We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!
Learn from Guru Rajesh Kumar and double your salary in just one year.
what is terraform
Terraform is a tool which is used to write a code for infrastructure and it allows to programmatically provision the physical resources an application requires to run. it works across all the cloud providers at the same time.Terraform’s direct competitors like cloudFormation,which work primarly with a single cloud provider only.This helps to manages the application infrastructure through programming.
One example terraform program
resource “github_repository” “Sample” {
name = “Proj1”
description = “My first project”
visibility = “public”
}
provider github
{token=”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”
owner=”Organization”
}
List of 5 terraform commands and its use
- terraform init – used to initialize the directory which consists of configuration files.
- terraform plan – checks the configuration to determine the desired state of all the resources it declares.
- terraform apply – carries out the planned changes to resource using the same type of infrastructure providers API.
- terraform destroy – destroys all the resources being managed by current directory.
- terraform show – provides an output of plan file in understandable manner.