Provision grimes VPS

This commit is contained in:
Jake Howard 2025-06-26 22:26:10 +01:00
parent 2528d8630a
commit e8e42cf488
No known key found for this signature in database
GPG key ID: 57AFB45680EDD477
2 changed files with 46 additions and 0 deletions

26
terraform/grimes_vps.tf Normal file
View file

@ -0,0 +1,26 @@
resource "hcloud_server" "grimes" {
name = "grimes"
image = "debian-12"
server_type = "cx22"
location = "nbg1"
delete_protection = true
rebuild_protection = true
# firewall_ids = [
# hcloud_firewall.base.id,
# hcloud_firewall.tailscale.id,
# hcloud_firewall.web.id,
# ]
}
resource "hcloud_rdns" "grimes_reverse_ipv4" {
server_id = hcloud_server.grimes.id
ip_address = hcloud_server.grimes.ipv4_address
dns_ptr = "${gandi_livedns_record.sys_domain_grimes.name}.${gandi_livedns_record.sys_domain_grimes.zone}"
}
resource "hcloud_rdns" "grimes_reverse_ipv6" {
server_id = hcloud_server.grimes.id
ip_address = hcloud_server.grimes.ipv6_address
dns_ptr = "${gandi_livedns_record.sys_domain_grimes.name}.${gandi_livedns_record.sys_domain_grimes.zone}"
}

View file

@ -57,3 +57,23 @@ resource "gandi_livedns_record" "sys_domain_pve_private" {
local.private_ipv6_marker
]
}
resource "gandi_livedns_record" "sys_domain_grimes" {
zone = data.gandi_livedns_domain.theorangeonenet.id
name = "grimes.sys"
type = "A"
ttl = 3600
values = [
hcloud_server.grimes.ipv4_address
]
}
resource "gandi_livedns_record" "sys_domain_grimes_v6" {
zone = data.gandi_livedns_domain.theorangeonenet.id
name = "grimes.sys"
type = "AAAA"
ttl = 3600
values = [
hcloud_server.grimes.ipv6_address
]
}