Hans Bhardwaj – Azure DevOps & Terraform Training Day -1 -Assignment-1

Assignment 1 – List of Components of Terraform and explain each components with 1 image

  1. Terraform is a IaaC – Infrastructure as a code. Its common tool/code standard or language for tools to create the infrastructure.
  2. Language – Terraform written in GO language and can be integrate with aroud 2255 applications/tools. Terraform is owned by Harshicorp.
  3. HCL – Harshicorp configuration Language, Terraform enables users to use configuration language called HCL to describe the desire (what we want) state in cloud or in on-premises.
  4. Provider – Provider is kind of plugin or executable which allows users to manage an external API ie AWS, Azure, GC, Kubernetes etc. Its basically acts as a communication or translation layer to communicate with different -2 cloud providers , services.
    In AWS there is one provider, in Azure there are multiple ie AzureRM, AzureDevops,AzureAD,AzureAPI, Azure Stake
  5. Terraform workflow
    init –> validate –> plan -> apply –> show –> destroy
    Init is one time activity to install providers like azure, aws, github etc.
    Validate is to verify the code written in .tf file, its kind of debug.
    plan is to provide details what will be performed once execute the file
    apply is to deploy/publish the file (basically create or update called as apply)
    show is the command (terraform show) to see the content of state file.
    destroy is to destroy any instance/resoure created by terraform.
  6. tf file – Any code in terraform gets written in name.tf file where name could be anything and tf is extension of terraform file.
  7. tfstate file – Whenever Terraform sends the code to provider which in turn interacts with external API to execute the code, create the infra.
    The response is sends back and stored as .tfstate file.
  8. While creating resource via tf file. In general it content as resource name and then argument ( argument is kind of parameters ie name, tag, description, location, compute required etc).
  9. Some of Terraform commands are listed here – terraform –version ( to show the version of terraform)
    terraform providers ( to show the list of providers)
    terraform init ( to install the providers as one time activity)
    terraform validate
    terraform plan
    terraform apply
    terraform show
    terraform destroy
Terraform Architecture
Terraform commands
Terraform Tf file example
Terraform state file (tfstate file)
Notify of

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

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x