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
Copy file name to clipboardExpand all lines: README.md
+36-48Lines changed: 36 additions & 48 deletions
Original file line number
Diff line number
Diff line change
@@ -18,65 +18,53 @@ module "vpc" {
18
18
}
19
19
20
20
```
21
-
Refer ```examples``` directory for more reference.
21
+
Refer [examples](https://gitlab.com/squareops/sal/terraform/aws/network/-/tree/qa/examples) directory for more references.
22
22
23
23
## Network Scenarios
24
24
25
+
Users only need to provide `vpc_cidr` and subnets are calculated with the help of [in-built functions](https://gitlab.com/squareops/sal/terraform/aws/network/-/blob/qa/main.tf#L2).
26
+
25
27
This module supports three scenarios for creating Network resource on AWS. Each will be explained in further detail in the corresponding sections.
26
28
27
-
-**vpc_minimal (default behavior):** For creating a VPC with only public subnets and IGW.
29
+
-**simple-vpc (default behavior):** For creating a VPC with only public subnets and IGW.
28
30
-`vpc_cidr = ""`
29
-
-`public_subnets = []`
30
-
-**vpc_secure:** For creating a VPC with both public and private subnets and IGW and NAT gateway. Jump server/Bastion Host is also configured.
-**vpc_three_tier:** For creating a VPC with public, private and database subnets ( where app and database subnets are private subnets)along with an IGW and NAT gateway. Jump server/Bastion Host is also configured.
43
-
-`public_subnets = []`
44
-
-`private_subnets = []`
45
-
-`database_subnets = []`
46
-
-`create_database_subnet_route_table = true`
47
-
-`create_database_nat_gateway_route = true`
48
-
-`create_cis_vpc = true`
49
-
50
-
## NAT Gateway Scenarios
51
-
52
-
This module supports three scenarios for creating NAT gateways. Each will be explained in further detail in the corresponding sections.
53
-
54
-
- One NAT Gateway per subnet (default behavior)
55
-
-`enable_nat_gateway = true`
56
-
-`single_nat_gateway = false`
57
-
-`one_nat_gateway_per_az = false`
58
-
- Single NAT Gateway
59
-
-`enable_nat_gateway = true`
60
-
-`single_nat_gateway = true`
31
+
-`enable_public_subnet = true`
32
+
-**vpc-with-private-sub:** For creating a VPC with both public and private subnets and IGW and NAT gateway.
33
+
-`vpc_cidr = local.vpc_cidr`
34
+
-`enable_public_subnet = true`
35
+
-`enable_private_subnet = true`
36
+
37
+
-**complete-vpc-with-vpn:** For creating a VPC with public, private, database and intra subnets along with an IGW and NAT gateway. Jump server/Bastion Host is also configured.
38
+
-`vpc_cidr = local.vpc_cidr`
39
+
-`enable_public_subnet = true`
40
+
-`enable_private_subnet = true`
41
+
-`enable_database_subnet = true`
42
+
-`enable_intra_subnet = true`
61
43
-`one_nat_gateway_per_az = false`
62
-
- One NAT Gateway per availability zone
63
-
-`enable_nat_gateway = true`
64
-
-`single_nat_gateway= false`
65
-
-`one_nat_gateway_per_az = true`
66
-
67
-
If both `single_nat_gateway` and `one_nat_gateway_per_az` are set to `true`, then `single_nat_gateway` takes precedence.
Make sure whenever you set `one_nat_gateway_per_az` to `true` you should have as many public subnets as we have AZ in the region or else this module will fail cause some `region` has more than 3 AZ like N.Virginia and we bydefault provisoning only 3 public subnets
51
+
# VPN setup-
70
52
53
+
To configure Pritunl VPN:
71
54
72
-
- To add SSL to the Pritunl endpoint:
73
-
74
-
1. Create a DNS record mapping to the vpn host public IP
75
-
2. Login to pritunl from the credentials in the pritunl-info.txt in the pritunl folder.
76
-
3. After login,in the Initial setup window, add the record created in the 'Lets Encrypt Domain' field.
77
-
4. Pritunl will automatically configure a signed SSL certificate from Lets Encrypt.
55
+
1. Open the public IP of instance.
56
+
2. Get the initial key and user, password for setting up Pritunl from Secret Manager and log in to Pritunl.
57
+
3. Create a DNS record mapping to the vpn host public IP
58
+
4. After login,in the Initial setup window, add the record created in the 'Lets Encrypt Domain' field.
59
+
5. Pritunl will automatically configure a signed SSL certificate from Lets Encrypt.
60
+
6. Add organization and user to pritunl.
61
+
7. Add server port as 10150 which is already allowed from security group while creating vpn.
62
+
8. Attach organization to the server and Start the server.
63
+
9. Copy or download user profile link or file.
64
+
10. Import the profile in Pritunl client.
65
+
66
+
NOTE: Port 80 to be open publicly in the vpn security group to verify and renewing the domain certificate.
78
67
79
-
NOTE: Port 80 to be open publicly in the vpn security group to verify and renewing the domain certificate.
80
68
# CIS COMPLIANCE
81
69
82
70
- Follows the VPC recommendations of CIS Amazon Web Services Foundations Benchmark v1.4.0
0 commit comments