-
Notifications
You must be signed in to change notification settings - Fork 14
/
variables.tf
174 lines (146 loc) · 4.96 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# ---------------------------------------------------------------------------------------------------------------------
# ENVIRONMENT VARIABLES
# Define these secrets as environment variables.
# ---------------------------------------------------------------------------------------------------------------------
# AWS_ACCESS_KEY_ID
# AWS_SECRET_ACCESS_KEY
# ---------------------------------------------------------------------------------------------------------------------
# REQUIRED VARIABLES
# These variables must be set when using this module.
# ---------------------------------------------------------------------------------------------------------------------
variable "name" {
description = "(Required) The name of the hosted zone. To create multiple zones at once, pass a list of names [\"zone1\", \"zone2\"]."
type = any
# Examples:
#
# Single: name = "example.com"
# Multiple: name = ["example.com", "example.io"]
#
default = null
}
# ---------------------------------------------------------------------------------------------------------------------
# OPTIONAL VARIABLES
# These variables have defaults, but may be overridden.
# ---------------------------------------------------------------------------------------------------------------------
variable "allow_overwrite" {
description = "(Optional) Default allow_overwrite value valid for all record sets."
type = bool
default = false
}
variable "comment" {
description = "(Optional) A comment for the hosted zone."
type = string
default = "Managed by Terraform"
}
variable "default_ttl" {
description = "(Optional) The default TTL ( Time to Live ) in seconds that will be used for all records that support the ttl parameter. Will be overwritten by the records ttl parameter if set."
type = number
default = 3600
}
variable "delegation_set_id" {
description = "(Optional) The ID of the reusable delegation set whose NS records you want to assign to the hosted zone."
type = string
default = null
}
variable "force_destroy" {
description = "(Optional) Whether to force destroy all records (possibly managed outside of Terraform) in the zone when destroying the zone."
type = bool
default = false
}
variable "records" {
description = "(Optional) A list of records to create in the Hosted Zone."
type = any
# We unfortunately cannot use rich value types for now, we still need to wait for optional arguments to be released.
# type = list(object({
# name = string
# ttl = number
# records = list(string)
# }))
# Example:
#
# records = [
# {
# name = "example.com"
# type = "A"
# ttl = 300
# records = [
# "172.217.16.206",
# "172.217.18.163"
# ]
# },
# {
# name = "www"
# type = "CNAME"
# ttl = 3600
# records = [
# "example.com"
# ]
# },
# {
# name = "dev"
# type = "CNAME"
# alias = {
# name = aws_elb.main.dns_name
# zone_id = aws_elb.main.zone_id
# evaluate_target_health = true
#
# }
# },
# ]
default = []
}
variable "reference_name" {
description = "(Optional) The reference name used in Caller Reference (helpful for identifying single delegation set amongst others)."
type = string
default = null
}
variable "skip_delegation_set_creation" {
description = "(Optional) Whether or not to create a delegation set and associate with the created zone."
type = bool
default = false
}
variable "tags" {
description = "(Optional) A map of tags to apply to all created resources that support tags."
type = map(string)
# Example:
#
# tags = {
# CreatedAt = "2020-02-07",
# Alice = "Bob
# }
default = {}
}
variable "vpc_ids" {
description = "(Optional) A list of IDs of VPCs to associate with a private hosted zone. Conflicts with the delegation_set_id."
type = list(string)
# Example:
#
# vpc_ids = [
# "vpc-56a5ec2c",
# "vpc-23a7efga"
# ]
default = []
}
variable "zone_id" {
description = "(Optional) A zone ID to create the records in"
type = string
default = null
# Example:
#
# zone_id = "zoneid"
}
# ------------------------------------------------------------------------------
# OPTIONAL MODULE CONFIGURATION PARAMETERS
# These variables are used to configure the module.
# See https://medium.com/mineiros/the-ultimate-guide-on-how-to-write-terraform-modules-part-1-81f86d31f024
# ------------------------------------------------------------------------------
variable "module_enabled" {
type = bool
description = "(Optional) Whether to create resources within the module or not. Default is true."
default = true
}
variable "module_depends_on" {
type = any
description = "(Optional) A list of external resources the module depends_on. Default is []."
default = []
}