forked from wandb/terraform-google-wandb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
209 lines (178 loc) · 5.43 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
##########################################
# Common #
##########################################
variable "namespace" {
type = string
description = "String used for prefix resources."
}
variable "deletion_protection" {
description = "If the instance should have deletion protection enabled. The database / Bucket can't be deleted when this value is set to `true`."
type = bool
default = true
}
variable "labels" {
type = map(string)
description = "Labels to apply to resources"
default = {}
}
variable "use_internal_queue" {
type = bool
description = "Uses an internal redis queue instead of using google pubsub."
default = false
}
variable "wandb_version" {
description = "The version of Weights & Biases local to deploy."
type = string
default = "latest"
}
variable "wandb_image" {
description = "Docker repository of to pull the wandb image from."
type = string
default = "wandb/local"
}
variable "license" {
type = string
description = "Your wandb/local license"
}
variable "oidc_issuer" {
type = string
description = "A url to your Open ID Connect identity provider, i.e. https://cognito-idp.us-east-1.amazonaws.com/us-east-1_uiIFNdacd"
default = ""
}
variable "oidc_client_id" {
type = string
description = "The Client ID of application in your identity provider"
default = ""
}
variable "oidc_secret" {
type = string
description = "The Client secret of application in your identity provider"
default = ""
sensitive = true
}
variable "oidc_auth_method" {
type = string
description = "OIDC auth method"
default = "implicit"
validation {
condition = contains(["pkce", "implicit"], var.oidc_auth_method)
error_message = "Invalid OIDC auth method."
}
}
variable "local_restore" {
type = bool
description = "Restores W&B to a stable state if needed"
default = false
}
variable "gke_machine_type" {
description = "Specifies the machine type to be allocated for the database"
type = string
default = "n1-standard-4"
}
variable "resource_limits" {
description = "Specifies the resource limits for the wandb deployment"
type = map(string)
default = {
cpu = null
memory = null
}
}
variable "resource_requests" {
description = "Specifies the resource requests for the wandb deployment"
type = map(string)
default = {
cpu = "2000m"
memory = "2G"
}
}
##########################################
# Networking #
##########################################
variable "network" {
default = null
description = "Pre-existing network self link"
type = string
}
variable "subnetwork" {
default = null
description = "Pre-existing subnetwork self link"
type = string
}
variable "allowed_inbound_cidrs" {
default = ["*"]
description = "Which IPv4 addresses/ranges to allow access. This must be explicitly provided, and by default is set to [\"*\"]"
nullable = false
type = list(string)
}
##########################################
# DNS #
##########################################
variable "domain_name" {
type = string
default = null
description = "Domain for accessing the Weights & Biases UI."
}
variable "subdomain" {
type = string
default = null
description = "Subdomain for accessing the Weights & Biases UI. Default creates record at Route53 Route."
}
variable "ssl" {
type = bool
default = true
description = "Enable SSL certificate"
}
##########################################
# Database #
##########################################
variable "database_version" {
description = "Version for MySQL"
type = string
default = "MYSQL_8_0_31"
}
variable "database_machine_type" {
description = "Specifies the machine type to be allocated for the database"
type = string
default = "db-n1-standard-2"
}
variable "database_sort_buffer_size" {
description = "Specifies the sort_buffer_size value to set for the database"
type = number
default = 67108864
}
variable "force_ssl" {
description = "Enforce SSL through the usage of the Cloud SQL Proxy (cloudsql://) in the DB connection string"
type = bool
default = false
}
##########################################
# Redis #
##########################################
variable "create_redis" {
type = bool
description = "Boolean indicating whether to provision an redis instance (true) or not (false)."
default = false
}
##########################################
# External Bucket #
##########################################
# Most users will not need these settings. They are ment for users who want a
# bucket in a different account.
variable "bucket_name" {
type = string
description = "Use an existing bucket."
default = ""
}
##########################################
# General Application #
##########################################
variable "disable_code_saving" {
type = bool
description = "Boolean indicating if code saving is disabled"
default = false
}
variable "other_wandb_env" {
type = map(string)
description = "Extra environment variables for W&B"
default = {}
}