You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This AWS VPC Module will create following resources:
7
-
- Subnets ["Public", "Private", "Storage"]
8
-
- Route Tables ["Public", "Private", "Storage"]
6
+
This AWS Terraform module is designed to implement the common AWS infrastructure patterns such as single or multi-tier. The multi-tier patterns allow users to create infrastructure in separate layers as per the needs of modern applications.
7
+
8
+
AWS VPC Module will create following resources:
9
+
- VPC and Subnets
10
+
- Route Tables
9
11
- Security Gruoups
10
12
- Internet Gateway
11
13
- NAT Gateway
@@ -21,8 +23,8 @@ provider "aws" {
21
23
}
22
24
23
25
module "vpc" {
24
-
source = "opensource4learn/vpc/aws"
25
-
version = "0.1.0-beta"
26
+
source = "source4learn/vpc/aws"
27
+
version = "0.1.1"
26
28
cluster_prefix = "source4learn"
27
29
cluster_environment = "development"
28
30
cluster_architecture = "3-tier"
@@ -31,6 +33,55 @@ module "vpc" {
31
33
}
32
34
```
33
35
36
+
# AWS Multi Layer Architecture
37
+
The AWS resources created in the public layers can be accessed publicly(i.e. - frontend servers, load-balancers, bastion instances, etc) but backed resources such as application servers, databases, caching servers will remain in private sections.
38
+
39
+
The AWS infrastructure patterns can be categories as follows:
40
+
41
+
-**Public Layer:** This layer consists of public subnets and has one subnet on each availability zone for high availability.
42
+
-**Application Layer:** This layer of AWS infrastructure contains the private subnets and one on each Availability Zone.
43
+
-**Database Layer:** The third layer consists of 3 private subnets and the same subnet on each availability zone.
44
+
45
+
Let's take a brief overview of multi-layers or multi-tier architecture. It divides the AWS infrastructure into layers like - Public, Private, and Storage(Isolated database) layers. The reason behind this implementation is to protect and isolate private layers from any unwanted public access. In other words, the Public layer provides a shield to internal layers of architecture.
46
+
47
+
To split the AWS infrastructure into multiple tiers and availability zones, please refer to below architectural diagram:</br>
AWS allows users to create the multi-tier infrastructure and distribute it across the availability zones of the current region to achieve the high availability of resources.
51
+
52
+
## 3-tier architecture
53
+
A three-tier architecture pattern help will help to design a highly secured, modular, scalable, and fault-tolerant infrastructure. In this approach, the application infrastructure will be divided into a public layer, business logic, and storage layer. The resources in the individual layer are being created separately and they can communicate with specific pre-defined routes and security rules.
54
+
55
+
Use this approach while implementing a microservices-based application architecture. The internet-facing services like - Frontend servers and bastion instances can be created public layer, app servers can be created in the intermediate application layer, and storage layer can have data services such as databases/caching etc.
56
+
57
+
This AWS Terraform module will help you to create an AWS VPC with 3-tier by just passing `cluster_architecture` as `3-tier`. Users also need to define the desired VPC size in form of `cidr` and subnet mask as `subnet_bits`.
58
+
59
+
*Example:* Let's assume that the user needs to create a VPC network with ~4000 hosts available and each subnet should have 254 IP addresses. So the cidr value for vpc would be `x.x.x.x/20` and the expected value for subnet would be `x.x.x.x/24`. But in this Terraform module, it accepts subnet mask value as subnet bits which can be calculated by subtracting the subnet cidr value with vpc cidr value.
60
+
61
+
```
62
+
cluster_architecture = "3-tier"
63
+
cidr = "10.0.0.0/20"
64
+
subnet_bits = "4"
65
+
```
66
+
67
+
## 2-tier architecture
68
+
The two-tier pattern is suitable for that application architecture which requires the isolation between the presentation and business logic without increasing the complexity of application infrastructure.
69
+
70
+
```
71
+
cluster_architecture = "2-tier"
72
+
cidr = "10.0.0.0/20"
73
+
subnet_bits = "4"
74
+
```
75
+
76
+
## 1-tier architecture
77
+
This single tier architecture can be used for monolythic infrastructures(Highly in-secure) and test/devlopment environments.
0 commit comments