Skip to content

Commit 2679513

Browse files
Updated Readme and added workflo diagram
1 parent 335db89 commit 2679513

File tree

1 file changed

+46
-10
lines changed

1 file changed

+46
-10
lines changed

README.md

Lines changed: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Hashicorp Terraform AWS VPC Module
2-
Terraform AWS VPC Module by Source4Learn(An Opensource Community to learn and share knowledge)
3-
![Source4Learn](https://github.com/opensource4learn/terraform-aws-vpc/blob/main/s4l.png?raw=true)
2+
Terraform AWS VPC Module by Source4Learn(Source4Learn is an opensource learning community.)
3+
![Source4Learn](https://github.com/source4learn/terraform-aws-vpc/blob/main/s4l.png?raw=true)
44

55
## AWS VPC Module
6-
This 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.
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.
77

88
AWS VPC Module will create following resources:
99
- VPC and Subnets
@@ -33,29 +33,54 @@ module "vpc" {
3333
}
3434
```
3535

36-
# AWS VPC multi-tier 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, database, caching servers will remain in private sections. The AWS infrastructure patterns can be categories as follows:
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.
3838

39+
The AWS infrastructure patterns can be categories as follows:
3940

4041
- **Public Layer:** This layer consists of public subnets and has one subnet on each availability zone for high availability.
4142
- **Application Layer:** This layer of AWS infrastructure contains the private subnets and one on each Availability Zone.
4243
- **Database Layer:** The third layer consists of 3 private subnets and the same subnet on each availability zone.
4344

44-
Let's take a brief overview of multi-layers or multi-tier architecture. It basically 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.
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.
4546

4647
To split the AWS infrastructure into multiple tiers and availability zones, please refer to below architectural diagram:</br>
4748
![VPC](https://github.com/source4learn/terraform-aws-vpc/blob/main/vpc.png?raw=true)
4849

49-
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.
50+
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.
5051

5152
## 3-tier architecture
52-
**Information yet to be added.
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+
```
5366

5467
## 2-tier architecture
55-
**Information yet to be added.
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+
```
5675

5776
## 1-tier architecture
58-
**Information yet to be added.
77+
This single tier architecture can be used for monolythic infrastructures(Highly in-secure) and test/devlopment environments.
78+
79+
```
80+
cluster_architecture = "1-tier"
81+
cidr = "10.0.0.0/20"
82+
subnet_bits = "4"
83+
```
5984

6085
## Requirements
6186

@@ -100,3 +125,14 @@ AWS allows users to create the multi-tier infrastructure and distribute it acros
100125
| Name | Description |
101126
|------|-------------|
102127
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | Terraform Output |
128+
129+
## Summary
130+
131+
If you encounter an error or problem in this setup, please report in the GitHub repository issues.</br>
132+
Reach us in case you need any further assistance.
133+
134+
Email: source4learn@gmail.com
135+
136+
Twitter: ![@source4learn](https://twitter.com/source4learn/)
137+
138+
LinkedIn: ![linkedin.com/in/source4learn](https://www.linkedin.com/in/source4learn/)

0 commit comments

Comments
 (0)