Recently Written · git

subplz-web

git clone https://github.com/equwal/subplz-web

Log | Files | Refs


infra/burst/workers/aws/variables.tf (1589 bytes)

1 variable "workers" {
2   description = "The workers on AWS: machine name -> app commit, instance type, availability zone. The burst controller writes this."
3   type = map(object({
4     ref     = string
5     machine = string
6     zone    = string
7   }))
8   default = {}
9 
10   validation {
11     condition     = alltrue([for name in keys(var.workers) : can(regex("^subplz-burst-[0-9a-z-]{1,40}$", name))])
12     error_message = "Each worker name must start with subplz-burst-: the controller finds its workers by that prefix."
13   }
14   validation {
15     condition     = alltrue([for w in values(var.workers) : can(regex("^[0-9a-f]{40}$", w.ref))])
16     error_message = "Each ref must be a full git commit hash."
17   }
18 }
19 
20 variable "max_price" {
21   description = "Highest spot price per hour, in USD. Above it AWS does not start the machine."
22   type        = string
23   default     = "0.0625"
24 }
25 
26 variable "threads" {
27   description = "Whisper threads: all vCPUs of an xlarge instance."
28   type        = number
29   default     = 4
30 }
31 
32 variable "idle_checks" {
33   description = "Idle checks (10 minutes each) before a machine powers itself off, if the controller is gone."
34   type        = number
35   default     = 9
36 }
37 
38 variable "subplz_spec" {
39   description = "The subplz package, pinned to the commit that the web server runs."
40   type        = string
41   default     = "subplz @ git+https://github.com/kanjieater/SubPlz.git@6be8b6fab185372b458bdde13c61f4da204dc6fc"
42 }
43 
44 variable "state_file" {
45   description = "Path of the state file of ../../state."
46   type        = string
47   default     = "/var/lib/subplz-burst/state.tfstate"
48 }