This repository has been archived by the owner on May 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
variables.tf
224 lines (185 loc) · 4.76 KB
/
variables.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
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
#################
# VPN server
#################
variable "name" {
description = "The name used for logs group, security groups, iam roles, dns zone and VPN instance"
type = string
default = "softether-radius-vpn"
}
variable "tags" {
description = "A mapping of tags."
type = map(string)
default = {}
}
variable "tags_asg" {
description = "A list of ASG tags"
default = []
}
variable "create_logs" {
description = "Create a group log in CloudWatch"
type = bool
default = true
}
variable "log_retention_days" {
description = "How many days need to store logs"
type = number
default = 90
}
variable "create_dns" {
description = "Create a dns record in Route53"
type = bool
default = false
}
variable "dns_zone_name" {
description = "Name of Public DNS zone where record will be. DNS zone must exist."
type = string
default = ""
}
variable "dns_a_record_prefix" {
description = "Prefix for A record in DNS zone"
type = string
default = "vpn-"
}
variable "enable_azs_in_dns_a_record" {
description = "Enable AZs in dns A record for VPN or use numbers (from 0)."
type = bool
default = false
}
variable "private_domain_fqdn" {
description = "Domain FQDN which will be used to resolve internal names. (e.g.: internal.example.com)"
type = string
default = ""
}
variable "create_private_dns_zone" {
description = "Create private DNS zone with private_domain_fqnd name and attach to VPC"
type = bool
default = false
}
#################
# Instance variables
#################
variable "ami_name_prefix" {
description = "The name prefix used for search AMI image"
type = string
default = "softether-radius-vpn"
}
variable "ami_owner" {
description = "The AMI owner"
type = string
default = "self"
}
variable "vpc_id" {
description = "ID of the VPC where to create VPN instance"
type = string
}
variable "subnets" {
description = "Subnets for VPN servers"
type = list(string)
}
variable "azs" {
description = "List of AZs where subnets places"
type = list(string)
}
variable "instance_type" {
description = "Type of EC2 instance. We recommend to use t3a.micro"
type = string
default = "t3a.micro"
}
variable "custom_ec2_spot_price" {
description = "Custom EC2 Spot price"
type = string
default = ""
}
variable "key_pair_name" {
description = "Key pair name for SSH login to VPC instance"
type = string
default = ""
}
variable "enable_detailed_monitoring" {
description = "If `true`, the launched EC2 instance will have detailed monitoring enabled."
type = bool
default = false
}
variable "enable_spot_instance" {
description = "Use spot instance for all VPN instances"
type = bool
default = true
}
variable "enable_session_manager_connect" {
description = "Use Session Manager to connect to EC2 instance"
type = bool
default = true
}
variable "enable_vpn_admin_external_access" {
description = "Enable external access to admin MGMT. It used only for maintenance. Only external IP of the operator."
type = bool
default = false
}
#################
# VPN variables
#################
variable "target_cidr" {
description = "Typical your VPCs CIDR or any another CIDR used for target route"
type = string
}
variable "vpn_cidr" {
description = "VPN CIDR. .1 - GW"
type = string
default = "172.16.0.0/24"
}
variable "vpn_dhcp_start" {
description = "VPN DHCP start cidrhost() hostnum"
type = number
default = 10
}
variable "vpn_dhcp_end" {
description = "VPN DHCP end cidrhost() hostnum"
type = number
default = 200
}
variable "vpn_admin_port" {
description = "VPN admin port for connect via MGMT client"
type = string
default = "5555"
}
variable "enable_dhcp_gw" {
description = "Enable push Gateway to clients. Route all networks through VPN."
type = bool
default = true
}
#################
# Auth variables
#################
variable "ldap_addr" {
description = "Your LDAP Address"
type = string
}
variable "ldap_user_dn" {
description = "Your LDAP user DN"
type = string
}
variable "duo_enabled" {
description = "Enable 2FA Duo"
type = bool
default = false
}
variable "duo_ikey" {
description = "DUO ikey"
type = string
default = ""
}
variable "duo_skey" {
description = "DUO skey"
type = string
default = ""
}
variable "duo_api_host" {
description = "DUO API host"
type = string
default = ""
}
variable "duo_time_out" {
description = "DUO TimeOut (seconds)"
type = number
default = 60
}