Assignment4(Terraform)

Terraform:

Terraform is an open source “Infrastructure as Code” tool, created by HashiCorp. A declarative coding tool, Terraform enables developers to use a high-level configuration language called HCL (HashiCorp Configuration Language) to describe the desired “end-state” cloud or on-premises infrastructure for running an application. It then generates a plan for reaching that end-state and executes the plan to provision the infrastructure.

Example for Terraform Program:

provider “aws” {

region = “us-west-1”

}

resource “aws instance” myec2″ {

ami = “ami-12345qwert”

instance_type = “t2.micro”

}

Terraform Commands:

  • Terraform apply : it executes the actions proposed in a terraform plan.
  • Terraform plan :creates an execution plan, which let’s us to preview the changes that terraform plans to make to your infrastructure.
  • Terraform init : it is used to initialize a working directory containing configuration files.
  • Terraform destroy : terminates resources defined in terraform configuration.
  • Terraform show :used to provide human readable output from a state or plan file.
Subscribe
Notify of
guest

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

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