-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathnacls.tf
103 lines (95 loc) · 2.02 KB
/
nacls.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
###################################################
# Network ACLs
###################################################
module "private_network_acl" {
source = "../../modules/nacl"
# source = "tedilabs/network/aws//modules/nacl"
# version = "~> 0.2.0"
name = "test-private"
vpc_id = module.vpc.id
subnets = module.private_subnet_group.ids
ingress_rules = {
900 = {
action = "ALLOW"
protocol = "-1"
ipv4_cidr = "10.0.0.0/16"
}
}
egress_rules = {
900 = {
action = "ALLOW"
protocol = "-1"
ipv4_cidr = "10.0.0.0/16"
}
}
tags = {
"project" = "terraform-aws-network-examples"
}
}
module "public_network_acl" {
source = "../../modules/nacl"
# source = "tedilabs/network/aws//modules/nacl"
# version = "~> 0.2.0"
name = "test-public"
vpc_id = module.vpc.id
subnets = module.public_subnet_group.ids
ingress_rules = {
100 = {
action = "ALLOW"
protocol = "icmp"
ipv4_cidr = "0.0.0.0/0"
icmp_type = -1
icmp_code = -1
}
200 = {
action = "ALLOW"
protocol = "tcp"
ipv4_cidr = "0.0.0.0/0"
from_port = 22
to_port = 22
}
300 = {
action = "ALLOW"
protocol = "tcp"
ipv4_cidr = "0.0.0.0/0"
from_port = 80
to_port = 80
}
310 = {
action = "ALLOW"
protocol = "tcp"
ipv4_cidr = "0.0.0.0/0"
from_port = 443
to_port = 443
}
800 = {
action = "ALLOW"
protocol = "tcp"
ipv4_cidr = "0.0.0.0/0"
from_port = 1024
to_port = 65535
}
801 = {
action = "ALLOW"
protocol = "udp"
ipv4_cidr = "0.0.0.0/0"
from_port = 1024
to_port = 65535
}
900 = {
action = "ALLOW"
protocol = "-1"
ipv4_cidr = "10.0.0.0/16"
}
}
egress_rules = {
900 = {
action = "ALLOW"
protocol = "-1"
ipv4_cidr = "0.0.0.0/0"
}
}
tags = {
"project" = "terraform-aws-network-examples"
}
}