1
0
Fork 0
server-configuration/targets/dns/terraform.tf
2025-02-22 06:01:14 -06:00

30 lines
534 B
HCL

terraform {
required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
}
}
}
module "dns" {
source = "../../terraform/dns"
}
variable "vpn_ipv4" {
type = string
description = "IPv4 address for VPN"
}
variable "vpn_hostname" {
type = string
description = "Hostname for VPN"
}
resource "cloudflare_record" "vpn" {
zone_id = module.dns.zone_id_netname
name = "${var.vpn_hostname}.${module.dns.domain_netname}"
value = var.vpn_ipv4
type = "A"
ttl = 3600
proxied = false
}