|
- variable "cloudflare_mitchty_com_zoneid" {
- type = string
- }
-
- resource "cloudflare_record" "ns1_mitchty_com" {
- zone_id = var.cloudflare_mitchty_com_zoneid
- name = "@"
- value = "mitch.ns.cloudflare.com"
- type = "NS"
- }
-
- resource "cloudflare_record" "ns2_mitchty_com" {
- zone_id = var.cloudflare_mitchty_com_zoneid
- name = "@"
- value = "tegan.ns.cloudflare.com"
- type = "NS"
- }
-
- resource "cloudflare_record" "root_mitchty_com" {
- depends_on = [
- linode_instance.prod,
- cloudflare_record.ns1_mitchty_com,
- cloudflare_record.ns2_mitchty_com ]
- zone_id = var.cloudflare_mitchty_com_zoneid
- name = "@"
- value = linode_instance.prod.ip_address
- type = "A"
- ttl = local.dns_ttl
- }
-
- resource "cloudflare_record" "splat_mitchty_com" {
- depends_on = [
- linode_instance.prod,
- cloudflare_record.ns1_mitchty_com,
- cloudflare_record.ns2_mitchty_com ]
- zone_id = var.cloudflare_mitchty_com_zoneid
- name = "*"
- value = linode_instance.prod.ip_address
- type = "A"
- ttl = local.dns_ttl
- }
-
- # resource "cloudflare_record" "root6_mitchty_com" {
- # depends_on = [
- # linode_instance.prod,
- # cloudflare_record.ns1_mitchty_com,
- # cloudflare_record.ns2_mitchty_com ]
- # zone_id = var.cloudflare_mitchty_com_zoneid
- # name = "@"
- # value = local.ipv6
- # type = "AAAA"
- # ttl = local.dns_ttl
- # }
-
- # resource "cloudflare_record" "splat6_mitchty_com" {
- # depends_on = [
- # linode_instance.prod,
- # cloudflare_record.ns1_mitchty_com,
- # cloudflare_record.ns2_mitchty_com ]
- # zone_id = var.cloudflare_mitchty_com_zoneid
- # name = "*"
- # value = local.ipv6
- # type = "AAAA"
- # ttl = local.dns_ttl
- # proxied = true
- # }
-
- resource "cloudflare_record" "www_mitchty_com" {
- depends_on = [
- cloudflare_record.root_mitchty_com,
- cloudflare_record.splat_mitchty_com ]
- zone_id = var.cloudflare_mitchty_com_zoneid
- name = "www"
- value = "mitchty.com"
- type = "CNAME"
- ttl = local.dns_ttl
- }
-
- resource "cloudflare_record" "git_mitchty_com" {
- depends_on = [
- cloudflare_record.root_mitchty_com,
- cloudflare_record.splat_mitchty_com ]
- zone_id = var.cloudflare_mitchty_com_zoneid
- name = "git"
- value = "mitchty.com"
- type = "CNAME"
- ttl = local.dns_ttl
- }
-
- # MX record setup for fastmail dkim/spf on root and all subdomains
- resource "cloudflare_record" "mx_cname_1_mitchty_com" {
- depends_on = [
- cloudflare_record.root_mitchty_com,
- cloudflare_record.splat_mitchty_com ]
- zone_id = var.cloudflare_mitchty_com_zoneid
- name = "fm1._domainkey"
- value = "fm1.mitchty.com.dkim.fmhosted.com"
- type = "CNAME"
- ttl = local.dns_ttl
- }
-
- resource "cloudflare_record" "mx_cname_2_mitchty_com" {
- depends_on = [
- cloudflare_record.root_mitchty_com,
- cloudflare_record.splat_mitchty_com ]
- zone_id = var.cloudflare_mitchty_com_zoneid
- name = "fm2._domainkey"
- value = "fm2.mitchty.com.dkim.fmhosted.com"
- type = "CNAME"
- ttl = local.dns_ttl
- }
-
- resource "cloudflare_record" "mx_cname_3_mitchty_com" {
- depends_on = [
- cloudflare_record.root_mitchty_com,
- cloudflare_record.splat_mitchty_com ]
- zone_id = var.cloudflare_mitchty_com_zoneid
- name = "fm3._domainkey"
- value = "fm3.mitchty.com.dkim.fmhosted.com"
- type = "CNAME"
- ttl = local.dns_ttl
- }
-
- resource "cloudflare_record" "mx_10_root_mitchty_com" {
- depends_on = [
- cloudflare_record.root_mitchty_com,
- cloudflare_record.splat_mitchty_com ]
- zone_id = var.cloudflare_mitchty_com_zoneid
- name = "@"
- value = "in1-smtp.messagingengine.com"
- type = "MX"
- priority = "10"
- ttl = local.dns_ttl
- }
-
- resource "cloudflare_record" "mx_20_root_mitchty_com" {
- depends_on = [
- cloudflare_record.root_mitchty_com,
- cloudflare_record.splat_mitchty_com ]
- zone_id = var.cloudflare_mitchty_com_zoneid
- name = "@"
- value = "in2-smtp.messagingengine.com"
- type = "MX"
- priority = "20"
- ttl = local.dns_ttl
- }
-
- resource "cloudflare_record" "mx_10_splat_mitchty_com" {
- depends_on = [
- cloudflare_record.root_mitchty_com,
- cloudflare_record.splat_mitchty_com ]
- zone_id = var.cloudflare_mitchty_com_zoneid
- name = "*"
- value = "in1-smtp.messagingengine.com"
- type = "MX"
- priority = "10"
- ttl = local.dns_ttl
- }
-
- resource "cloudflare_record" "mx_20_splat_mitchty_com" {
- depends_on = [
- cloudflare_record.root_mitchty_com,
- cloudflare_record.splat_mitchty_com ]
- zone_id = var.cloudflare_mitchty_com_zoneid
- name = "*"
- value = "in2-smtp.messagingengine.com"
- type = "MX"
- priority = "20"
- ttl = local.dns_ttl
- }
-
- resource "cloudflare_record" "txt_mx_root_mitchty_com" {
- depends_on = [
- cloudflare_record.root_mitchty_com,
- cloudflare_record.splat_mitchty_com ]
- zone_id = var.cloudflare_mitchty_com_zoneid
- name = "@"
- value = "v=spf1 include:spf.messagingengine.com ?all"
- type = "TXT"
- ttl = local.dns_ttl
- }
-
- resource "cloudflare_record" "txt_mx_splat_mitchty_com" {
- depends_on = [
- cloudflare_record.root_mitchty_com,
- cloudflare_record.splat_mitchty_com ]
- zone_id = var.cloudflare_mitchty_com_zoneid
- name = "*"
- value = "v=spf1 include:spf.messagingengine.com ?all"
- type = "TXT"
- ttl = local.dns_ttl
- }
|