-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
73 lines (66 loc) · 2.02 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
variable "project_id" {
description = "The project to deploy the ressources to."
type = string
}
variable "name" {
description = "The load balancer name."
type = string
validation {
condition = length(var.name) <= 50
error_message = "The name variable must be shorter than 50 characters."
}
}
variable "ip_address" {
description = "The load balancer's IP address."
type = string
default = ""
validation {
condition = try(regex("^([0-9]{1,3}.){3}[0-9]{1,3}$", var.ip_address), false) || var.ip_address == ""
error_message = "Please provide a valid IP address."
}
}
variable "ssl_certificates" {
description = "A list of SSL certificates for the load balancer."
type = list(string)
default = []
}
variable "buckets_backends" {
description = "A map of buckets to add as the load balancer backends."
type = map(object({
hosts = list(string)
bucket_name = string
cdn_policy = optional(string)
path_rules = list(object({
paths = list(string)
}))
security_policy = optional(string)
}))
}
variable "service_backends" {
description = "A map of services to add as the load balancer backends. "
type = map(object({
hosts = list(string)
groups = list(string)
path_rules = list(object({
paths = list(string)
}))
security_policy = optional(string)
}))
}
variable "custom_cdn_policies" {
description = "A map of additional custom CDN policies you can add to the load balancer."
type = map(object({
cache_mode = optional(string, null)
client_ttl = optional(number, null)
default_ttl = optional(number, null)
max_ttl = optional(number, null)
negative_caching = optional(bool, null)
negative_caching_policy = optional(map(object({
code = optional(number, null)
ttl = optional(number, null)
})), null)
serve_while_stale = optional(number, null)
signed_url_cache_max_age_sec = optional(number, null)
}))
default = {}
}