2017-06-09 23:37:49 +00:00
|
|
|
##Terraform and its management of DNS in route53
|
|
|
|
#### automatedbytes.com
|
|
|
|
##Setup the domain in route53
|
2019-06-14 03:15:54 +00:00
|
|
|
resource "cloudflare_zone" "automatedbytes_com" {
|
|
|
|
zone = "automatedbytes.com"
|
|
|
|
}
|
2017-06-29 05:21:12 +00:00
|
|
|
resource "aws_route53_zone" "automatedbytes" {
|
|
|
|
name = "automatedbytes.com"
|
|
|
|
}
|
|
|
|
|
|
|
|
#Route53 DNS entry
|
|
|
|
resource "aws_route53_record" "automatedbytes" {
|
2019-12-29 07:15:42 +00:00
|
|
|
zone_id = aws_route53_zone.automatedbytes.zone_id
|
2017-06-29 05:21:12 +00:00
|
|
|
name = "automatedbytes.com"
|
|
|
|
type = "A"
|
|
|
|
ttl = "5"
|
2020-11-25 05:39:55 +00:00
|
|
|
records = [var.home_ip]
|
2017-06-29 05:21:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resource "aws_route53_record" "www_automatedbytes" {
|
2019-12-29 07:15:42 +00:00
|
|
|
zone_id = aws_route53_zone.automatedbytes.zone_id
|
2017-06-29 05:21:12 +00:00
|
|
|
name = "www.automatedbytes.com"
|
|
|
|
type = "CNAME"
|
|
|
|
ttl = "5"
|
2019-12-29 07:15:42 +00:00
|
|
|
records = [aws_route53_record.automatedbytes.name]
|
2017-06-29 05:21:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resource "aws_route53_record" "wildcard_automatedbytes" {
|
2019-12-29 07:15:42 +00:00
|
|
|
zone_id = aws_route53_zone.automatedbytes.zone_id
|
2017-06-29 05:21:12 +00:00
|
|
|
name = "*.automatedbytes.com"
|
|
|
|
type = "CNAME"
|
|
|
|
ttl = "5"
|
2019-12-29 07:15:42 +00:00
|
|
|
records = [aws_route53_record.automatedbytes.name]
|
2017-06-29 05:21:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resource "aws_route53_record" "support_automatedbytes" {
|
2019-12-29 07:15:42 +00:00
|
|
|
zone_id = aws_route53_zone.automatedbytes.zone_id
|
2017-06-29 05:21:12 +00:00
|
|
|
name = "support.automatedbytes.com"
|
2017-09-18 03:38:39 +00:00
|
|
|
type = "A"
|
2017-06-29 05:21:12 +00:00
|
|
|
ttl = "5"
|
2019-12-29 07:15:42 +00:00
|
|
|
records = [var.home_ip]
|
2017-06-29 05:21:12 +00:00
|
|
|
}
|
|
|
|
|
2017-09-18 03:38:39 +00:00
|
|
|
resource "aws_route53_record" "kfa_support_automatedbytes" {
|
2019-12-29 07:15:42 +00:00
|
|
|
zone_id = aws_route53_zone.automatedbytes.zone_id
|
2017-09-18 03:38:39 +00:00
|
|
|
name = "kfa.support.automatedbytes.com"
|
|
|
|
type = "CNAME"
|
|
|
|
ttl = "5"
|
|
|
|
records = ["support.automatedbytes.com"]
|
|
|
|
}
|
|
|
|
|
2017-06-29 05:21:12 +00:00
|
|
|
## Email MX records
|
|
|
|
resource "aws_route53_record" "mx_automatedbytes" {
|
2019-12-29 07:15:42 +00:00
|
|
|
zone_id = aws_route53_zone.automatedbytes.zone_id
|
|
|
|
name = aws_route53_zone.automatedbytes.name
|
2017-06-29 05:21:12 +00:00
|
|
|
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"]
|
|
|
|
}
|
|
|
|
|
2021-05-19 02:54:54 +00:00
|
|
|
resource "cloudflare_record" "assets_automatedbytes" {
|
|
|
|
zone_id = cloudflare_zone.automatedbytes_com.id
|
|
|
|
name = "assets"
|
|
|
|
type = "A"
|
2021-06-30 19:01:59 +00:00
|
|
|
proxied = false
|
2021-05-21 13:13:50 +00:00
|
|
|
value = var.do_assets
|
2021-05-19 02:54:54 +00:00
|
|
|
}
|
|
|
|
|
2021-05-19 03:33:07 +00:00
|
|
|
resource "cloudflare_record" "assets_api_automatedbytes" {
|
|
|
|
zone_id = cloudflare_zone.automatedbytes_com.id
|
|
|
|
name = "assets-api"
|
|
|
|
type = "A"
|
2021-06-30 19:01:59 +00:00
|
|
|
proxied = false
|
2021-05-21 13:13:50 +00:00
|
|
|
value = var.do_assets
|
2021-05-19 03:33:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resource "cloudflare_record" "assets_mesh_automatedbytes" {
|
|
|
|
zone_id = cloudflare_zone.automatedbytes_com.id
|
|
|
|
name = "assets-mesh"
|
|
|
|
type = "A"
|
2021-06-30 19:01:59 +00:00
|
|
|
proxied = false
|
2021-05-21 13:13:50 +00:00
|
|
|
value = var.do_assets
|
2021-05-19 03:33:07 +00:00
|
|
|
}
|
|
|
|
|
2019-10-16 21:24:47 +00:00
|
|
|
resource "cloudflare_record" "support_automatedbytes" {
|
2019-12-29 07:15:42 +00:00
|
|
|
zone_id = cloudflare_zone.automatedbytes_com.id
|
2019-10-16 21:24:47 +00:00
|
|
|
name = "support"
|
|
|
|
type = "A"
|
|
|
|
proxied = true
|
2019-12-29 07:15:42 +00:00
|
|
|
value = var.home_ip
|
2020-11-25 05:39:55 +00:00
|
|
|
}
|