-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
133 lines (113 loc) · 4.29 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
variable "records" {
description = <<EOF
List of Maps of the records.
`name`
The name of the record.
Modifying this attribute will force creation of a new resource.
`type`
The type of the record. Available values: [A, AAAA, CAA, CNAME, TXT, SRV, LOC, MX, NS,
SPF, CERT, DNSKEY, DS, NAPTR, SMIMEA, SSHFP, TLSA, URI, PTR, HTTPS, SVCB].
Modifying this attribute will force creation of a new resource.
`zone_id`
The zone identifier to target for the resource.
Modifying this attribute will force creation of a new resource.
`allow_overwrite`
Allow creation of this record in Terraform to overwrite an existing record, if any.
This does not affect the ability to update the record in Terraform and does not prevent
other resources within Terraform or manual changes outside Terraform from overwriting this record.
This configuration is not recommended for most environments. Defaults to false.
`comment`
Comments or notes about the DNS record. This field has no effect on DNS responses.
`priority`
The priority of the record.
`proxied`
Whether the record gets Cloudflare's origin protection.
`tags`
Custom tags for the DNS record.
`ttl`
The TTL of the record.
`value`
The value of the record. Conflicts with data.
`timeouts`
(Block, Optional) The Timeout settings.
`data`
(Block List, Max: 1) Map of attributes that constitute the record value. Conflicts with value.
EOF
type = list(object({
name = string
value = optional(string)
type = string
ttl = number
proxied = bool
zone_id = string
allow_overwrite = optional(bool)
priority = optional(number)
tags = optional(set(string))
comment = optional(string)
data = optional(object({
algorithm = optional(number)
altitude = optional(number)
certificate = optional(string)
content = optional(string)
digest = optional(string)
digest_type = optional(number)
fingerprint = optional(string)
flags = optional(string)
key_tag = optional(number)
lat_degrees = optional(number)
lat_direction = optional(string)
lat_minutes = optional(number)
lat_seconds = optional(number)
long_degrees = optional(number)
long_direction = optional(string)
long_minutes = optional(number)
long_seconds = optional(number)
matching_type = optional(number)
name = optional(string)
order = optional(number)
port = optional(number)
precision_horz = optional(number)
precision_vert = optional(number)
preference = optional(number)
priority = optional(number)
proto = optional(string)
protocol = optional(number)
public_key = optional(string)
regex = optional(string)
replacement = optional(string)
selector = optional(number)
service = optional(string)
size = optional(number)
tag = optional(string)
target = optional(string)
type = optional(number)
usage = optional(number)
value = optional(string)
weight = optional(number)
}))
timeouts = optional(object({
create = optional(string)
update = optional(string)
}))
}))
default = [
{
name = null
proxied = null
ttl = null
type = null
value = null
zone_id = null
allow_overwrite = null
priority = null
tags = null
comment = null
data = null
timeouts = null
},
]
validation {
condition = contains(["A", "AAAA", "CNAME", "MX", "NS", "SOA", "SRV", "PTR", "CAA", "APL", "AFSDB", "DNSKEY", "CDNSKEY", "CERT", "DCHID", "DNAME", "HIP", "IPSECKEY", "LOC", "NAPTR", "NSEC", "RRSIG", "RP", "SSHFP"], var.records[0].type)
error_message = "Invalid record Type value. Please make sure the enter one of the supported records types [A, AAAA, CAA, CNAME, TXT, SRV, LOC, MX, NS, SPF, CERT, DNSKEY, DS, NAPTR, SMIMEA, SSHFP, TLSA, URI, PTR, HTTPS, SVCB]"
}
}