-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdns_root.tf
43 lines (35 loc) · 1.05 KB
/
dns_root.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# #Assumption: We've changed internal_root_dns_zone to be ONLY the root URL
locals {
root_public_hosted_zone_name = lower(var.root_dns_zone)
}
resource "aws_route53_zone" "root_public_hosted_zone" {
name = local.root_public_hosted_zone_name
force_destroy = true
}
variable "root_dns_zone" {
description = "root dns zone name"
default = "smartcolumbusos.com"
}
resource "aws_route53_record" "cota_root_record" {
zone_id = aws_route53_zone.root_public_hosted_zone.zone_id
name = "cota"
type = "CNAME"
ttl = 300
records = ["cota.${aws_route53_zone.internal_public_hosted_zone.name}"]
lifecycle {
ignore_changes = [allow_overwrite]
}
}
resource "aws_route53_record" "streaming_root_record" {
zone_id = aws_route53_zone.root_public_hosted_zone.zone_id
name = "streaming"
type = "CNAME"
ttl = 300
records = ["socket.${aws_route53_zone.internal_public_hosted_zone.name}"]
lifecycle {
ignore_changes = [allow_overwrite]
}
}
output "root_dns_zone_name" {
value = local.root_public_hosted_zone_name
}