-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
71 lines (60 loc) · 1.48 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 "first_name" {
type = string
}
variable "middle_initial" {
type = string
validation {
condition = can(regex("[A-Z]", var.middle_initial))
error_message = "Middle initial must be one uppercase letter."
}
}
variable "last_name" {
type = string
}
variable "address" {
sensitive = true
type = string
}
variable "phone_number" {
sensitive = true
type = string
validation {
condition = can(regex("^[0-9]{3}-[0-9]{3}-[0-9]{4}$", var.phone_number))
error_message = "Phone number must be in the format xxx-xxx-xxxx ."
}
}
variable "email_address" {
type = string
validation {
# This regex is _extremely_ forgiving.
condition = can(regex("^.+@.+[.].+$", var.email_address))
error_message = "Email address must be in the format [email protected] ."
}
}
variable "tagline" {
type = string
}
variable "work_history" {
sensitive = true
type = list(object({
job_type = string
company = string
start_year = string
end_year = string
positions = list(object({
title = string
tasks = list(string)
responsibilities = optional(list(object({
top_level = string
sub_level = optional(list(string))
})))
}))
}))
}
variable "github_page" {
type = string
validation {
condition = can(regex("^https://github.com/.+/.+$", var.github_page))
error_message = "github_page must be a valid GitHub repo page of the form https://github.com/<organization>/<project>"
}
}