Terraform module for configuring route 53 with maps
This project is internal open source and currently maintained by the INF.
This project is using pre-commit to generate parts of the readme.
The following requirements are needed by this module:
- terraform (>= 0.12)
The following providers are used by this module:
- aws
The following input variables are required:
Description: zone id of domain
Type: string
The following input variables are optional (have default values):
Description: map of objects for A alias records
Type:
map(object({
name = string
record = string
zone_id = string
}))
Default: {}
Description: map of objects for A records
Type:
map(object({
name = string
records = list(string)
}))
Default: {}
Description: map of objects for AAAA alias records
Type:
map(object({
name = string
record = string
zone_id = string
}))
Default: {}
Description: map of objects for AAAA records
Type:
map(object({
name = string
records = list(string)
}))
Default: {}
Description: map of objects for CNAME records
Type:
map(object({
name = string
records = list(string)
}))
Default: {}
Description: list of mx records with weight
Type: list(string)
Default: []
Description: map of objects for NS records
Type:
map(object({
name = string
records = list(string)
}))
Default: {}
Description: map of objects for SRV records
Type:
map(object({
name = string
records = list(string)
}))
Default: {}
Description: ttl
Type: string
Default: "300"
Description: map of objects for TXT records
Type:
map(object({
name = string
records = list(string)
}))
Default: {}
The following outputs are exported:
Description: n/a
Description: n/a
Description: n/a
Description: n/a
Description: n/a
Description: n/a
Description: n/a
Description: n/a
get the zone
data "aws_route53_zone" "zone" {
name = "${var.domain}."
}
module "route_53" {
zone_id = data.aws_route53_zone.zone.id
ttl = 300
a_records = {
1 = {
name = ""
records = ["1.2.3.4"]
}
}
aaaa_records = {
1 = {
name = ""
records = ["1.2.3.4"]
}
}
a_alias_records = {
1 = {
name = "www"
record = "webservice-main-alb-123465789012.eu-central-1.elb.amazonaws.com"
zone_id = "ABCDEFGHIJKLMN" // zone_id of the loadbalancer
}
}
aaaa_alias_records = {
1 = {
name = "www"
record = "webservice-main-alb-123465789012.eu-central-1.elb.amazonaws.com"
zone_id = "ABCDEFGHIJKLMN" // zone_id of the loadbalancer
}
}
cname_records = {
1 = {
name = "name"
records = ["foo.bar"]
}
}
txt_records = {
root = {
name = ""
records = ["v=spf1", "site-verification=dummy"]
}
1 = {
name = "name"
records = ["domainkey=foo", "challenge=other"]
}
}
mx_records = [
"1 aspmx.l.google.com",
"5 alt2.aspmx.l.google.com",
"5 alt1.aspmx.l.google.com",
"10 aspmx2.googlemail.com",
"10 aspmx3.googlemail.com",
]
ns_records = {
1 = {
name = "kite"
records = [
"ns-420.awsdns.com",
"ns-69.awsdns.org",
"ns-42069.awsdns.net",
]
}
}
source = "github.com/ryte/INF-tf-route-53.git?ref=v0.3.1"
}
- 0.3.1 - Add support for AAAA and AAAA Alias records
- 0.3.0 - Add support for creating NS records subdomain
- 0.2.1 - Utilize terraform 0.12.x features
- 0.2.0 - Upgrade to terraform 0.12.x
- 0.1.2 - Update output variable of all records
- 0.1.1 - Separate variable for TXT records for root domain
- 0.1.0 - Initial release.
This software is released under the MIT License (see LICENSE
).