namecheap.tf

#584
Raw
Created
Sept. 28, 2022, 12:52 a.m.
Expires
Never
Size
2.7 KB
Hits
113
Syntax
Terraform
Private
✓ Yes
terraform {
  required_providers {
    namecheap = {
      source = "namecheap/namecheap"
      version = ">= 2.0.0"
    }
  }
}

resource "namecheap_domain_records" "winny-tech" {
  domain = "winny.tech"
  mode = "MERGE"

  ################################################################
  # GitLab Pages hosts
  ################################################################
  
  record {
    hostname = "@"
    type = "A"
    address = "35.185.44.232"
  }

  record {
    address  = "gitlab-pages-verification-code=0511ad5d79fcc350fbad6bcb1181eb1e"
    hostname = "_gitlab-pages-verification-code"
    type     = "TXT"
  }

  record {
    hostname = "blog"
    type = "A"
    address = "35.185.44.232"
  }

  record {
    address  = "gitlab-pages-verification-code=372701d125f81f213dff1c2cfa408de4"
    hostname = "_gitlab-pages-verification-code.blog"
    type     = "TXT"
  }

  ################################################################

  # for the vpn used to log into various home internet connections
  record {
    hostname = "hermes"
    type = "A"
    address = "45.76.19.193"
  }

  record {
    hostname = "ircbox"
    type = "A"
    address = "149.28.116.255"
  }

  record {
    hostname = "nc"
    type = "A"
    address = "71.19.144.52"
  }

  record {
    hostname = "nc"
    type = "AAAA"
    address = "2605:2700:0:2:a800:ff:fe45:8c7d"
  }

  record {
    hostname = "silo"
    type = "CNAME"
    address = "home.winny.tech"
  }

  record {
    hostname = "stargate"
    type = "CNAME"
    address = "home.winny.tech"
  }

  record {
    hostname = "bebop"
    type = "CNAME"
    address = "home.winny.tech"
  }

  record {
    hostname = "webmail"
    type = "CNAME"
    address = "shadow.mxrouting.net."
  }

  record {
    hostname = "mail"
    type = "CNAME"
    address = "shadow.mxrouting.net."
  }

  record {
    address = "shadow-relay.mxrouting.net."
    hostname = "@"
    mx_pref = 20
    type = "MX"
  }

  record {
    address = "shadow.mxrouting.net."
    hostname = "@"
    mx_pref = 10
    type = "MX"
  }

  record {
    address  = "v=DMARC1; p=none; rua=mailto:dmarc@winny.tech;"
    hostname = "_dmarc"
    type     = "TXT"
  }

  record {
    address  = "v=spf1 include:mxlogin.com -all"
    hostname = "@"
    type     = "TXT"
  }

  record {
    address = "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwp00X4+ik5J30gHtAfxfPvTZk9Jh8ZgfntG3Daz1CQb34elMXPitMzclikQS6brP92Y/dnlJPZoyLgp8BT4c+X5EnXdEaEN2o211OQnnj1uEQ3ZpSo8lKYHKZRHRd+MplcoIurBcq8sp0Jd/O/euq3wFyQQg8qNyRygCopmmtrUnVJUGK+UUcGRgVB88TBNvifQjbgzAlo7xLHvKCIYvX0TBUeVqIw/zjEui4pAQ1D2LpPx8neQm59mUrjU5VeAdW8KpeU/AxUvTMIDagM8lnzdVfSgaz8iu8KFcffV5c5Weq6QtHM5xrfZG2tzjMBFmWLYxyN8vPltra2brAprSpQIDAQAB"
    hostname = "x._domainkey"
    type = "TXT"
  }

}