-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
480 lines (401 loc) · 12.7 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
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
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
variable "deploy_aws" {
description = "Deploy AWS as part of the Multi-Cloud Transit"
type = bool
default = true
}
variable "aws_prefix" {
description = "Prefix used for resources in AWS"
type = string
default = "aws"
}
variable "aws_region" {
description = "AWS region where we will deploy VPCs, Aviatrix Gateways, and EC2 instances"
type = string
default = "us-east-1"
}
variable "aws_region_short" {
description = "Short format to indicate AWS region in VPCs and Gateways names"
type = string
default = "use1"
}
variable "aws_account_name" {
description = "Name of your AWS account in the Aviatrix Controller"
type = string
}
variable "aws_transit_cidr" {
description = "CIDR used for the Transit VPC in AWS"
type = string
default = "10.1.0.0/23"
}
variable "aws_spoke_cidr_list" {
description = "CIDR blocks for the Spoke VPCs in AWS"
type = list(string)
default = ["10.10.1.0/24", "10.10.2.0/24", "10.10.3.0/24"]
}
variable "aws_s2c_region" {
description = "Region for the S2C VPCs in AWS"
type = string
default = "us-west-2"
}
variable "aws_s2c_cidr" {
description = "CIDR block for the S2C VPCs in AWS"
type = string
default = "172.16.0.0/23"
}
variable "aws_test_ec2_hostnum" {
description = "Defines the host number / IP address of the test EC2 instance in a Spoke VPC in AWS"
type = number
default = 5
}
variable "aws_transit_gateway_size" {
description = "Instance size used for Aviatrix Transit Gateways on AWS"
type = string
default = "t3.medium"
}
variable "aws_firenet_gateway_size" {
description = "Instance size used for Aviatrix Transit Gateways on AWS"
type = string
default = "c5.xlarge"
}
variable "aws_firewall_size" {
description = "Instance size used for Aviatrix Spoke Gateways on AWS"
type = string
default = "c5.xlarge"
}
variable "aws_spoke_gateway_size" {
description = "Instance size used for Aviatrix Spoke Gateways on AWS"
type = string
default = "t3.small"
}
variable "aws_test_ec2_size" {
description = "Size of instances that will be deployed per spoke VPC in AWS"
type = string
default = "t3.nano"
}
variable "aws_key_name" {
description = "Key name of your previously generated instance key - used to connect to Linux EC2 test instances"
type = string
default = "aviatrix-lab-aws"
}
variable "aws_iam_bootstrap_role" {
description = "IAM Role used to access bootstrap file in S3 bucket"
type = string
default = ""
}
variable "aws_bootstrap_bucket" {
description = "Name of the S3 bucket that contains the bootstrap file"
type = string
default = ""
}
variable "deploy_azure" {
description = "Deploy Azure as part of the Multi-Cloud Transit"
type = bool
default = true
}
variable "azure_prefix" {
description = "Prefix used for resources in Azure"
type = string
default = "azr"
}
variable "azure_region" {
description = "Azure region where we will deploy VNets, Aviatrix Gateways, and Virtual Machines"
type = string
default = "France Central"
}
variable "azure_region_short" {
description = "Short format to indicate Azure region in VNets and Gateways names"
type = string
default = "frct"
}
variable "azure_account_name" {
description = "Name of your Azure account in the Aviatrix Controller"
type = string
}
variable "azure_resource_group" {
description = "Resource Group to use in your Azure Account"
type = string
}
variable "azure_transit_cidr" {
description = "CIDR used for the Azure Transit VNet"
type = string
default = "10.2.0.0/23"
}
variable "azure_spoke_cidr_list" {
description = "CIDR blocks for the Spoke VNets in Azure"
type = list(string)
default = ["10.20.1.0/24", "10.20.2.0/24", "10.20.3.0/24"]
}
variable "azure_test_vm_hostnum" {
description = "Defines the host number / IP address of the test VM in a Spoke VPC in Azure"
type = number
default = 13
}
variable "azure_transit_gateway_size" {
description = "VM size used for Aviatrix Transit Gateways on Azure"
type = string
default = "Standard_B2s"
}
variable "azure_firenet_gateway_size" {
description = "Instance size used for Aviatrix Transit Gateways on Azure"
type = string
default = "Standard_B2ms"
}
variable "azure_firewall_size" {
description = "Instance size used for Aviatrix Spoke Gateways on Azure"
type = string
default = "Standard_D3_v2"
}
variable "azure_spoke_gateway_size" {
description = "VM size used for Aviatrix Spoke Gateways on Azure"
type = string
default = "Standard_B2s"
}
variable "azure_test_vm_size" {
description = "Size of VMs that will be deployed per Spoke VPC in Azure"
type = string
default = "Standard_B1ls"
}
variable "azure_test_vm_user" {
description = "User name used on test VMs on Azure"
type = string
default = "azure-user"
}
variable "azure_key_name" {
description = "Key name of your previously generated instance key - used to connect to Linux test VMs"
type = string
default = "aviatrix-lab-azure"
}
variable "azure_public_key_path" {
description = "Path of your previously generated instance key - used to connect to Linux EC2 test instances"
type = string
default = "~/.ssh/"
}
variable "azure_bootstrap_storage" {
description = "Azure Storage Account used to store PAN FW bootstrap files"
type = string
default = ""
}
variable "azure_bootstrap_storage_access_key" {
description = "Access Key to the Azure Storage Account used to store PAN FW bootstrap files"
type = string
default = ""
}
variable "azure_bootstrap_file_share_folder" {
description = "Azure File Storage used to store PAN FW bootstrap files"
type = string
default = ""
}
variable "deploy_gcp" {
description = "Deploy GCP as part of the Multi-Cloud Transit"
type = bool
default = true
}
variable "gcp_prefix" {
description = "Prefix used for resources in GCP"
type = string
default = "gcp"
}
variable "gcp_region" {
description = "GCP region where we will deploy Subnets, Aviatrix Gateways, and GCE Instances"
type = string
default = "europe-west1"
}
variable "gcp_region_short" {
description = "Short format to indicate GCP region in Subnets and Gateways names"
type = string
default = "euw1"
}
variable "gcp_zone" {
description = "GCP zone where we will deploy GCE Instances"
type = string
default = "europe-west1-b"
}
variable "gcp_account_name" {
description = "Name of your GCP account in the Aviatrix Controller"
type = string
}
variable "gcp_project" {
description = "Project to use in your GCP Account"
type = string
}
variable "gcp_transit_cidr" {
description = "CIDR used for the GCP Transit VPCs/Subnets"
type = string
default = "10.3.0.0/23"
}
variable "gcp_firewall_cidr" {
description = "CIDR used for the GCP Firewall VPCs/Subnets (when FireNet is enabled)"
type = string
default = "10.3.2.0/23"
}
variable "gcp_spoke_cidr_list" {
description = "CIDR blocks for the Spoke VPCs/Subnets in Azure"
type = list(string)
default = ["10.30.1.0/24", "10.30.2.0/24", "10.30.3.0/24"]
}
variable "gcp_test_instance_hostnum" {
description = "Defines the host number / IP address of the test instance in a Spoke VPC/Subnet in GCP"
type = number
default = 5
}
variable "gcp_transit_gateway_size" {
description = "Instance size used for Aviatrix Transit Gateways on GCP"
type = string
default = "n1-standard-1"
}
variable "gcp_firenet_gateway_size" {
description = "Instance size used for Aviatrix Transit Gateways on GCP"
type = string
default = "n1-standard-1"
}
variable "gcp_firewall_size" {
description = "Instance size used for Aviatrix Spoke Gateways on GCP"
type = string
default = "n1-standard-4"
}
variable "gcp_spoke_gateway_size" {
description = "Instance size used for Aviatrix Spoke Gateways on GCP"
type = string
default = "n1-standard-1"
}
variable "gcp_test_instance_size" {
description = "Size of instances that will be deployed per Spoke VPC/Subnet in GCP"
type = string
default = "f1-micro"
}
variable "enable_firenet_on_aws" {
description = "Enable Transit FireNet on AWS"
type = bool
default = false
}
variable "use_aws_gwlb" {
description = "Enable GWLB for Transit FireNet on AWS"
type = bool
default = false
}
variable "enable_firenet_on_azure" {
description = "Enable Transit FireNet on Azure"
type = bool
default = false
}
variable "prepare_firenet_on_azure" {
description = "Make sure Transit FireNet is enabled on Azure Transit (VNet/GW ready for a FW to be deployed)"
type = bool
default = false
}
variable "enable_firenet_on_gcp" {
description = "Enable Transit FireNet on GCP"
type = bool
default = false
}
variable "deploy_checkpoint_fw" {
description = "Deploy Checkpoint FW rather than Palo Alto"
type = bool
default = false
}
variable "checkpoint_user_data_file" {
description = "Local file with User Data to bootstrap Checkpoint FW"
type = string
default = "./User Data/user_data_checkpoint.sh"
}
variable "egress_transit_firenet" {
description = "Enable Egress through Transit FireNet"
type = bool
default = false
}
variable "fw_username" {
description = "Username used for FireNet Vendor Integration"
type = string
default = ""
}
variable "fw_password" {
description = "Username used for FireNet Vendor Integration"
type = string
default = ""
}
variable "enable_s2c_on_aws" {
description = "Enable Site-2-Cloud on AWS"
type = bool
default = true
}
variable "transit_ha" {
description = "Enable HA for Aviatrix Transit Gateways"
type = bool
default = true
}
variable "spoke_ha" {
description = "Enable HA for all Aviatrix Spoke Gateways"
type = bool
default = false
}
variable "spoke_ha_first_vpc_only" {
description = "Enable HA only for the Aviatrix Spoke Gateway in the first VPC/VNet of each CSP"
type = bool
default = true
}
variable "hpe" {
description = "Enable HPE / Insane Mode on Gateways"
type = bool
default = false
}
variable "source_nat_on_spoke" {
description = "Enable Single IP Source NAT on Spoke Gateways"
type = bool
default = false
}
variable "segmentation" {
description = "Enable Segmentation for Aviatrix Transit Gateways"
type = bool
default = true
}
variable "segmentation_domain_list" {
description = "Segmentation Domains for the Spoke VPC/VNets"
type = list(string)
default = ["prod", "dev", "shared"]
}
variable "customer_prefix" {
description = "Prefix used for all resources, to identify a specific customer"
type = string
default = "avx-"
}
variable "spoke_name_list" {
description = "Names for the Spoke VPC/VNets"
type = list(string)
default = ["prod", "dev", "shared"]
}
variable "aws_jumphost_target_spoke_vpc" {
description = "Index of spoke_name_list that indicates which VPC the jumphost public EC2 instance will be placed into"
type = number
default = 2
}
variable "aws_linux2_on_aws_ec2" {
description = "Use the AWS Linux2 AMI for AWS EC2 test instances"
type = bool
default = true
}
variable "aws_linux2_user_data_file" {
description = "Name of the local file used for Linux Instances User Data in AWS"
type = string
default = "./User Data/user_data_aws_linux2.sh"
}
variable "ubuntu_user_data_file" {
description = "Name of the local file used for Linux VM/Instances User Data"
type = string
default = "./User Data/user_data_ubuntu.sh"
}
variable "tags" {
description = "Tags added to each provisionned construct"
type = map(string)
default = {
Environment = "avx-mcna-as-code"
}
}
locals {
aws_jumphost_spoke_vpc = min(length(var.spoke_name_list) - 1, var.aws_jumphost_target_spoke_vpc)
aws_test_ec2_jumphostnum = var.aws_test_ec2_hostnum + 8
aws_test_ec2_jumphostnum_bis = var.aws_test_ec2_hostnum + 3
aws_user_data_file = var.aws_linux2_on_aws_ec2 ? var.aws_linux2_user_data_file : var.ubuntu_user_data_file
user_data_file = var.ubuntu_user_data_file
azure_public_key = "${var.azure_public_key_path}${var.azure_key_name}.pub"
my_ip_address = "${chomp(data.http.icanhazip.body)}/32"
}