-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
175 lines (139 loc) · 4.34 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
variable "project_id" {
type = string
description = "ID of a Google Cloud Project"
}
################################################################################
## Compute
################################################################################
variable "compute_network" {
type = string
}
variable "compute_subnetwork" {
type = string
}
variable "compute_region" {
type = string
}
variable "compute_instance_availability_zones" {
type = list(string)
default = []
description = "List of zones in the region defined in `compute_region` where replicas should be deployed. Empty list means that all available zones will be used."
}
variable "compute_instance_replicas" {
type = string
}
variable "compute_instance_type" {
type = string
}
variable "compute_provision_public_ipv4_address" {
type = bool
default = true
description = "Whether to provision public IPv4 address for the instances."
}
variable "compute_provision_public_ipv6_address" {
type = bool
default = true
description = "Whether to provision public IPv4 address for the instances."
}
variable "swap_size_gb" {
type = number
default = 0
description = "Size of the swap partition in GB. Default is 0, or disabled."
}
variable "queue_count" {
type = number
default = 2
description = "Number of max RX / TX queues to assign to the NIC."
validation {
condition = var.queue_count >= 2
error_message = "queue_count must be greater than or equal to 2."
}
validation {
condition = var.queue_count % 2 == 0
error_message = "queue_count must be an even number."
}
validation {
condition = var.queue_count <= 16
error_message = "queue_count must be less than or equal to 16."
}
}
################################################################################
## Observability
################################################################################
variable "observability_log_level" {
type = string
nullable = false
default = "info"
description = "Sets RUST_LOG environment variable which applications should use to configure Rust Logger. Default: 'info'."
}
################################################################################
## Regional Instance Group
################################################################################
variable "name" {
type = string
nullable = true
default = "gateway"
description = "Name of the application."
}
variable "labels" {
type = map(string)
nullable = false
default = {}
description = "Labels to add to all created by this module resources."
}
################################################################################
## Firezone Gateway
################################################################################
variable "token" {
type = string
description = "Portal token to use for authentication."
sensitive = true
}
variable "api_url" {
type = string
default = "wss://api.firezone.dev"
description = "URL of the control plane endpoint."
}
variable "artifact_url" {
type = string
default = "https://storage.googleapis.com/firezone-prod-artifacts/firezone-gateway"
description = "URL from which Firezone install script will download the gateway binary"
}
variable "vsn" {
type = string
default = "latest"
description = "Version of the Firezone gateway that is downloaded from `artifact_url`."
}
variable "health_check" {
type = object({
name = string
protocol = string
port = number
initial_delay_sec = number
check_interval_sec = optional(number)
timeout_sec = optional(number)
healthy_threshold = optional(number)
unhealthy_threshold = optional(number)
http_health_check = optional(object({
host = optional(string)
request_path = optional(string)
port = optional(string)
response = optional(string)
}))
})
nullable = false
default = {
name = "health"
protocol = "TCP"
port = 8080
initial_delay_sec = 100
check_interval_sec = 15
timeout_sec = 10
healthy_threshold = 1
unhealthy_threshold = 3
http_health_check = {
request_path = "/healthz"
}
}
description = "Health check which will be used for auto healing policy."
}