Infrastructure as Code-Terraform Demo
Task-To create a website hosting infrastructure on AWS using EC2 instances, S3 Buckets, CloudFront Distributions, Github, and to automate it using code written on Terraform.
Step 1- Create the S3 bucket, put the image(s) on the S3 bucket, and create a CloudFront distribution for the bucket for faster content delivery.
Step 2- Create a Security group, EC2 Instance, EBS for the instance, Mount the storage to the instance, Run code on the instance and install necessary tools such as Git and HTTPD, Clone Github Repository containing code into /var/www/html folder and restart HTTPD server.
Step 3- Visit the website to check if all configurations are successful or not
The running EC2 instance
The created security group
The created bucket with the image