chore(terraform): update DNS records

This commit is contained in:
2026-08-20 13:54:51 +02:00
parent 17fce8c8ee
commit 8419c9978c
3 changed files with 11 additions and 9 deletions
+11 -2
View File
@@ -56,9 +56,18 @@ locals {
} }
# Publish the VPS IP as a Cloudflare A record # Publish the VPS IP as a Cloudflare A record
resource "cloudflare_dns_record" "a" { resource "cloudflare_dns_record" "domain" {
zone_id = data.cloudflare_zone.zone.id zone_id = data.cloudflare_zone.zone.id
name = var.record_name name = "@"
type = "A"
content = local.public_ip
proxied = var.cloudflare_proxied
ttl = var.cloudflare_proxied ? 1 : 3600
}
resource "cloudflare_dns_record" "subdomain" {
zone_id = data.cloudflare_zone.zone.id
name = "*"
type = "A" type = "A"
content = local.public_ip content = local.public_ip
proxied = var.cloudflare_proxied proxied = var.cloudflare_proxied
-1
View File
@@ -4,7 +4,6 @@ hcloud_server_type = "cx23"
hcloud_image = "debian-13" hcloud_image = "debian-13"
hcloud_location = "nbg1" hcloud_location = "nbg1"
record_name = "dokploy"
cloudflare_proxied = true cloudflare_proxied = true
# Note: Use file() to easily read your local SSH public key # Note: Use file() to easily read your local SSH public key
-6
View File
@@ -45,12 +45,6 @@ variable "domain_name" {
description = "Cloudflare zone (apex domain) in which to create the A record" description = "Cloudflare zone (apex domain) in which to create the A record"
} }
variable "record_name" {
type = string
description = "DNS record name relative to the zone; use \"@\" for the apex"
default = "dokploy"
}
variable "cloudflare_proxied" { variable "cloudflare_proxied" {
type = bool type = bool
description = "Whether Cloudflare should proxy (orange-cloud) the A record" description = "Whether Cloudflare should proxy (orange-cloud) the A record"