Cleaning up route53 entries
This commit is contained in:
parent
e2c4db294a
commit
97205a216c
@ -11,8 +11,9 @@ resource "aws_route53_zone" "project-athens" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
resource "aws_route53_record" "main_ns" {
|
locals {
|
||||||
zone_id = aws_route53_zone.project-athens.id
|
project-athens-records = [
|
||||||
|
{
|
||||||
name = "project-athens.xyz"
|
name = "project-athens.xyz"
|
||||||
type = "NS"
|
type = "NS"
|
||||||
ttl = 172800
|
ttl = 172800
|
||||||
@ -22,15 +23,27 @@ resource "aws_route53_record" "main_ns" {
|
|||||||
"ns-1109.awsdns-10.org.",
|
"ns-1109.awsdns-10.org.",
|
||||||
"ns-11.awsdns-01.com.",
|
"ns-11.awsdns-01.com.",
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
{
|
||||||
resource "aws_route53_record" "main_soa" {
|
|
||||||
zone_id = aws_route53_zone.project-athens.id
|
|
||||||
name = "project-athens.xyz"
|
name = "project-athens.xyz"
|
||||||
type = "SOA"
|
type = "SOA"
|
||||||
ttl = 900
|
ttl = 900
|
||||||
records = [
|
records = [
|
||||||
"ns-806.awsdns-36.net. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400"
|
"ns-806.awsdns-36.net. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400"
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "aws_route53_record" "project-athens-record" {
|
||||||
|
for_each = {
|
||||||
|
for index, record in local.project-athens-records:
|
||||||
|
index => record
|
||||||
|
}
|
||||||
|
zone_id = aws_route53_zone.project-athens.id
|
||||||
|
name = each.value.name
|
||||||
|
type = lookup(each.value, "type", "A")
|
||||||
|
ttl = lookup(each.value, "ttl", 300)
|
||||||
|
records = each.value.records
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user