1. Packages
  2. Vultr
  3. API Docs
  4. ReverseIpv4
Vultr v2.21.0 published on Wednesday, Jun 19, 2024 by dirien

vultr.ReverseIpv4

Explore with Pulumi AI

vultr logo
Vultr v2.21.0 published on Wednesday, Jun 19, 2024 by dirien

    Provides a Vultr Reverse IPv4 resource. This can be used to create, read, and modify reverse DNS records for IPv4 addresses. Upon success, DNS changes may take 6-12 hours to become active.

    Example Usage

    Create a new reverse DNS record for an IPv4 address:

    import * as pulumi from "@pulumi/pulumi";
    import * as vultr from "@ediri/vultr";
    
    const myInstance = new vultr.Instance("myInstance", {
        enableIpv6: true,
        osId: 477,
        plan: "vc2-1c-2gb",
        region: "ewr",
    });
    const myReverseIpv4 = new vultr.ReverseIpv4("myReverseIpv4", {
        instanceId: myInstance.id,
        ip: myInstance.mainIp,
        reverse: "host.example.com",
    });
    
    import pulumi
    import ediri_vultr as vultr
    
    my_instance = vultr.Instance("myInstance",
        enable_ipv6=True,
        os_id=477,
        plan="vc2-1c-2gb",
        region="ewr")
    my_reverse_ipv4 = vultr.ReverseIpv4("myReverseIpv4",
        instance_id=my_instance.id,
        ip=my_instance.main_ip,
        reverse="host.example.com")
    
    package main
    
    import (
    	"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myInstance, err := vultr.NewInstance(ctx, "myInstance", &vultr.InstanceArgs{
    			EnableIpv6: pulumi.Bool(true),
    			OsId:       pulumi.Int(477),
    			Plan:       pulumi.String("vc2-1c-2gb"),
    			Region:     pulumi.String("ewr"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vultr.NewReverseIpv4(ctx, "myReverseIpv4", &vultr.ReverseIpv4Args{
    			InstanceId: myInstance.ID(),
    			Ip:         myInstance.MainIp,
    			Reverse:    pulumi.String("host.example.com"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vultr = ediri.Vultr;
    
    return await Deployment.RunAsync(() => 
    {
        var myInstance = new Vultr.Instance("myInstance", new()
        {
            EnableIpv6 = true,
            OsId = 477,
            Plan = "vc2-1c-2gb",
            Region = "ewr",
        });
    
        var myReverseIpv4 = new Vultr.ReverseIpv4("myReverseIpv4", new()
        {
            InstanceId = myInstance.Id,
            Ip = myInstance.MainIp,
            Reverse = "host.example.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vultr.Instance;
    import com.pulumi.vultr.InstanceArgs;
    import com.pulumi.vultr.ReverseIpv4;
    import com.pulumi.vultr.ReverseIpv4Args;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var myInstance = new Instance("myInstance", InstanceArgs.builder()
                .enableIpv6(true)
                .osId(477)
                .plan("vc2-1c-2gb")
                .region("ewr")
                .build());
    
            var myReverseIpv4 = new ReverseIpv4("myReverseIpv4", ReverseIpv4Args.builder()
                .instanceId(myInstance.id())
                .ip(myInstance.mainIp())
                .reverse("host.example.com")
                .build());
    
        }
    }
    
    resources:
      myInstance:
        type: vultr:Instance
        properties:
          enableIpv6: true
          osId: 477
          plan: vc2-1c-2gb
          region: ewr
      myReverseIpv4:
        type: vultr:ReverseIpv4
        properties:
          instanceId: ${myInstance.id}
          ip: ${myInstance.mainIp}
          reverse: host.example.com
    

    Create ReverseIpv4 Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ReverseIpv4(name: string, args: ReverseIpv4Args, opts?: CustomResourceOptions);
    @overload
    def ReverseIpv4(resource_name: str,
                    args: ReverseIpv4Args,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def ReverseIpv4(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    instance_id: Optional[str] = None,
                    ip: Optional[str] = None,
                    reverse: Optional[str] = None)
    func NewReverseIpv4(ctx *Context, name string, args ReverseIpv4Args, opts ...ResourceOption) (*ReverseIpv4, error)
    public ReverseIpv4(string name, ReverseIpv4Args args, CustomResourceOptions? opts = null)
    public ReverseIpv4(String name, ReverseIpv4Args args)
    public ReverseIpv4(String name, ReverseIpv4Args args, CustomResourceOptions options)
    
    type: vultr:ReverseIpv4
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ReverseIpv4Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ReverseIpv4Args
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ReverseIpv4Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ReverseIpv4Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ReverseIpv4Args
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var reverseIpv4Resource = new Vultr.ReverseIpv4("reverseIpv4Resource", new()
    {
        InstanceId = "string",
        Ip = "string",
        Reverse = "string",
    });
    
    example, err := vultr.NewReverseIpv4(ctx, "reverseIpv4Resource", &vultr.ReverseIpv4Args{
    	InstanceId: pulumi.String("string"),
    	Ip:         pulumi.String("string"),
    	Reverse:    pulumi.String("string"),
    })
    
    var reverseIpv4Resource = new ReverseIpv4("reverseIpv4Resource", ReverseIpv4Args.builder()
        .instanceId("string")
        .ip("string")
        .reverse("string")
        .build());
    
    reverse_ipv4_resource = vultr.ReverseIpv4("reverseIpv4Resource",
        instance_id="string",
        ip="string",
        reverse="string")
    
    const reverseIpv4Resource = new vultr.ReverseIpv4("reverseIpv4Resource", {
        instanceId: "string",
        ip: "string",
        reverse: "string",
    });
    
    type: vultr:ReverseIpv4
    properties:
        instanceId: string
        ip: string
        reverse: string
    

    ReverseIpv4 Resource Properties

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

    Inputs

    The ReverseIpv4 resource accepts the following input properties:

    InstanceId string
    The ID of the instance you want to set an IPv4 reverse DNS record for.
    Ip string
    The IPv4 address used in the reverse DNS record.
    Reverse string
    The hostname used in the IPv4 reverse DNS record.
    InstanceId string
    The ID of the instance you want to set an IPv4 reverse DNS record for.
    Ip string
    The IPv4 address used in the reverse DNS record.
    Reverse string
    The hostname used in the IPv4 reverse DNS record.
    instanceId String
    The ID of the instance you want to set an IPv4 reverse DNS record for.
    ip String
    The IPv4 address used in the reverse DNS record.
    reverse String
    The hostname used in the IPv4 reverse DNS record.
    instanceId string
    The ID of the instance you want to set an IPv4 reverse DNS record for.
    ip string
    The IPv4 address used in the reverse DNS record.
    reverse string
    The hostname used in the IPv4 reverse DNS record.
    instance_id str
    The ID of the instance you want to set an IPv4 reverse DNS record for.
    ip str
    The IPv4 address used in the reverse DNS record.
    reverse str
    The hostname used in the IPv4 reverse DNS record.
    instanceId String
    The ID of the instance you want to set an IPv4 reverse DNS record for.
    ip String
    The IPv4 address used in the reverse DNS record.
    reverse String
    The hostname used in the IPv4 reverse DNS record.

    Outputs

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

    Gateway string
    The gateway IP address.
    Id string
    The provider-assigned unique ID for this managed resource.
    Netmask string
    The IPv4 netmask in dot-decimal notation.
    Gateway string
    The gateway IP address.
    Id string
    The provider-assigned unique ID for this managed resource.
    Netmask string
    The IPv4 netmask in dot-decimal notation.
    gateway String
    The gateway IP address.
    id String
    The provider-assigned unique ID for this managed resource.
    netmask String
    The IPv4 netmask in dot-decimal notation.
    gateway string
    The gateway IP address.
    id string
    The provider-assigned unique ID for this managed resource.
    netmask string
    The IPv4 netmask in dot-decimal notation.
    gateway str
    The gateway IP address.
    id str
    The provider-assigned unique ID for this managed resource.
    netmask str
    The IPv4 netmask in dot-decimal notation.
    gateway String
    The gateway IP address.
    id String
    The provider-assigned unique ID for this managed resource.
    netmask String
    The IPv4 netmask in dot-decimal notation.

    Look up Existing ReverseIpv4 Resource

    Get an existing ReverseIpv4 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?: ReverseIpv4State, opts?: CustomResourceOptions): ReverseIpv4
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            gateway: Optional[str] = None,
            instance_id: Optional[str] = None,
            ip: Optional[str] = None,
            netmask: Optional[str] = None,
            reverse: Optional[str] = None) -> ReverseIpv4
    func GetReverseIpv4(ctx *Context, name string, id IDInput, state *ReverseIpv4State, opts ...ResourceOption) (*ReverseIpv4, error)
    public static ReverseIpv4 Get(string name, Input<string> id, ReverseIpv4State? state, CustomResourceOptions? opts = null)
    public static ReverseIpv4 get(String name, Output<String> id, ReverseIpv4State state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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:
    Gateway string
    The gateway IP address.
    InstanceId string
    The ID of the instance you want to set an IPv4 reverse DNS record for.
    Ip string
    The IPv4 address used in the reverse DNS record.
    Netmask string
    The IPv4 netmask in dot-decimal notation.
    Reverse string
    The hostname used in the IPv4 reverse DNS record.
    Gateway string
    The gateway IP address.
    InstanceId string
    The ID of the instance you want to set an IPv4 reverse DNS record for.
    Ip string
    The IPv4 address used in the reverse DNS record.
    Netmask string
    The IPv4 netmask in dot-decimal notation.
    Reverse string
    The hostname used in the IPv4 reverse DNS record.
    gateway String
    The gateway IP address.
    instanceId String
    The ID of the instance you want to set an IPv4 reverse DNS record for.
    ip String
    The IPv4 address used in the reverse DNS record.
    netmask String
    The IPv4 netmask in dot-decimal notation.
    reverse String
    The hostname used in the IPv4 reverse DNS record.
    gateway string
    The gateway IP address.
    instanceId string
    The ID of the instance you want to set an IPv4 reverse DNS record for.
    ip string
    The IPv4 address used in the reverse DNS record.
    netmask string
    The IPv4 netmask in dot-decimal notation.
    reverse string
    The hostname used in the IPv4 reverse DNS record.
    gateway str
    The gateway IP address.
    instance_id str
    The ID of the instance you want to set an IPv4 reverse DNS record for.
    ip str
    The IPv4 address used in the reverse DNS record.
    netmask str
    The IPv4 netmask in dot-decimal notation.
    reverse str
    The hostname used in the IPv4 reverse DNS record.
    gateway String
    The gateway IP address.
    instanceId String
    The ID of the instance you want to set an IPv4 reverse DNS record for.
    ip String
    The IPv4 address used in the reverse DNS record.
    netmask String
    The IPv4 netmask in dot-decimal notation.
    reverse String
    The hostname used in the IPv4 reverse DNS record.

    Package Details

    Repository
    vultr dirien/pulumi-vultr
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vultr Terraform Provider.
    vultr logo
    Vultr v2.21.0 published on Wednesday, Jun 19, 2024 by dirien