Terraform module to manage the Hetzner Cloud resource (hcloud_rdns).
Copy and paste into your Terraform configuration, insert the variables and run terraform init
:
Create one reverse DNS entry:
data "hcloud_server" "default" {
name = "debian"
}
module "hcloud_rdns" {
source = "dhoppeIT/rdns/hcloud"
server_id = data.hcloud_server.default.id
ip_address = data.hcloud_server.default.ipv4_address
dns_ptr = "${data.hcloud_server.default.name}.dhoppe.it"
}
Create multiple reverse DNS entries:
data "hcloud_servers" "default" {}
module "hcloud_rdns" {
source = "dhoppeIT/rdns/hcloud"
count = length(data.hcloud_servers.default.servers)
server_id = data.hcloud_servers.default.servers[count.index].id
ip_address = data.hcloud_servers.default.servers[count.index].ipv4_address
dns_ptr = "${data.hcloud_servers.default.servers[count.index].name}.dhoppe.it"
}
Name | Version |
---|---|
terraform | >= 1.0 |
hcloud | ~> 1.0 |
Name | Version |
---|---|
hcloud | 1.32.2 |
No modules.
Name | Type |
---|---|
hcloud_rdns.default | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
dns_ptr | The DNS address the ip_address should resolve to | string |
n/a | yes |
floating_ip_id | The Floating IP the ip_address belongs to | number |
null |
no |
ip_address | The IP address that should point to dns_ptr | string |
n/a | yes |
load_balancer_id | The Load Balancer the ip_address belongs to | number |
null |
no |
server_id | The server the ip_address belongs to | number |
null |
no |
Name | Description |
---|---|
dns_ptr | DNS pointer for the IP address |
ip_address | IP address |
Created and maintained by Dennis Hoppe.
Apache 2 licensed. See LICENSE for full details.