Skip to content

Commit

Permalink
Merge pull request #236 from ictsc/add-drove-dns-records
Browse files Browse the repository at this point in the history
feat: copy records from ictsc/terraform-ictsc-net
  • Loading branch information
tosuke authored Nov 7, 2024
2 parents bed3408 + 296b2a0 commit 0c991bc
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions terraform/dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,28 @@ resource "sakuracloud_dns_record" "k8s_apiserver_record" {
type = "A"
value = sakuracloud_internet.k8s_external_switch.ip_addresses[lookup(var.control_plane, terraform.workspace, 0)]
}

resource "sakuracloud_dns_record" "root_record_ipv4" {
dns_id = sakuracloud_dns.k8s_dns.id
ttl = 300
name = "@"
type = "A"
value = "163.43.138.216"
}

resource "sakuracloud_dns_record" "root_record_ipv6" {
dns_id = sakuracloud_dns.k8s_dns.id
ttl = 300
name = "@"
type = "AAAA"
value = "2001:e42:407:1035::2:0"
}

resource "sakuracloud_dns_record" "wildcard_record" {
depends_on = [sakuracloud_dns_record.root_record_ipv4]
dns_id = sakuracloud_dns.k8s_dns.id
ttl = 300
name = "*"
type = "CNAME"
value = "${sakuracloud_dns.k8s_dns.zone}."
}

0 comments on commit 0c991bc

Please sign in to comment.