Add IPv6 (AAAA) DNS records and www redirect (#8)
This commit is contained in:
parent
4d1461c58d
commit
a9a6b27af4
2 changed files with 28 additions and 0 deletions
|
|
@ -2,6 +2,10 @@
|
|||
reverse_proxy journal:3000
|
||||
}
|
||||
|
||||
www.{$DOMAIN:trails.cool} {
|
||||
redir https://{$DOMAIN:trails.cool}{uri} permanent
|
||||
}
|
||||
|
||||
planner.{$DOMAIN:trails.cool} {
|
||||
reverse_proxy planner:3001
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,6 +84,14 @@ resource "hcloud_zone_rrset" "root_a" {
|
|||
records = [{ value = hcloud_server.trails.ipv4_address }]
|
||||
}
|
||||
|
||||
resource "hcloud_zone_rrset" "root_aaaa" {
|
||||
zone = "trails.cool"
|
||||
name = "@"
|
||||
type = "AAAA"
|
||||
ttl = 300
|
||||
records = [{ value = hcloud_server.trails.ipv6_address }]
|
||||
}
|
||||
|
||||
resource "hcloud_zone_rrset" "planner_a" {
|
||||
zone = "trails.cool"
|
||||
name = "planner"
|
||||
|
|
@ -92,6 +100,22 @@ resource "hcloud_zone_rrset" "planner_a" {
|
|||
records = [{ value = hcloud_server.trails.ipv4_address }]
|
||||
}
|
||||
|
||||
resource "hcloud_zone_rrset" "planner_aaaa" {
|
||||
zone = "trails.cool"
|
||||
name = "planner"
|
||||
type = "AAAA"
|
||||
ttl = 300
|
||||
records = [{ value = hcloud_server.trails.ipv6_address }]
|
||||
}
|
||||
|
||||
resource "hcloud_zone_rrset" "www_cname" {
|
||||
zone = "trails.cool"
|
||||
name = "www"
|
||||
type = "CNAME"
|
||||
ttl = 300
|
||||
records = [{ value = "trails.cool." }]
|
||||
}
|
||||
|
||||
# Outputs
|
||||
|
||||
output "server_ip" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue