Hans Bhardwaj – Azure DevOps & Terraform Training Day -1 -Assignment-1
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
Assignment 1 – List of Components of Terraform and explain each components with 1 image
- Terraform is a IaaC – Infrastructure as a code. Its common tool/code standard or language for tools to create the infrastructure.
- Language – Terraform written in GO language and can be integrate with aroud 2255 applications/tools. Terraform is owned by Harshicorp.
- 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.
- 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 - 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. - tf file – Any code in terraform gets written in name.tf file where name could be anything and tf is extension of terraform file.
- 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. - 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).
- 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