DevOps(Day 93) : Create an EC2 instance and Access the website using terraform - (entire infrastructure through Terraform - part7)

 

  • AIM

  • Subtasks:

    • Task 9: Create an EC2 instance

    • Task 10: Access the website

Build Your Own AWS Infrastructure with Ease using Infrastructure as Code (IaC) Techniques

Welcome back to our Terraform journey.

In the previous tasks, you have learned about the basics of Terraform, its configuration file, and creating an EC2 instance using Terraform. Today, we will explore more about Terraform and create multiple resources.

  • Launch an EC2 instance in the public subnet with the following details:

  • AMI: ami-0557a15b87f6559cf

  • Instance type: t2.micro

  • Open the website URL in a browser to verify that the website is hosted successfully.

  1. Use terraform apply to spin up the infrastructure.

  2. Now, we can see in the AWS console for the new EC2 instance which is created.

  3. We can verify the security group along with the rules created.

  4. We can verify the elastic IP which is created.

  • We can verify the website that is created through Apache web server.

This Terraform hands-on task is designed to test proficiency in using Terraform for Infrastructure as Code (IaC) on AWS. we will be tasked with creating a VPC, subnets, an internet gateway, and launching an EC2 instance with a web server running on it. This task will showcase our skills in automating infrastructure deployment using Terraform. It's a popular interview question for companies looking for candidates with hands-on experience in Terraform. That's it for today.

Thanks for reading my article. Have a nice day.

Comments

Popular posts from this blog

DevOps(Day-97): Meta-Arguments in Terraform

DevOps(Day-95): Auto Scaling with Terraform

DevOps (Day-1) Introduction