nixos-config/terraform/terranix.org/targets/namecheap/main.tf
2024-04-04 21:26:10 +02:00

76 lines
No EOL
1.9 KiB
HCL

locals {
minutes = 60
hours = 60 * local.minutes
days = 24 * local.hours
normal_ttl = 12 * local.hours
short_ttl = 30 * local.minutes
very_short_ttl = 2 * local.minutes
orbi = "95.216.66.212"
robi = "144.76.13.147"
}
resource "namecheap_domain_records" "terranix" {
domain = "terranix.org"
mode = "OVERWRITE"
email_type = "OX"
# terranix.org
record {
address = "terranix.github.io"
hostname = "@"
mx_pref = 10
ttl = local.normal_ttl
type = "CNAME"
}
record {
address = "terranix.github.io"
hostname = "www"
mx_pref = 10
ttl = local.normal_ttl
type = "CNAME"
}
# matrix.terranix.org
record {
address = local.orbi
hostname = "matrix"
mx_pref = 10
ttl = local.short_ttl
type = "A"
}
record {
address = local.orbi
hostname = "element"
mx_pref = 10
ttl = local.normal_ttl
type = "A"
}
# Github Challenges
record {
address = "c3fd9329fe"
hostname = "_github-challenge-terranix-org"
mx_pref = 10
ttl = local.normal_ttl
type = "TXT"
}
record {
address = "ece2e1608cde1d7785b1315d0b0019"
hostname = "_github-pages-challenge-terranix"
mx_pref = 10
ttl = local.normal_ttl
type = "TXT"
}
# Mail Challenges
record {
address = "v=DKIM1;k=rsa;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvlSGd9dcuYFJ8CNAIgF/IWzKD8MlW41V4QeMgWgAQvKCW4JU2pF9IlcQGN+7IQf4PtJlzr/ClUspex58q75IZUjcLCGU0QdaqWPveQuIlS4JwgQadfNc8JtOiDlUSxMWfpROyvNyLtXUQftUvmppJDml2evo2OA5CpN7cKPzR4KcVINHlaL23m7mw9rLWWIpoxaGgp/aTi/a9m3PovUQ/lfDPrgvnmEGIc9piVO3DVE64dB/7yAZe9Jd2Qka3nwq5x3so1YPIOKXVK8G40NlyBOfPdKOeKhERuFL5zMIsLlcJd0BeLiuVqobc6DWLQMjrKDUEVnBsx2dJmhosqeG2wIDAQAB"
hostname = "default._domainkey"
mx_pref = 10
ttl = local.normal_ttl
type = "TXT"
}
}