Skip to content

Repository files navigation

terraform-hcloud-rdns

Terraform module to manage the following Hetzner Cloud resources:

  • hcloud_rdns

Usage

Copy and paste the following code snippet to your Terraform configuration, specify the required variables and run the command terraform init.

module "hcloud_server" {
  source  = "gitlab.com/terraform-child-modules-48151/terraform-hcloud-server/local"
  version = "1.0.0"

  name        = "example-server"
  image       = "debian-13"
  server_type = "cx22"

  location = "nbg1"
}

module "hcloud_rdns" {
  source  = "gitlab.com/terraform-child-modules-48151/terraform-hcloud-rdns/local"
  version = "1.0.0"

  server_id  = module.hcloud_server.id
  ip_address = module.hcloud_server.ipv4_address
  dns_ptr    = "example-server.dhoppe.it"
}

Requirements

Name Version
terraform >= 1.0
hcloud ~> 1.0

Providers

Name Version
hcloud ~> 1.0

Modules

No modules.

Resources

Name Type
hcloud_rdns.this resource

Inputs

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
primary_ip_id The Primary IP the ip_address belongs to number null no
server_id The server the ip_address belongs to number null no

Outputs

Name Description
dns_ptr DNS pointer for the IP address
floating_ip_id The Floating IP the IP address belongs to
id Unique ID of the Reverse DNS Entry
ip_address IP address
load_balancer_id The Load Balancer the IP address belongs to
primary_ip_id The Primary IP the IP address belongs to
server_id The server the IP address belongs to

Authors

Created and maintained by Dennis Hoppe.

License

Apache 2 licensed. See LICENSE for full details.