-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
45 lines (36 loc) · 1.13 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
# COMMON VARIABLES
variable "stage" {
description = "The stage of development (e.g., test, dev, staging, prod)."
type = string
validation {
condition = can(regex("^(test|dev|staging|prod)$", var.stage))
error_message = "Stage must be one of the following: test, dev, staging, prod."
}
}
variable "purpose" {
description = "A short description about the purpose of the created resource."
type = string
default = null
validation {
condition = can(regex("^([a-zA-Z0-9-_]*)$", var.purpose))
error_message = "Only the characters [a-zA-Z0-9-_] are allowed."
}
}
variable "owner" {
description = "The owner of the deployed infrastructure."
type = string
default = null
validation {
condition = length(var.owner) >= 3
error_message = "The owner name must be at least three characters long."
}
}
# CUSTOM VARIABLES
variable "subdomain" {
description = "The name of the subdomain."
type = string
validation {
condition = length(var.subdomain) >= 3
error_message = "You must define a subdomain name with at least three characters."
}
}