DEV Community

Srinivasulu Paranduru for AWS Community Builders

Posted on • Updated on

Terraform Associate Certification Preparation

Benefits of Infrastructure as Code

P1. What is infrastructure as code - You write and execute the code to define, deploy ,update and destroy your infrastructure
P2. What are the benefits of IAC ?

Automation : We can bring up the servers with one script and scale up and down based on our load with the same script.

Reusability of the code : We can reuse the same code

Versioning : We can check it into version control and we get versioning. Now we can see an incremental history of who changed
what, how is our infrastructure actually defined at any given

P3. IaC makes it easy to provision and apply infrastructure configurations, saving time. It standardizes workflows across different infrastructure providers (e.g., VMware, AWS, Azure, GCP, etc.) by using a common syntax across all of them.
P4. What is Idempotent in terms of IaC?
The idempotent characteristic provided by IaC tools ensures that, even if the same code is applied multiple times, the result remains the same.

Terraform Definition : It is an open source infrastructure as code (IaC) software tool that lets you build, change, and version cloud and on-prem resources safely and efficiently.

Terraform users define and enforce infrastructure configurations by using a JSON-like configuration language called HCL (HashiCorp Configuration Language). HCL's simple syntax makes it easy for DevOps teams to provision and re-provision infrastructure across multiple cloud and on-premises data centers.

How does terraform work :

  1. Terraform allows users to define their entire infrastructure simply by using configuration files(*.tf) and version control.
  2. When a command is given to deploy and run a server, database or load balancer, Terraform parses the code and translates it into an application programming interface (API) call to the resource provider. Because Terraform is open source, developers are always able to extend the tool's usefulness by writing new plugins or compiling different versions of existing plugins.

Image description

HashiCorp and the Terraform community have already written thousands of providers to manage many different types of resources and services. You can find all publicly available providers on the Terraform Registry, including Amazon Web Services (AWS), Azure, Google Cloud Platform (GCP), Kubernetes, Helm, GitHub, Splunk, DataDog, and many more.

The core Terraform workflow consists of three stages:

  • Write: You define resources, which may be across multiple cloud providers and services. For example, you might create a configuration to deploy an application on virtual machines in a Virtual Private Cloud (VPC) network with security groups and a load balancer.
  • Plan: Terraform creates an execution plan describing the infrastructure it will create, update, or destroy based on the existing infrastructure and your configuration.
  • Apply: On approval, Terraform performs the proposed operations in the correct order, respecting any resource dependencies. For example, if you update the properties of a VPC and change the number of virtual machines in that VPC, Terraform will recreate the VPC before scaling the virtual machines.

Image description

Install Terraform: https://developer.hashicorp.com/terraform/install
Tools used for easy development : Visual code https://code.visualstudio.com/Download

HashiCorp Infrastructure Automation Certification
https://www.hashicorp.com/certification/terraform-associate

Exam Details

Image description

Note : To book for the exam , you need to have Github account created.

💬 If you enjoyed reading this blog post and found it informative, please take a moment to share your thoughts by leaving a review and liking it 😀 and follow me in linkedin

Top comments (0)