-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
111 lines (92 loc) · 2.65 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
variable "site_name" {
type = string
description = "Name of site"
validation {
condition = can(regex("^[a-zA-Z0-9-]{1,}$", var.site_name))
error_message = "Invalid site name. Must only contain alphanumeric and \"-\""
}
}
variable "region" {
type = string
description = "Region to deploy to - https://shorturl.at/htvyK"
default = "lon"
}
variable "description" {
type = string
description = "Description of site (Shown in DO portal)"
default = "Managed by Terraform"
}
variable "environment" {
type = string
description = " One of Production/Development/Staging (Shown in DO portal)"
default = "Development"
}
variable "domain" {
type = string
description = "FQDN to setup for the site"
validation {
condition = can(regex("^([a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}$", var.domain))
error_message = "Invalid domain name."
}
}
variable "source_repo" {
type = string
description = "GitHub repo containing site source (example-user/example-repo)"
}
variable "source_branches" {
type = map(string)
description = "Map of URLs to deploy to and branches to deploy from (e.g. 'main' = '/')"
default = {
"main" = "/"
}
}
variable "env_variables" {
type = map(string)
description = "Map of app-wide environment variables to set"
default = {}
}
variable "source_dir" {
type = string
description = "Directory within repo containg site source"
}
variable "output_dir" {
type = string
description = "Directory where site files can be found post-build"
}
variable "build_command" {
type = string
description = "Command to build site from source"
}
variable "index_document" {
type = string
description = "Default document to serve when no path is specified"
default = "index.html"
}
variable "notfound_document" {
type = string
description = "Document to serve when a request is not found"
default = "404.html"
}
variable "external_project" {
type = string
description = "Set to the ID of an existing DigitalOcean project the site should be attached to (else one will be created)."
default = "null"
}
variable "manage_dns" {
type = bool
description = "Should this module manage DNS via Cloudflare (true/false)"
default = false
}
variable "cloudflare_zone_id" {
type = string
description = "Zone ID of the Cloudflare domain to setup"
default = "null"
}
variable "alert_policy" {
type = set(string)
description = "Map of alert policies to enable. - https://shorturl.at/GOTZ1"
default = [
"DOMAIN_FAILED",
"DEPLOYMENT_FAILED"
]
}