From 83c88a8b5669ba39ef2d26fabb722a8fb3721c90 Mon Sep 17 00:00:00 2001 From: Alexander Hosking Date: Mon, 14 Mar 2022 02:35:56 +0000 Subject: [PATCH] Update ahoskingit/terraform/dns_ahosking.tf, ahoskingit/terraform/dns_ahoskingit.tf, ahoskingit/terraform/dns_automatedbytes.tf files Deleted ahoskingit/terraform/dns_ahoskingit_ca.tf --- ahoskingit/terraform/dns_ahosking.tf | 7 +- ahoskingit/terraform/dns_ahoskingit.tf | 4 +- ahoskingit/terraform/dns_ahoskingit_ca.tf | 123 --------------------- ahoskingit/terraform/dns_automatedbytes.tf | 60 +--------- 4 files changed, 3 insertions(+), 191 deletions(-) delete mode 100644 ahoskingit/terraform/dns_ahoskingit_ca.tf diff --git a/ahoskingit/terraform/dns_ahosking.tf b/ahoskingit/terraform/dns_ahosking.tf index b23d9ec..f7e3f96 100644 --- a/ahoskingit/terraform/dns_ahosking.tf +++ b/ahoskingit/terraform/dns_ahosking.tf @@ -1,9 +1,4 @@ -#Terraform and its management of DNS in route53 - -#Setup the domain in route53 -resource "aws_route53_zone" "ahosking" { - name = "ahosking.com" -} +#Terraform and its management of DNS in Cloudflare resource "cloudflare_zone" "ahosking_com" { zone = "ahosking.com" diff --git a/ahoskingit/terraform/dns_ahoskingit.tf b/ahoskingit/terraform/dns_ahoskingit.tf index 377c5aa..6e1bec6 100644 --- a/ahoskingit/terraform/dns_ahoskingit.tf +++ b/ahoskingit/terraform/dns_ahoskingit.tf @@ -1,6 +1,4 @@ -#Terraform and its management of DNS in route53 - -#Setup the domain in route53 +#Terraform and its management of DNS in Cloudflare resource "cloudflare_zone" "ahoskingit_com" { zone = "ahoskingit.com" plan = "free" diff --git a/ahoskingit/terraform/dns_ahoskingit_ca.tf b/ahoskingit/terraform/dns_ahoskingit_ca.tf deleted file mode 100644 index e3ea2e8..0000000 --- a/ahoskingit/terraform/dns_ahoskingit_ca.tf +++ /dev/null @@ -1,123 +0,0 @@ -#Terraform and its management of DNS in route53 - -#Setup the domain in route53 -resource "aws_route53_zone" "ahoskingit_ca" { - name = "ahoskingit.ca" -} - -resource "aws_route53_record" "ahoskingit_ca" { - zone_id = aws_route53_zone.ahoskingit_ca.zone_id - name = "ahoskingit.ca" - type = "A" - ttl = "5" - records = [var.site5_ip] -} - -resource "aws_route53_record" "ahoskingit_ca_www" { - zone_id = aws_route53_zone.ahoskingit_ca.zone_id - name = "www.ahoskingit.ca" - type = "CNAME" - ttl = "5" - records = [aws_route53_record.ahoskingit_ca.name] -} - -resource "aws_route53_record" "home_ahoskingit_ca" { - zone_id = aws_route53_zone.ahoskingit_ca.zone_id - name = "home.ahoskingit.ca" - type = "A" - ttl = "5" - records = [var.home_ip] -} - -resource "aws_route53_record" "inventory_ahoskingit_ca" { - zone_id = aws_route53_zone.ahoskingit_ca.zone_id - name = "inventory.ahoskingit.ca" - type = "CNAME" - ttl = "5" - records = [aws_route53_record.home_ahoskingit_ca.name] -} - -resource "aws_route53_record" "plex_ahoskingit_ca" { - zone_id = aws_route53_zone.ahoskingit_ca.zone_id - name = "plex.ahoskingit.ca" - type = "CNAME" - ttl = "5" - records = [aws_route53_record.home_ahoskingit_ca.name] -} - -resource "aws_route53_record" "ns1_ahoskingit_ca" { - zone_id = aws_route53_zone.ahoskingit_ca.zone_id - name = "ns1.ahoskingit.ca" - type = "CNAME" - ttl = "5" - records = [aws_route53_record.home_ahoskingit_ca.name] -} - -resource "aws_route53_record" "docs_ahoskingit_ca" { - zone_id = aws_route53_zone.ahoskingit_ca.zone_id - name = "docs.ahoskingit.ca" - type = "CNAME" - ttl = "5" - records = [aws_route53_record.home_ahoskingit_ca.name] -} - -resource "aws_route53_record" "cloud_ahoskingit_ca" { - zone_id = aws_route53_zone.ahoskingit_ca.zone_id - name = "cloud.ahoskingit.ca" - type = "CNAME" - ttl = "5" - records = [aws_route53_record.home_ahoskingit_ca.name] -} - -resource "aws_route53_record" "support_ahoskingit_ca" { - zone_id = aws_route53_zone.ahoskingit_ca.zone_id - name = "support.ahoskingit.ca" - type = "CNAME" - ttl = "5" - records = [aws_route53_record.home_ahoskingit_ca.name] -} - -resource "aws_route53_record" "git_ahoskingit_ca" { - zone_id = aws_route53_zone.ahoskingit_ca.zone_id - name = "git.ahoskingit.ca" - type = "CNAME" - ttl = "5" - records = [aws_route53_record.home_ahoskingit_ca.name] -} - -resource "aws_route53_record" "gitlab_ahoskingit_ca" { - zone_id = aws_route53_zone.ahoskingit_ca.zone_id - name = "gitlab.ahoskingit.ca" - type = "CNAME" - ttl = "5" - records = [aws_route53_record.home_ahoskingit_ca.name] -} - -##Route53 DNS entry -#resource "aws_route53_record" "www_ahoskingit_ca" { -# zone_id = aws_route53_zone.ahoskingit_ca.zone_id -# name = "www.ahoskingit.ca" -# type = "A" -# ttl = "5" -# records = [var.home_ip] -#} - -# email MX records for DNS -resource "aws_route53_record" "ahoskingit_ca_mx" { - zone_id = aws_route53_zone.ahoskingit_ca.zone_id - name = aws_route53_zone.ahoskingit_ca.name - type = "MX" - ttl = "60" - records = ["1 ASPMX.L.GOOGLE.COM", - "5 ALT1.ASPMX.L.GOOGLE.COM", - "5 ALT2.ASPMX.L.GOOGLE.COM", - "10 ALT3.ASPMX.L.GOOGLE.COM", - "10 ALT4.ASPMX.L.GOOGLE.COM"] -} -resource "aws_route53_record" "ahoskingit_ca_txt" { - zone_id = aws_route53_zone.ahoskingit_ca.zone_id - name = aws_route53_zone.ahoskingit_ca.name - type = "TXT" - ttl = "60" - records = ["google-site-verification=BgSCW0dvRYo4wR3l4ubjfq--VXsv554GIxgCDTyMK78"] -} diff --git a/ahoskingit/terraform/dns_automatedbytes.tf b/ahoskingit/terraform/dns_automatedbytes.tf index 9d35cbf..3d4ccfc 100644 --- a/ahoskingit/terraform/dns_automatedbytes.tf +++ b/ahoskingit/terraform/dns_automatedbytes.tf @@ -1,66 +1,8 @@ -##Terraform and its management of DNS in route53 +##Terraform and its management of DNS in Cloudflare #### automatedbytes.com -##Setup the domain in route53 resource "cloudflare_zone" "automatedbytes_com" { zone = "automatedbytes.com" } -resource "aws_route53_zone" "automatedbytes" { - name = "automatedbytes.com" -} - -#Route53 DNS entry -resource "aws_route53_record" "automatedbytes" { - zone_id = aws_route53_zone.automatedbytes.zone_id - name = "automatedbytes.com" - type = "A" - ttl = "5" - records = [var.home_ip] -} - -resource "aws_route53_record" "www_automatedbytes" { - zone_id = aws_route53_zone.automatedbytes.zone_id - name = "www.automatedbytes.com" - type = "CNAME" - ttl = "5" - records = [aws_route53_record.automatedbytes.name] -} - -resource "aws_route53_record" "wildcard_automatedbytes" { - zone_id = aws_route53_zone.automatedbytes.zone_id - name = "*.automatedbytes.com" - type = "CNAME" - ttl = "5" - records = [aws_route53_record.automatedbytes.name] -} - -resource "aws_route53_record" "support_automatedbytes" { - zone_id = aws_route53_zone.automatedbytes.zone_id - name = "support.automatedbytes.com" - type = "A" - ttl = "5" - records = [var.home_ip] -} - -resource "aws_route53_record" "kfa_support_automatedbytes" { - zone_id = aws_route53_zone.automatedbytes.zone_id - name = "kfa.support.automatedbytes.com" - type = "CNAME" - ttl = "5" - records = ["support.automatedbytes.com"] -} - -## Email MX records -resource "aws_route53_record" "mx_automatedbytes" { - zone_id = aws_route53_zone.automatedbytes.zone_id - name = aws_route53_zone.automatedbytes.name - type = "MX" - ttl = "60" - records = ["1 ASPMX.L.GOOGLE.COM", - "5 ALT1.ASPMX.L.GOOGLE.COM", - "5 ALT2.ASPMX.L.GOOGLE.COM", - "10 ALT3.ASPMX.L.GOOGLE.COM", - "10 ALT4.ASPMX.L.GOOGLE.COM"] -} resource "cloudflare_record" "assets_automatedbytes" { zone_id = cloudflare_zone.automatedbytes_com.id