Assignment 4 by Nallagatla Sarvani [26-05-2022]

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

What is Terraform?

Terraform is a tool to write a code & it allows to programmatically provision the physical resources to an application requires to run. It is used to automate the provisioning of your cloud resources. Terraform is an open-source, cloud-agnostic provisioning tool developed by HashiCorp and written in GO language.

 Example Terraform program

resources.tf

resource “github_repository” “Sample” {
name = “terraform1”
description = “My first terraform project”

visibility = “public”
}

terraform.tf

provider github

{

token=”ghp_CpzDx9BrikaSXBsOVJ4t90NoK0FZQH3AkrzP”

owner=”Organization”

Terraform commands and its use

  1. terraform init : used to initialize the directory which consists of configuration files.
  2. terraform plan : uses to check the configuration to determine the desired state of all the resources it declares.
  3. terraform apply : used to planned changes to resource using the same type of infrastructure providers API.
  4. terraform destroy : used to destroy all the resources being managed by current directory.
  5. terraform show : used to provide an output of plan file in understandable manner.

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x