-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvariables.tf
171 lines (151 loc) · 4.54 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
// --- Module Input Parameters --- //
// General deployment input parameters --- //
variable "module_wide_prefix_scope" {
description = "Scoping prefix for resources names deployed by this module, default 'otpdevapi'"
type = string
default = "otpdevapi"
}
variable "project_id" {
description = "Project ID where to deploy resources"
type = string
}
variable "network_name" {
description = "Name of the network where resources should be connected to, default 'default'"
type = string
default = "default"
}
variable "network_self_link" {
description = "Self link to the network where resources should be connected when deployed"
type = string
default = "default"
}
variable "network_subnet_name" {
description = "Name of the subnet, within the 'network_name', and the given region, where instances should be connected to, default 'main-subnet'"
type = string
default = "main-subnet"
}
variable "network_source_ranges_map" {
description = "CIDR that represents which IPs we want to grant access to the deployed resources"
// This iteration won't check the type, this definition will be refined in future iterations
type = any
/*[
region = {
subnet_ip = "CIDR"
}
]
*/
}
variable "network_sources_health_checks" {
description = "Source CIDR for health checks, default '[ 130.211.0.0/22, 35.191.0.0/16 ]'"
default = [
"130.211.0.0/22",
"35.191.0.0/16"
]
}
// --- API Instances configuration --- //
variable "deployment_regions" {
description = "List of regions where the API nodes should be deployed"
type = list(string)
}
variable "vm_firewall_tags" {
description = "List of additional tags to attach to API nodes"
type = list(string)
default = []
}
variable "vm_platform_api_image_version" {
description = "API Docker image version to use in deployment"
type = string
}
variable "vm_api_vcpus" {
description = "CPU count for API nodes, default '2'"
type = number
default = "2"
}
variable "vm_api_mem" {
description = "Amount of memory allocated for API nodes (MiB), default '7680'"
type = number
default = "7680"
}
variable "vm_api_image" {
description = "VM image to use for API nodes, default 'cos-stable'"
type = string
default = "cos-stable"
}
variable "vm_api_image_project" {
description = "Project hosting the VM image, default 'cos-cloud'"
type = string
default = "cos-cloud"
}
variable "vm_api_boot_disk_size" {
description = "Boot disk size for API nodes, default '10GB'"
type = string
default = "10GB"
}
variable "vm_flag_preemptible" {
description = "Use this flag to tell the module to use a preemptible instance, default: 'false'"
type = bool
default = false
}
variable "deployment_target_size" {
description = "Initial API node count per region"
type = number
default = 1
}
// --- API metadata --- //
variable "api_v_major" {
description = "Major API Version"
type = string
}
variable "api_v_minor" {
description = "Minor API Version"
type = string
}
variable "api_v_patch" {
description = "Patch API Version"
type = string
}
variable "api_d_year" {
description = "API data - year"
type = string
}
variable "api_d_month" {
description = "API data - month"
type = string
}
variable "api_d_iteration" {
description = "API data - iteration"
type = string
}
variable "api_ignore_cache" {
description = "Disable API caching"
type = bool
default = false
}
// --- Backend Connection Information --- //
variable "backend_connection_map" {
description = "Information on where to connect to data backend services"
// This iteration won't check the type, this definition will be refined in future iterations
type = any
/*
{
"region" = {
"host_clickhouse" = "127.0.0.0",
"host_elastic_search" = "127.0.0.0"
}
}
*/
}
// --- Load Balancer configuration --- //
variable "load_balancer_type" {
description = "This will tell the module whether an ILB, GLB or no load balancer at all should be created"
type = string
validation {
condition = contains(["INTERNAL", "GLOBAL", "NONE"], var.load_balancer_type)
error_message = "Allowed values for 'load_balancer_type' are [ 'INTERNAL', 'GLOBAL', 'NONE' ]."
}
}
// --- DNS configuration --- //
variable "dns_domain_api" {
description = "This is the baseline DNS to use for all the forwarding rules that will be configured in the GLB, if chosen"
type = string
}