Cleaning up route53 entries
This commit is contained in:
parent
e2c4db294a
commit
97205a216c
@ -11,26 +11,39 @@ 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"
|
{
|
||||||
type = "NS"
|
name = "project-athens.xyz"
|
||||||
ttl = 172800
|
type = "NS"
|
||||||
records = [
|
ttl = 172800
|
||||||
"ns-806.awsdns-36.net.",
|
records = [
|
||||||
"ns-1881.awsdns-43.co.uk.",
|
"ns-806.awsdns-36.net.",
|
||||||
"ns-1109.awsdns-10.org.",
|
"ns-1881.awsdns-43.co.uk.",
|
||||||
"ns-11.awsdns-01.com.",
|
"ns-1109.awsdns-10.org.",
|
||||||
|
"ns-11.awsdns-01.com.",
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "project-athens.xyz"
|
||||||
|
type = "SOA"
|
||||||
|
ttl = 900
|
||||||
|
records = [
|
||||||
|
"ns-806.awsdns-36.net. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400"
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_route53_record" "main_soa" {
|
resource "aws_route53_record" "project-athens-record" {
|
||||||
zone_id = aws_route53_zone.project-athens.id
|
for_each = {
|
||||||
name = "project-athens.xyz"
|
for index, record in local.project-athens-records:
|
||||||
type = "SOA"
|
index => record
|
||||||
ttl = 900
|
}
|
||||||
records = [
|
zone_id = aws_route53_zone.project-athens.id
|
||||||
"ns-806.awsdns-36.net. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400"
|
name = each.value.name
|
||||||
]
|
type = lookup(each.value, "type", "A")
|
||||||
|
ttl = lookup(each.value, "ttl", 300)
|
||||||
|
records = each.value.records
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,10 +34,10 @@ locals {
|
|||||||
ttl = 300
|
ttl = 300
|
||||||
records = [ "v=spf1 include:_mailcust.gandi.net ?all" ]
|
records = [ "v=spf1 include:_mailcust.gandi.net ?all" ]
|
||||||
},
|
},
|
||||||
{ name = "shockrah.xyz", records = [ aws_eip.beta_eip.public_ip ] },
|
{ name = "shockrah.xyz", records = [ aws_eip.beta_eip.public_ip ] },
|
||||||
{ name = "freechat.shockrah.xyz", records = [ aws_eip.beta_eip.public_ip ] },
|
{ name = "freechat.shockrah.xyz", records = [ aws_eip.beta_eip.public_ip ] },
|
||||||
{ name = "resume.shockrah.xyz", records = [ aws_eip.beta_eip.public_ip ] },
|
{ name = "resume.shockrah.xyz", records = [ aws_eip.beta_eip.public_ip ] },
|
||||||
{ name = "www.shockrah.xyz", records = [ aws_eip.beta_eip.public_ip ] },
|
{ name = "www.shockrah.xyz", records = [ aws_eip.beta_eip.public_ip ] },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user