-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
39 lines (32 loc) · 1.45 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
variable "domain" {
type = string
description = "Fully-qualified domain to target these changes on"
validation {
condition = can(regex("^([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}$", var.domain))
error_message = "The domain must be a valid fully qualified domain name."
}
}
variable "zone_id" {
type = string
description = "AWS Route53 Zone ID to target these changes on"
validation {
condition = can(regex("^Z[A-Z0-9]+$", var.zone_id))
error_message = "The zone_id must be a valid Route 53 hosted zone ID starting with 'Z'."
}
}
variable "rua_email" {
type = string
description = "Email address for receiving DMARC aggregate reports; this SHOULD be a monitored mailbox or tool"
validation {
condition = can(regex("^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$", var.rua_email))
error_message = "The rua_email value must be a valid email address, per RFC 5322."
}
}
variable "caa_email" {
type = string
description = "Email address for receiving CAA violation reports; this SHOULD be a monitored mailbox or tool"
validation {
condition = can(regex("^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$", var.caa_email))
error_message = "The caa_email value must be a valid email address, per RFC 5322."
}
}