Terraform Task:

Mahek Batra
3 min readJul 2, 2021

The task is given by @Vimal Daga sir in the training of MultiCloud Management using Terraform.

Task description:

*1. Create a key pair*
*2. Create a security group*
*3. Launch an instance using the above created key pair and security group.*
*4. Create an EBS volume of 1 GB.*
*5. The final step is to attach the above created EBS volume to the instance you created in the previous steps.*
Write a terraform code for all the above steps.

Terraform:

Terraform is an infrastructure-as-code software developed by HashiCorp. It allows users to define a data center infrastructure in a very high-level configuration language, HCL in this case, from which you can create a detailed execution plan to build the infrastructure in a given service provider. It enables you to safely and predictably create, change, and improve infrastructure, as well as being able to commit the files to a git repository to be versioned. It is an open source tool that codifies APIs into declarative configuration files (*.tf) that can be shared amongst team members, treated as code, edited and reviewed.

It basically creates infrastructure following a config file. You can think of it as the “Docker for cloud services“. But instead of a Dockerfile, you have a http://main.tf.

AWS Cloud

AWS stands for Amazon web services. It is a cloud service from amazon. Which provide services in the form of building blocks. By using these building blocks you can create and deploy any type of application in the cloud.

Top AWS Services:

Compute

Storage

Networking

Management

Security

Databases

Migration

Developer Tools

In this task I have created security group and keypair and by using this keypair and security group launched an instance. Along with these created a volume of 1gib and attached it with the instance. It is all done by one single code base of terraform.

Output of the task:

Thanks for reading!!

--

--

Mahek Batra

BE 3rd year || Information Technology|| Dedicated|| Passionate||