AWS using Terraform

AWS using Terraform

Task - Deatils

 Have to create/launch Application using Terraform

1. Create the key and security group which allow the port 80.

2. Launch EC2 instance.

3. In this Ec2 instance use the key and security group which we have created in step 1.

4. Launch one Volume (EBS) and mount that volume into /var/www/html

5. Developer have uploded the code into github repo also the repo has some images.

6. Copy the github repo code into /var/www/html

7. Create S3 bucket, and copy/deploy the images from github repo into the s3 bucket and change the permission to public readable.

8 Create a Cloudfront using s3 bucket(which contains images) and use the Cloudfront URL to update in code in /var/www/html


Step-1: create a key and Security Groups - SG allow ssh and http.

Step-2: create a terraform code for the task. Extension must be .tf . You can get this code at https://github.com/akshit0704/hybrid_cloud_task_1-code.git

ec2.tf


Step-3: Initialize Terraform - It will download required plugin.

terraform init

Step-4: Apply terraform file and it create complete cluster for you.

terraform apply
No alt text provided for this image

If all things work properly then at last your instances, S3-bucket, cloudfront launch and at last it provides you cloudfront URL and IP address of a innstance.

No alt text provided for this image

I hope this article will help you to start with terrraform.

To view or add a comment, sign in

More articles by Akshit Modi

  • Azure Cloud Service with Kubernetes

    What is Kubernetes? Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and…

  • Case Study of Neural Networks

    What is Neural Networks? Neural networks, also known as artificial neural networks (ANNs) or simulated neural networks…

    1 Comment
  • GKE - SQL cluster using GCP

    In this article we are going to perform one industry need task. So lets first look at the task we are going to do.

  • Connecting VM and Cloud Instances using JuiceSSH from mobile

    I am damn sure many times you have think to connect your laptop from mobile. In this blog we are going to use our EC2…

    1 Comment
  • How Directive Gaming Use AWS to solve their use-cases

    Directive Games is a mobile game start-up established in 2014, is headquartered in Hong Kong and has offices at…

  • Why Big Data became a Problem?

    If you are looking for Data consumption by top companies and problem with Big Data then this blog is for you. "Over 2.

    3 Comments
  • Creating an App using flutter

    I was working on a task - make an App with Audio - Video Task description - Flutter App Development 1.Create a flutter…

    1 Comment
  • AWS - EKS Final Project

    Why to use EKS? EKS is one of the service of aws. AWS provides all his internal services when you use eks.

  • OpenStack set up in your system

    OpenStack is a private cloud. It is open-source and you can get a different flavor from different company's.

  • File System - inode table

    Why we did not get complete resources in our devices? Why copy takes a long time and move takes less time? Problems…

Explore content categories