@@ -21,7 +21,7 @@ You can use this module with [terraform-aws-modules/vpc/aws](https://registry.te
21
21
module "vpc" {
22
22
source = "terraform-aws-modules/vpc/aws"
23
23
24
- name = "hello-vpc "
24
+ name = "main "
25
25
cidr = "172.18.0.0/16"
26
26
azs = ["us-west-2a", "us-west-2b", "us-west-2c"]
27
27
private_subnets = ["172.18.64.0/20", "172.18.80.0/20", "172.18.96.0/20"]
@@ -32,7 +32,7 @@ module "vpc" {
32
32
module "nat" {
33
33
source = "int128/nat-instance/aws"
34
34
35
- name = "hello-nat "
35
+ name = "main "
36
36
vpc_id = module.vpc.vpc_id
37
37
public_subnet = module.vpc.public_subnets[0]
38
38
private_subnets_cidr_blocks = module.vpc.private_subnets_cidr_blocks
@@ -43,7 +43,7 @@ module "nat" {
43
43
44
44
## How it works
45
45
46
- This module will create the following resources:
46
+ This module provisions the following resources:
47
47
48
48
- Launch Template for the NAT instance
49
49
- Auto Scaling Group with mixed instances policy
@@ -57,16 +57,13 @@ Take a look at the diagram:
57
57
58
58
![ diagram] ( diagram.svg )
59
59
60
- The NAT instance will do the following tasks on startup:
60
+ By default an instance of the latest Amazon Linux 2 is launched.
61
+ The instance will run [ init.sh] ( data/init.sh ) to enable NAT as follows:
61
62
62
63
1 . Attach the ENI to ` eth1 ` .
63
- 1 . Enable IP forwarding.
64
- 1 . Set to ignore ICMP redirect packets.
65
- 1 . Enable IP masquerade.
64
+ 1 . Set the kernel parameters for IP forwarding and masquerade.
66
65
1 . Switch the default route to ` eth1 ` .
67
66
68
- See [ init.sh] ( data/init.sh ) for details.
69
-
70
67
71
68
## Configuration
72
69
0 commit comments