Integration of task-1 using EFS instead of EBS using Terraform

  • In this article I am integrating my task1 with EFS.

Task 1 Link :

https://www.linkedin.com/posts/abhishek-kumar-8057441a2_vimaldaga-vimaldaga-awscloud-activity-6677829279255990272-HBWW

About EFS : -

  • Amazon Elastic File System (Amazon EFS) provides a simple, scalable, fully managed elastic NFS file system for use with AWS Cloud services and on-premises resources. It is built to scale on demand to petabytes without disrupting applications, growing and shrinking automatically as you add and remove files, eliminating the need to provision and manage capacity to accommodate growth.
  • Amazon EFS is designed to provide massively parallel shared access to thousands of Amazon EC2 instances, enabling your applications to achieve high levels of aggregate throughput and IOPS with consistent low latencies.
  • Amazon EFS is well suited to support a broad spectrum of use cases from home directories to business-critical applications. Customers can use EFS to lift-and-shift existing enterprise applications to the AWS Cloud. Other use cases include: big data analytics, web serving and content management, application development and testing, media and entertainment workflows, database backups, and container storage.

About Terraform :-

  • It is a tool that has the capability to handle the multi-cloud setup. It is a standardized tool, i.e. we have to write the code in one language only, but it will be automatically used to interact with multiple clouds (technically known as Terraform Providers).
  • Terraform works on declarative language, i.e. we just have to tell it what has to be done, it will automatically look into the situation & do that thing for us.
  • Terraform is intelligent because of the plugins for each of the providers it has, using them as API, it can interact with any of its providers.

Problem Statement:

  1. Create EC2-key pair.
  2. Create EFS and attached this EFS to all region.
  3. Create security group that will allow ssh, nfs and http.
  4. Launch EC2 instance with nfs mount, install httpd sever and clone the git repository on document root.

Step1:-

  • Creation of key-pair.

Step 2 :-

  • Creation of Security-groups.

Step 3 :-

  • Creation of EFS and attaching it to all availability zones.

Step 4 :-

  • Launching EC2 instance with nfs mount.

Step 5 :-

  • Run the above given code using terraform as
terraform apply -auto-approve
  • After the successfull run of terraform command, you can verify it on aws portal.
  • We can also verify it by accessing our website .

Step 6 :-

  • Now,we can destroy the whole infrastructure by using one single command as
terraform destroy -auto-approve

Thanks, hope you guys will like my article. if you have any suggestion or query will free to ask.

#Happylearning #keepsharing #aws#Terraform

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Real Use Case of the Automation Using Ansible Tower

Learning CosmosDB as a newbie!

They say there’s a developer shortage, so why can’t I get a job?

Python Is A Superpower!

Generating Custom Word Documents From Templates Using Python

Beekeeper - Saving bees, supporting beekeepers

IBM’s Data Governance: Catapulting Businesses into the Digital Future

Thoughts On A New Distributed Systems Language (or languages)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Skabhi

Skabhi

More from Medium

CS371p Spring 2022: Justin Milushev

Github Action 사용해보기

Convert Scanned Bank Statements to Excel

Version Controlling System ,GIT, Mongo DB