From 52a9a94b32d9f07d48d27fe70e8271bd0e932cd2 Mon Sep 17 00:00:00 2001 From: shockrah Date: Tue, 27 Dec 2022 21:01:46 -0800 Subject: [PATCH] Importing shockrah.xyz A records into terraform --- infra/route53-shockrah-xyz.tf | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/infra/route53-shockrah-xyz.tf b/infra/route53-shockrah-xyz.tf index d407d21..a4db2a1 100644 --- a/infra/route53-shockrah-xyz.tf +++ b/infra/route53-shockrah-xyz.tf @@ -23,6 +23,7 @@ locals { { name = "shockrah.xyz" type = "SOA" + ttl = 900 records = [ "ns-612.awsdns-12.net. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400" ] @@ -32,7 +33,11 @@ locals { type = "TXT" ttl = 300 records = [ "v=spf1 include:_mailcust.gandi.net ?all" ] - } + }, + { name = "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 = "www.shockrah.xyz", records = [ aws_eip.beta_eip.public_ip ] }, ] } @@ -41,12 +46,11 @@ resource "aws_route53_record" "shockrah-xyz-record" { for index, record in local.records: index => record } - #for_each = toset(local.records) zone_id = aws_route53_zone.shockrah-xyz.id name = each.value.name type = lookup(each.value, "type", "A") - ttl = lookup(each.value, "ttl", 900) + ttl = lookup(each.value, "ttl", 300) records = each.value.records }