-
Notifications
You must be signed in to change notification settings - Fork 3
/
example.yaml
326 lines (326 loc) · 15.5 KB
/
example.yaml
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
AWSTemplateFormatVersion: 2010-09-09
Description: Private VPC Template
Parameters:
VGW: {Description: VPC Gateway, Type: String, Default: vgw-012345678}
Mappings: {}
Resources:
ELENDELVPC:
Type: Elendel::Network::VPC
Properties:
CIDR: 172.16.0.0/20
Details:
VPCName: PRIVATEEGRESSVPC
VPCDesc: Private Egress VPC
Region: ap-southeast-2
IPv6: True
Tags: {Name: PRIVATE-EGRESS-VPC, Template: VPC for private endpoints egress only}
DHCP: {Name: DhcpOptions, DNSServers: 172.16.0.2, NTPServers: 169.254.169.123, NTBType: 2}
TransitGateways:
Test1:
TransitGatewayId: tgw-01234567890123456
Tags: {Name: PRIVATE-EGRESS-VPC-TGW1, Purpose: Gateway Attach 1}
Subnets:
- Internal1
- Internal2
- Internal3
Test2:
TransitGatewayId: tgw-98765432109876543
Tags: {Name: PRIVATE-EGRESS-VPC-TGW2, Purpose: Gateway Attach 2}
Subnets:
- Internal1
- Internal2
- Internal3
Subnets:
ReservedMgmt1: {CIDR: 172.16.0.0/26, AZ: 0, NetACL: InternalSubnetAcl, RouteTable: InternalRT1 }
ReservedMgmt2: {CIDR: 172.16.1.0/26, AZ: 1, NetACL: InternalSubnetAcl, RouteTable: InternalRT2 }
ReservedMgmt3: {CIDR: 172.16.2.0/26, AZ: 2, NetACL: InternalSubnetAcl, RouteTable: InternalRT3 }
ReservedNet1: {CIDR: 172.16.0.192/26, AZ: 0, NetACL: RestrictedSubnetAcl, RouteTable: PublicRT }
ReservedNet2: {CIDR: 172.16.1.192/26, AZ: 1, NetACL: RestrictedSubnetAcl, RouteTable: PublicRT }
ReservedNet3: {CIDR: 172.16.2.192/26, AZ: 2, NetACL: RestrictedSubnetAcl, RouteTable: PublicRT }
Internal1: {CIDR: 172.16.3.0/24, AZ: 0, NetACL: InternalSubnetAcl, RouteTable: InternalRT1 }
Internal2: {CIDR: 172.16.4.0/24, AZ: 1, NetACL: InternalSubnetAcl, RouteTable: InternalRT2 }
Internal3: {CIDR: 172.16.5.0/24, AZ: 2, NetACL: InternalSubnetAcl, RouteTable: InternalRT3 }
PerimeterInternal1: {CIDR: 172.16.6.0/24, AZ: 0, NetACL: InternalSubnetAcl, RouteTable: InternalRT1 }
PerimeterInternal2: {CIDR: 172.16.7.0/24, AZ: 1, NetACL: InternalSubnetAcl, RouteTable: InternalRT2 }
PerimeterInternal3: {CIDR: 172.16.8.0/24, AZ: 2, NetACL: InternalSubnetAcl, RouteTable: InternalRT3 }
RouteTables:
PublicRT:
- RouteName: PublicRoute
RouteCIDR: 0.0.0.0/0
RouteGW: InternetGateway
- RouteName: PublicRouteIPv6
RouteCIDR: "::/0"
RouteGW: InternetGateway
InternalRT1: {}
InternalRT2: {}
InternalRT3: {}
NATGateways:
NATGW1: {Subnet: ReservedNet1, Routetable: InternalRT1}
NATGW2: {Subnet: ReservedNet2, Routetable: InternalRT2}
NATGW3: {Subnet: ReservedNet3, Routetable: InternalRT3}
SecurityGroups:
VPCEndpoint:
GroupDescription: VPC Endpoint Interface Firewall Rules
SecurityGroupIngress:
- [icmp,-1,-1,172.16.0.0/20, All ICMP Traffic]
- [tcp,0,65535,172.16.0.0/20, All TCP Traffic]
- [udp,0,65535,172.16.0.0/20, All UDP Traffic]
SecurityGroupEgress:
- [icmp,-1,-1,172.16.0.0/20, All ICMP Traffic]
- [tcp,0,65535,172.16.0.0/20, All TCP Traffic]
- [udp,0,65535,172.16.0.0/20, All UDP Traffic]
Tags:
Name: VPCEndpoint
Endpoints:
cloudformation:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
cloudtrail:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
codebuild:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
config:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
dynamodb:
Type: Gateway
RouteTableIds:
- PublicRT
- InternalRT1
- InternalRT2
- InternalRT3
PolicyDocument: |
{
"Version":"2012-10-17",
"Statement":[
{
"Effect":"Allow",
"Principal": "*",
"Action":["s3:*"],
"Resource":["*"]
}
]
}
ec2:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
ec2messages:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
elasticloadbalancing:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
events:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
execute-api:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
kinesis-streams:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
kms:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
logs:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
monitoring:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
sagemaker.api:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
sagemaker.runtime:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
s3:
Type: Gateway
RouteTableIds:
- PublicRT
- InternalRT1
- InternalRT2
- InternalRT3
PolicyDocument: |
{
"Version":"2012-10-17",
"Statement":[
{
"Effect":"Allow",
"Principal": "*",
"Action":["s3:*"],
"Resource":["*"]
}
]
}
secretsmanager:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
servicecatalog:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
sns:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
ssm:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
ssmmessages:
Type: Interface
SubnetIds:
- ReservedMgmt1
- ReservedMgmt2
- ReservedMgmt3
SecurityGroupIds:
- VPCEndpoint
NetworkACLs:
RestrictedSubnetAcl:
RestrictedSubnetAclEntryInTCPUnReserved: "90,6,allow,false,0.0.0.0/0,1024,65535"
RestrictedSubnetAclEntryInUDPUnReserved: "91,17,allow,false,0.0.0.0/0,1024,65535"
RestrictedSubnetAclEntryInTCPUnReservedIPv6: "92,6,allow,false,::/0,1024,65535"
RestrictedSubnetAclEntryInUDPUnReservedIPv6: "93,17,allow,false,::/0,1024,65535"
RestrictedSubnetAclEntryOutTCPUnReserved: "90,6,allow,true,0.0.0.0/0,1024,65535"
RestrictedSubnetAclEntryOutUDPUnReserved: "91,17,allow,true,0.0.0.0/0,1024,65535"
RestrictedSubnetAclEntryOutTCPUnReservedIPv6: "92,6,allow,true,::/0,1024,65535"
RestrictedSubnetAclEntryOutUDPUnReservedIPv6: "93,17,allow,true,::/0,1024,65535"
RestrictedSubnetAclEntryOutPuppet: "94,6,allow,true,172.16.0.0/16,8140,8140"
RestrictedSubnetAclEntryOutHTTP: "101,6,allow,true,0.0.0.0/0,80,80"
RestrictedSubnetAclEntryOutHTTPS: "102,6,allow,true,0.0.0.0/0,443,443"
RestrictedSubnetAclEntryOutSSH: "103,6,allow,true,0.0.0.0/0,22,22"
RestrictedSubnetAclEntryOutHTTPIPv6: "104,6,allow,true,::/0,80,80"
RestrictedSubnetAclEntryOutHTTPSIPv6: "105,6,allow,true,::/0,443,443"
RestrictedSubnetAclEntryOutSSHIPv6: "106,6,allow,true,::/0,22,22"
RestrictedSubnetAclEntryInHTTP: "101,6,allow,false,0.0.0.0/0,80,80"
RestrictedSubnetAclEntryInHTTPS: "102,6,allow,false,0.0.0.0/0,443,443"
RestrictedSubnetAclEntryInHTTPIPv6: "103,6,allow,false,::/0,80,80"
RestrictedSubnetAclEntryInHTTPSIPv6: "104,6,allow,false,::/0,443,443"
RestrictedSubnetAclEntryIn: "110,-1,allow,false,172.16.0.0/16,1,65535"
RestrictedSubnetAclEntryOut: "110,-1,allow,true,172.16.0.0/16,1,65535"
RestrictedSubnetAclEntryNTP: "120,6,allow,true,0.0.0.0/0,123,123"
RestrictedSubnetAclEntryInSquid2: "140,6,allow,false,172.16.0.0/16,3128,3128"
RestrictedSubnetAclEntryInDNSTCP: "150,6,allow,false,172.16.0.0/16,53,53"
RestrictedSubnetAclEntryOutDNSTCP: "150,6,allow,true,0.0.0.0/0,53,53"
RestrictedSubnetAclEntryOutDNSTCPIPv6: "151,6,allow,true,::/0,53,53"
RestrictedSubnetAclEntryInDNSUDP: "160,17,allow,false,172.16.0.0/16,53,53"
RestrictedSubnetAclEntryOutDNSUDP: "160,17,allow,true,0.0.0.0/0,53,53"
RestrictedSubnetAclEntryOutDNSUDPIPv6: "161,17,allow,true,::/0,53,53"
RestrictedSubnetAclEntryInNetBios: "170,6,allow,false,172.16.0.0/16,389,389"
RestrictedSubnetAclEntryOutNetBios: "170,6,allow,true,172.16.0.0/16,389,389"
RestrictedSubnetAclEntryInNetBios1: "80,6,allow,false,172.16.0.0/16,137,139"
RestrictedSubnetAclEntryOutNetBios1: "180,6,allow,true,172.16.0.0/16,137,139"
InternalSubnetAcl:
InternalSubnetAclEntryIn: "100,-1,allow,false,172.16.0.0/16,1,65535"
InternalSubnetAclEntryOut: "100,-1,allow,true,172.16.0.0/16,1,65535"
InternalSubnetAclEntryInTCPUnreserved: "102,6,allow,false,0.0.0.0/0,1024,65535"
InternalSubnetAclEntryInUDPUnreserved: "103,17,allow,false,0.0.0.0/0,1024,65535"
InternalSubnetAclEntryInTCPUnreservedIPv6: "104,6,allow,false,::/0,1024,65535"
InternalSubnetAclEntryInUDPUnreservedIPv6: "105,17,allow,false,::/0,1024,65535"
InternalSubnetAclEntryOutHTTP: "102,6,allow,true,0.0.0.0/0,80,80"
InternalSubnetAclEntryOutHTTPS: "103,6,allow,true,0.0.0.0/0,443,443"
InternalSubnetAclEntryOutHTTPIPv6: "104,6,allow,true,::/0,80,80"
InternalSubnetAclEntryOutHTTPSIPv6: "105,6,allow,true,::/0,443,443"
InternalSubnetAclEntryOutTCPUnreserved: "106,6,allow,true,172.16.0.0/16,1024,65535"
InternalSubnetAclEntryOutUDPUnreserved: "107,6,allow,true,172.16.0.0/16,1024,65535"
InternalSubnetAclEntryOutTCPDNS: "110,6,allow,true,0.0.0.0/0,53,53"
InternalSubnetAclEntryOutUDPDNS: "111,17,allow,true,0.0.0.0/0,53,53"
InternalSubnetAclEntryOutTCPDNSIPv6: "112,6,allow,true,::/0,53,53"
InternalSubnetAclEntryOutUDPDNSIPv6: "113,17,allow,true,::/0,53,53"
InternalSubnetAclEntryOutSSH: "150,6,allow,true,0.0.0.0/0,22,22"
Transform: "801604450668::VPC"