-
Notifications
You must be signed in to change notification settings - Fork 2
/
variables.tf
71 lines (61 loc) · 2.06 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
variable "cloudflare_account_id" {
type = string
description = "Cloudflare account ID"
}
variable "cloudflare_zone" {
type = string
description = "Domain name (NS must be connected and verified in Cloudflare)"
}
variable "vpc_id" {
type = string
description = "VPC ID"
}
variable "private_subnets" {
type = list(string)
description = "List of private subnets to launch the Cloudflare instances in (must be same VPC under VPC ID)"
}
variable "ingress_rules" {
type = list(object({
hostname = optional(string)
path = optional(string)
service = string
}))
default = [{
service = "http_status:404"
}]
description = "List of ingress rules to allow traffic to (see cloudflare_tunnel_config docs, access_block not supported right now)"
}
variable "prefix" {
type = string
description = "Prefix to add to all resources"
default = "cf-tunnel"
}
variable "desired_count" {
type = number
description = "Number of instances to run initially, choose 3 or more for high availability across AZs"
default = 3
}
variable "fargate_type" {
type = string
description = "Use spot instances or regular instances (FARGATE_SPOT or FARGATE), SPOT is much cheaper and does not really affect availability in this case"
validation {
condition = length(regexall("^(FARGATE_SPOT|FARGATE)$", var.fargate_type)) > 0
error_message = "ERROR: Valid types are \"FARGATE_SPOT\" and \"FARGATE\"!"
}
default = "FARGATE_SPOT"
}
variable "cloudflare_version" {
type = string
description = "Cloudflare version to use, defaults to latest but best to pick a docker tag version to prevent issues"
default = "latest"
}
variable "cpu" {
type = number
description = "CPU units to allocate to each instance, defaults to 256, needs to be within Fargate configuration limits"
default = 256
}
variable "memory" {
type = number
description = "Memory units to allocate to each instance, defaults to 512, needs to be within Fargate configuration limits"
default = 512
}