DEV Community

Cover image for High Availability Architecture setup on AWS using Terraform
Rajit Paul
Rajit Paul

Posted on • Updated on

High Availability Architecture setup on AWS using Terraform

What is Terraform?

Terraform is an open-source infrastructure as a code tool used for building, changing, and versioning infrastructure efficiently. Terraform is created by Hashicorp. The language used in Terraform is HCL or Hashicorp Configuration Language.

An Example of terraform code

Alt Text

Terraform Providers

Terraform Providers are like Plugins, every provider has its own documentation describing its own resources and usage. The Terraform Registry is the main home for all provider documentation. There are almost 948 Terraform Providers out of which few are AWS, GCP, AZURE, KUBERNETES, OCI, and ALIBABA.
Alt Text
Source: terraform.io

Components of High Availability Architecture

EC2 - Elastic Compute Cloud in AWS
Secure, Resizable compute capacity on the cloud.
Alt Text
source: wikipedia.org

S3 - Simple Storage Service
Object Storage Service through a web interface that allows us to block all public access to our objects
Alt Text
source: aws.amazon.com

CloudFront
Fast Content Delivery Network (CDN) Service that provides a globally distributed network of proxy servers that cache content and deliver to customer globally with low latency and high transfer speed.
Alt Text
source: askvsk.com

For Storage we have 2 options:

  • EBS
  • EFS

EBS - Elastic Block Storage
Easy to use, High-Performance Block Storage Service designed for use with AWS EC2.
Alt Text
source: wikipedia.org

EFS - Elastic File System
Simple, Scalable Elastic File System for use with AWS Cloud Services and on-premises resources.
Alt Text
source: medium.com

Terraform Code:

High Availability with EBS - https://github.com/RajitPaul11/terraform_aws/tree/main/high-availability_aws
High Availability with EFS -
https://github.com/RajitPaul11/terraform_aws/tree/main/high-availability_efs

Top comments (0)