-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathVpnEndpoint.py
35 lines (32 loc) · 1.03 KB
/
VpnEndpoint.py
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
import troposphere.ec2 as ec2
from troposphere import Tags, Template
t = Template()
t.add_resource(
ec2.ClientVpnEndpoint(
"myClientVpnEndpoint",
AuthenticationOptions=[
ec2.ClientAuthenticationRequest(
Type="directory-service-authentication",
ActiveDirectory=ec2.DirectoryServiceAuthenticationRequest(
DirectoryId="d-926example"
),
)
],
ClientCidrBlock="10.0.0.0/22",
ConnectionLogOptions=ec2.ConnectionLogOptions(Enabled=False),
Description="My Client VPN Endpoint",
DnsServers=["11.11.0.1"],
ServerCertificateArn=(
"arn:aws:acm:us-east-1:111122223333:certificate/"
"12345678-1234-1234-1234-123456789012"
),
TagSpecifications=[
ec2.TagSpecifications(
ResourceType="client-vpn-endpoint",
Tags=Tags(Purpose="Production"),
)
],
TransportProtocol="udp",
)
)
print(t.to_json())