1. Packages
  2. Vultr
  3. API Docs
  4. DnsDomain
Vultr v2.21.1 published on Monday, Jul 22, 2024 by dirien

vultr.DnsDomain

Explore with Pulumi AI

vultr logo
Vultr v2.21.1 published on Monday, Jul 22, 2024 by dirien

    Provides a Vultr DNS Domain resource. This can be used to create, read, modify, and delete DNS Domains.

    Example Usage

    Create a new DNS Domain

    import * as pulumi from "@pulumi/pulumi";
    import * as vultr from "@ediri/vultr";
    
    const myDomain = new vultr.DnsDomain("myDomain", {
        domain: "domain.com",
        ip: "66.42.94.227",
    });
    
    import pulumi
    import ediri_vultr as vultr
    
    my_domain = vultr.DnsDomain("myDomain",
        domain="domain.com",
        ip="66.42.94.227")
    
    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 {
    		_, err := vultr.NewDnsDomain(ctx, "myDomain", &vultr.DnsDomainArgs{
    			Domain: pulumi.String("domain.com"),
    			Ip:     pulumi.String("66.42.94.227"),
    		})
    		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 myDomain = new Vultr.DnsDomain("myDomain", new()
        {
            Domain = "domain.com",
            Ip = "66.42.94.227",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vultr.DnsDomain;
    import com.pulumi.vultr.DnsDomainArgs;
    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 myDomain = new DnsDomain("myDomain", DnsDomainArgs.builder()
                .domain("domain.com")
                .ip("66.42.94.227")
                .build());
    
        }
    }
    
    resources:
      myDomain:
        type: vultr:DnsDomain
        properties:
          domain: domain.com
          ip: 66.42.94.227
    

    Create DnsDomain Resource

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

    Constructor syntax

    new DnsDomain(name: string, args: DnsDomainArgs, opts?: CustomResourceOptions);
    @overload
    def DnsDomain(resource_name: str,
                  args: DnsDomainArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def DnsDomain(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  domain: Optional[str] = None,
                  dns_sec: Optional[str] = None,
                  ip: Optional[str] = None)
    func NewDnsDomain(ctx *Context, name string, args DnsDomainArgs, opts ...ResourceOption) (*DnsDomain, error)
    public DnsDomain(string name, DnsDomainArgs args, CustomResourceOptions? opts = null)
    public DnsDomain(String name, DnsDomainArgs args)
    public DnsDomain(String name, DnsDomainArgs args, CustomResourceOptions options)
    
    type: vultr:DnsDomain
    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 DnsDomainArgs
    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 DnsDomainArgs
    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 DnsDomainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DnsDomainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DnsDomainArgs
    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 dnsDomainResource = new Vultr.DnsDomain("dnsDomainResource", new()
    {
        Domain = "string",
        DnsSec = "string",
        Ip = "string",
    });
    
    example, err := vultr.NewDnsDomain(ctx, "dnsDomainResource", &vultr.DnsDomainArgs{
    	Domain: pulumi.String("string"),
    	DnsSec: pulumi.String("string"),
    	Ip:     pulumi.String("string"),
    })
    
    var dnsDomainResource = new DnsDomain("dnsDomainResource", DnsDomainArgs.builder()
        .domain("string")
        .dnsSec("string")
        .ip("string")
        .build());
    
    dns_domain_resource = vultr.DnsDomain("dnsDomainResource",
        domain="string",
        dns_sec="string",
        ip="string")
    
    const dnsDomainResource = new vultr.DnsDomain("dnsDomainResource", {
        domain: "string",
        dnsSec: "string",
        ip: "string",
    });
    
    type: vultr:DnsDomain
    properties:
        dnsSec: string
        domain: string
        ip: string
    

    DnsDomain Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DnsDomain resource accepts the following input properties:

    Domain string
    Name of domain.
    DnsSec string
    The Domain's DNSSEC status. Valid options are enabled or disabled. Note disabled is default
    Ip string
    Instance IP you want associated to domain. If omitted this will create a domain with no records.
    Domain string
    Name of domain.
    DnsSec string
    The Domain's DNSSEC status. Valid options are enabled or disabled. Note disabled is default
    Ip string
    Instance IP you want associated to domain. If omitted this will create a domain with no records.
    domain String
    Name of domain.
    dnsSec String
    The Domain's DNSSEC status. Valid options are enabled or disabled. Note disabled is default
    ip String
    Instance IP you want associated to domain. If omitted this will create a domain with no records.
    domain string
    Name of domain.
    dnsSec string
    The Domain's DNSSEC status. Valid options are enabled or disabled. Note disabled is default
    ip string
    Instance IP you want associated to domain. If omitted this will create a domain with no records.
    domain str
    Name of domain.
    dns_sec str
    The Domain's DNSSEC status. Valid options are enabled or disabled. Note disabled is default
    ip str
    Instance IP you want associated to domain. If omitted this will create a domain with no records.
    domain String
    Name of domain.
    dnsSec String
    The Domain's DNSSEC status. Valid options are enabled or disabled. Note disabled is default
    ip String
    Instance IP you want associated to domain. If omitted this will create a domain with no records.

    Outputs

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

    DateCreated string
    The date the domain was added to your account.
    Id string
    The provider-assigned unique ID for this managed resource.
    DateCreated string
    The date the domain was added to your account.
    Id string
    The provider-assigned unique ID for this managed resource.
    dateCreated String
    The date the domain was added to your account.
    id String
    The provider-assigned unique ID for this managed resource.
    dateCreated string
    The date the domain was added to your account.
    id string
    The provider-assigned unique ID for this managed resource.
    date_created str
    The date the domain was added to your account.
    id str
    The provider-assigned unique ID for this managed resource.
    dateCreated String
    The date the domain was added to your account.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DnsDomain Resource

    Get an existing DnsDomain 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?: DnsDomainState, opts?: CustomResourceOptions): DnsDomain
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            date_created: Optional[str] = None,
            dns_sec: Optional[str] = None,
            domain: Optional[str] = None,
            ip: Optional[str] = None) -> DnsDomain
    func GetDnsDomain(ctx *Context, name string, id IDInput, state *DnsDomainState, opts ...ResourceOption) (*DnsDomain, error)
    public static DnsDomain Get(string name, Input<string> id, DnsDomainState? state, CustomResourceOptions? opts = null)
    public static DnsDomain get(String name, Output<String> id, DnsDomainState 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:
    DateCreated string
    The date the domain was added to your account.
    DnsSec string
    The Domain's DNSSEC status. Valid options are enabled or disabled. Note disabled is default
    Domain string
    Name of domain.
    Ip string
    Instance IP you want associated to domain. If omitted this will create a domain with no records.
    DateCreated string
    The date the domain was added to your account.
    DnsSec string
    The Domain's DNSSEC status. Valid options are enabled or disabled. Note disabled is default
    Domain string
    Name of domain.
    Ip string
    Instance IP you want associated to domain. If omitted this will create a domain with no records.
    dateCreated String
    The date the domain was added to your account.
    dnsSec String
    The Domain's DNSSEC status. Valid options are enabled or disabled. Note disabled is default
    domain String
    Name of domain.
    ip String
    Instance IP you want associated to domain. If omitted this will create a domain with no records.
    dateCreated string
    The date the domain was added to your account.
    dnsSec string
    The Domain's DNSSEC status. Valid options are enabled or disabled. Note disabled is default
    domain string
    Name of domain.
    ip string
    Instance IP you want associated to domain. If omitted this will create a domain with no records.
    date_created str
    The date the domain was added to your account.
    dns_sec str
    The Domain's DNSSEC status. Valid options are enabled or disabled. Note disabled is default
    domain str
    Name of domain.
    ip str
    Instance IP you want associated to domain. If omitted this will create a domain with no records.
    dateCreated String
    The date the domain was added to your account.
    dnsSec String
    The Domain's DNSSEC status. Valid options are enabled or disabled. Note disabled is default
    domain String
    Name of domain.
    ip String
    Instance IP you want associated to domain. If omitted this will create a domain with no records.

    Import

    DNS Domains can be imported using the Dns Domain domain, e.g.

    $ pulumi import vultr:index/dnsDomain:DnsDomain name domain.com
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.1 published on Monday, Jul 22, 2024 by dirien