-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
171 lines (144 loc) · 4.22 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
# google
variable "org_id" {
type = string
description = "The organization ID to create projects in."
}
variable "project_id" {
type = string
description = "The project ID to host the cluster in."
}
variable "project_services" {
type = set(string)
description = "The project ID to host the cluster in."
default = [
"container.googleapis.com",
"redis.googleapis.com",
]
}
variable "billing_account" {
type = string
description = "The project ID to host the cluster in."
}
variable "region" {
type = string
description = "The region to host the cluster in."
}
variable "cluster_name" {
type = string
description = "The name of the cluster to create."
}
variable database_instance_name {
type = string
default = "master-instance"
description = "The name of the database instance."
}
variable database_instance_version {
type = string
default = "MYSQL_8_0"
description = "The version of the database instance."
}
variable database_instance_tier {
type = string
default = "db-f1-micro"
description = "The tier of the database instance."
}
variable database_instance_allowed_network {
type = string
default = "standard"
description = "A CIDR notation IPv4 or IPv6 address that is allowed to access the database instance."
}
variable database_name {
type = string
default = "database"
description = "The name of the database."
}
variable database_collation {
type = string
default = "utf8_unicode_ci"
description = "The collation of the database."
}
variable database_seed_file {
type = string
default = "schema.sql"
description = "The name of the file to seed the database."
}
variable database_credentials {
type = object({
user = string
password = string
})
description = "The name of the file to seed the database."
}
variable redis_instance_name {
type = string
default = "memory-cache"
description = "The name of the redis instance."
}
variable redis_instance_tier {
type = string
default = "STANDARD_HA" # Possible values are `BASIC` and `STANDARD_HA`
description = "The tier of the redis instance."
}
variable redis_instance_size {
type = number
default = 1
description = "The size of the redis instance."
}
# kubernetes
variable "deployment_name" {
type = string
default = "nginx"
description = "Name of the kubernetes deployment."
}
variable deployment_replicas {
type = number
default = 2
description = "The number of replicas for the deployment."
}
variable deployment_image {
type = string
default = "nginx:1.20.2"
description = "The image for the main container of the deployment."
}
variable deployment_port {
type = string # use string instead of number since we won't be doing math on it.
default = "80"
description = "The port to expose on the main container of the deployment."
}
# Depending on the use case, these 4 variables for the container request quotas
# could make more sense as an object/map variable.
variable deployment_cpu_limit {
type = string
default = "500m"
description = "The CPU limit on the main container of the deployment."
}
variable deployment_mem_limit {
type = string
default = "512Mi"
description = "The memory limit on the main container of the deployment."
}
variable deployment_cpu_requests {
type = string
default = "250m"
description = "The CPU requests on the main container of the deployment."
}
variable deployment_mem_requests {
type = string
default = "50Mi"
description = "The memory requets on the main container of the deployment."
}
variable deployment_hpa_max_replicas {
type = number
default = 8
description = "The max replicas for the deployment HPA."
}
variable deployment_hpa_min_replicas {
type = number
default = null
description = "The max replicas for the deployment HPA. If not set, defaults to deploy replicas."
}
variable deployment_hpa_target_cpu_percent {
type = number
default = 50
description = "The target average CPU utilization for the deployment HPA."
}