-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathvariables.tf
148 lines (145 loc) · 2.98 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
variable "project" {
type = string
default = ""
}
variable "service_account" {
type = string
default = ""
}
variable "region" {
type = string
default = "us-central1" #Default Region
}
variable "zone" {
type = string
default = "us-central1-c"
}
variable "auth_key" {
type = string
default = "account.json"
}
# Zones to use with Instance Group
data "google_compute_zones" "get_zones" {
}
# FortiGate Image
variable "fortigate_image" {
type = string
default = "projects/fortigcp-project-001/global/images/fortinet-fgtondemand-724-20230201-001-w-license" # v7.2.4 B1396
}
#Default
variable "instance" {
type = string
default = "n1-standard-4"
}
#Must be lower-case for VPC
variable "cluster_name" {
type = string
default = "fortigateautoscale"
}
#Must be all lower case
variable "bucket_name" {
type = string
default = "fortigateautoscale"
}
# Nodejs Version
variable "nodejs_version" {
type = string
default = "nodejs10"
}
#Source zip to be uploaded to Compute Function
variable "source_code_location" {
type = string
default = "./dist/gcp.zip"
}
variable "source_code_name" {
type = string
default = "gcp.zip"
}
# Upload a Local ssh key to the FortiGates
variable "public_key_path" {
type = string
default = ""
}
#### Network Settings ####
variable "vpc_cidr" {
type = string
default = "172.16.0.0/16"
}
variable "public_subnet" {
type = string
default = "172.16.0.0/24"
}
variable "protected_subnet" {
type = string
default = "172.16.8.0/24"
}
variable "public_managment_subnet" {
type = string
default = "172.16.16.0/24"
}
variable "sync_subnet" {
type = string
default = "172.16.24.0/24"
}
variable "firewall_allowed_range" {
type = string
default = "0.0.0.0/0"
}
# Internal Protected VPC
variable "protected_firewall_allowed_range" {
type = string
default = "0.0.0.0/0"
}
#### AutoScaling Configuration #####
variable "max_replicas" {
type = number
default = 4
}
variable "min_replicas" {
type = number
default = 2
}
variable "cooldown_period" {
type = number
default = 60
}
variable "cpu_utilization" {
type = number
default = 0.5 #Aggregated
}
# Number of instances to aim for
variable "target_size" {
type = number
default = 2
}
#### Optional Configurations ####
#Cloud Function timeout. In seconds
variable "SCRIPT_TIMEOUT" {
type = number
default = 500
}
# Time before a PRIMARY times out. In seconds
variable "PRIMARY_ELECTION_TIMEOUT" {
type = number
default = 400
}
# Admin port for the fortigate
variable "FORTIGATE_ADMIN_PORT" {
type = number
default = 8443
}
# Seconds between sending heartbeat from fortigate
variable "HEARTBEAT_INTERVAL" {
type = number
default = 25
}
# Seconds of allowed variance in heartbeats
variable "HEART_BEAT_DELAY_ALLOWANCE" {
type = number
default = 10
}
# Allowed delay between heartbeats before a heartbeat loss is counted
variable "HEART_BEAT_LOSS_COUNT" {
type = number
default = 10
}