Rdns

Provides a Hetzner Cloud Reverse DNS Entry to create, modify and reset reverse dns entries for Hetzner Cloud Floating IPs or servers.

Example Usage

using Pulumi;
using HCloud = Pulumi.HCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var node1 = new HCloud.Server("node1", new HCloud.ServerArgs
        {
            Image = "debian-9",
            ServerType = "cx11",
        });
        var master = new HCloud.Rdns("master", new HCloud.RdnsArgs
        {
            DnsPtr = "example.com",
            IpAddress = node1.Ipv4Address,
            ServerId = node1.Id,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-hcloud/sdk/go/hcloud"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        node1, err := hcloud.NewServer(ctx, "node1", &hcloud.ServerArgs{
            Image:      pulumi.String("debian-9"),
            ServerType: pulumi.String("cx11"),
        })
        if err != nil {
            return err
        }
        _, err = hcloud.NewRdns(ctx, "master", &hcloud.RdnsArgs{
            DnsPtr:    pulumi.String("example.com"),
            IpAddress: node1.Ipv4Address,
            ServerId:  node1.ID(),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_hcloud as hcloud

node1 = hcloud.Server("node1",
    image="debian-9",
    server_type="cx11")
master = hcloud.Rdns("master",
    dns_ptr="example.com",
    ip_address=node1.ipv4_address,
    server_id=node1.id)
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";

const node1 = new hcloud.Server("node1", {
    image: "debian-9",
    serverType: "cx11",
});
const master = new hcloud.Rdns("master", {
    dnsPtr: "example.com",
    ipAddress: node1.ipv4Address,
    serverId: node1.id.apply(id => Number.parseFloat(id)),
});

Create a Rdns Resource

new Rdns(name: string, args: RdnsArgs, opts?: CustomResourceOptions);
def Rdns(resource_name, opts=None, dns_ptr=None, floating_ip_id=None, ip_address=None, server_id=None, __props__=None);
func NewRdns(ctx *Context, name string, args RdnsArgs, opts ...ResourceOption) (*Rdns, error)
public Rdns(string name, RdnsArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args RdnsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args RdnsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RdnsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Rdns Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Rdns resource accepts the following input properties:

DnsPtr string
IpAddress string
FloatingIpId int
ServerId int
DnsPtr string
IpAddress string
FloatingIpId int
ServerId int
dnsPtr string
ipAddress string
floatingIpId number
serverId number
dns_ptr str
ip_address str
floating_ip_id float
server_id float

Outputs

All input properties are implicitly available as output properties. Additionally, the Rdns resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Rdns Resource

Get an existing Rdns resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: RdnsState, opts?: CustomResourceOptions): Rdns
static get(resource_name, id, opts=None, dns_ptr=None, floating_ip_id=None, ip_address=None, server_id=None, __props__=None);
func GetRdns(ctx *Context, name string, id IDInput, state *RdnsState, opts ...ResourceOption) (*Rdns, error)
public static Rdns Get(string name, Input<string> id, RdnsState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

DnsPtr string
FloatingIpId int
IpAddress string
ServerId int
DnsPtr string
FloatingIpId int
IpAddress string
ServerId int
dnsPtr string
floatingIpId number
ipAddress string
serverId number
dns_ptr str
floating_ip_id float
ip_address str
server_id float

Package Details

Repository
https://github.com/pulumi/pulumi-hcloud
License
Apache-2.0
Notes
This Pulumi package is based on the hcloud Terraform Provider.