What is terraform? by Aishwarya Kurada

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

Terraform is one of the most popular Infrastructure-as-code (IaC) tool, used by DevOps teams to automate infrastructure tasks. 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.

 One example terraform program

variable “include_ec2_instance”

{ type = bool default = true

} resource “aws_instance” “example” {

count = var.include_ec2_instance ? 1 : 0 # (other resource arguments…) }

output “instance_ip_address” { value = one(aws_instance.example[*].private_ip) }

List of 5 terraform commands and its us

terraform init : Prepares a working directory that holds a configuration or checks out a working directory from a version control system.

terraform get : Downloads and updates modules defined in the root module.

terraform workspace : Depending on the specific workspace command — list, select, new, delete or show — this lists available workspaces, chooses a particular option, creates a workspace, deletes a selected workspace or displays the current one.

terraform plan : Creates an execution workflow, also called a plan. When this command runs, it reads the state of remote objects with terraform refresh, identifies the differences between the prior and desired states and lists a set of changes that will synchronize the remote objects with the desired configuration.

terraform apply : Executes the actions created from a Terraform plan.

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