Want to learn about running containers in Lambda? Join our free hands-on workshop. Register Now

Domain

Provides a Linode Domain resource. This can be used to create, modify, and delete Linode Domains through Linode’s managed DNS service. For more information, see DNS Manager and the Linode APIv4 docs.

Attributes

This resource exports no additional attributes, however status may reflect degraded states.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
    public MyStack()
    {
        var foobarDomain = new Linode.Domain("foobarDomain", new Linode.DomainArgs
        {
            Domain = "foobar.example",
            SoaEmail = "example@foobar.example",
            Tags = 
            {
                "foo",
                "bar",
            },
            Type = "master",
        });
        var foobarDomainRecord = new Linode.DomainRecord("foobarDomainRecord", new Linode.DomainRecordArgs
        {
            DomainId = foobarDomain.Id,
            Name = "www",
            RecordType = "CNAME",
            Target = "foobar.example",
        });
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        foobarDomain, err := linode.NewDomain(ctx, "foobarDomain", &linode.DomainArgs{
            Domain:   pulumi.String("foobar.example"),
            SoaEmail: pulumi.String("example@foobar.example"),
            Tags: pulumi.StringArray{
                pulumi.String("foo"),
                pulumi.String("bar"),
            },
            Type: pulumi.String("master"),
        })
        if err != nil {
            return err
        }
        _, err = linode.NewDomainRecord(ctx, "foobarDomainRecord", &linode.DomainRecordArgs{
            DomainId:   foobarDomain.ID(),
            Name:       pulumi.String("www"),
            RecordType: pulumi.String("CNAME"),
            Target:     pulumi.String("foobar.example"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_linode as linode

foobar_domain = linode.Domain("foobarDomain",
    domain="foobar.example",
    soa_email="example@foobar.example",
    tags=[
        "foo",
        "bar",
    ],
    type="master")
foobar_domain_record = linode.DomainRecord("foobarDomainRecord",
    domain_id=foobar_domain.id,
    name="www",
    record_type="CNAME",
    target="foobar.example")
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const foobarDomain = new linode.Domain("foobar", {
    domain: "foobar.example",
    soaEmail: "example@foobar.example",
    tags: [
        "foo",
        "bar",
    ],
    type: "master",
});
const foobarDomainRecord = new linode.DomainRecord("foobar", {
    domainId: foobarDomain.id.apply(id => Number.parseFloat(id)),
    name: "www",
    recordType: "CNAME",
    target: "foobar.example",
});

Create a Domain Resource

new Domain(name: string, args: DomainArgs, opts?: CustomResourceOptions);
def Domain(resource_name: str, opts: Optional[ResourceOptions] = None, axfr_ips: Optional[Sequence[str]] = None, description: Optional[str] = None, domain: Optional[str] = None, expire_sec: Optional[int] = None, group: Optional[str] = None, master_ips: Optional[Sequence[str]] = None, refresh_sec: Optional[int] = None, retry_sec: Optional[int] = None, soa_email: Optional[str] = None, status: Optional[str] = None, tags: Optional[Sequence[str]] = None, ttl_sec: Optional[int] = None, type: Optional[str] = None)
func NewDomain(ctx *Context, name string, args DomainArgs, opts ...ResourceOption) (*Domain, error)
public Domain(string name, DomainArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args DomainArgs
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 DomainArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DomainArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Domain Resource Properties

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

Inputs

The Domain resource accepts the following input properties:

DomainName string

The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain.

Type string

If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave).

AxfrIps List<string>

The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it.

Description string

A description for this Domain. This is for display purposes only.

ExpireSec int

The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

Group string

The group this Domain belongs to. This is for display purposes only.

MasterIps List<string>

The IP addresses representing the master DNS for this Domain.

RefreshSec int

The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

RetrySec int

The interval, in seconds, at which a failed refresh should be retried. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

SoaEmail string

Start of Authority email address. This is required for master Domains.

Status string

Used to control whether this Domain is currently being rendered (defaults to “active”).

Tags List<string>

A list of tags applied to this object. Tags are for organizational purposes only.

TtlSec int

‘Time to Live’ - the amount of time in seconds that this Domain’s records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

Domain string

The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain.

Type string

If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave).

AxfrIps []string

The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it.

Description string

A description for this Domain. This is for display purposes only.

ExpireSec int

The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

Group string

The group this Domain belongs to. This is for display purposes only.

MasterIps []string

The IP addresses representing the master DNS for this Domain.

RefreshSec int

The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

RetrySec int

The interval, in seconds, at which a failed refresh should be retried. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

SoaEmail string

Start of Authority email address. This is required for master Domains.

Status string

Used to control whether this Domain is currently being rendered (defaults to “active”).

Tags []string

A list of tags applied to this object. Tags are for organizational purposes only.

TtlSec int

‘Time to Live’ - the amount of time in seconds that this Domain’s records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

domain string

The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain.

type string

If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave).

axfrIps string[]

The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it.

description string

A description for this Domain. This is for display purposes only.

expireSec number

The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

group string

The group this Domain belongs to. This is for display purposes only.

masterIps string[]

The IP addresses representing the master DNS for this Domain.

refreshSec number

The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

retrySec number

The interval, in seconds, at which a failed refresh should be retried. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

soaEmail string

Start of Authority email address. This is required for master Domains.

status string

Used to control whether this Domain is currently being rendered (defaults to “active”).

tags string[]

A list of tags applied to this object. Tags are for organizational purposes only.

ttlSec number

‘Time to Live’ - the amount of time in seconds that this Domain’s records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

domain str

The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain.

type str

If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave).

axfr_ips Sequence[str]

The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it.

description str

A description for this Domain. This is for display purposes only.

expire_sec int

The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

group str

The group this Domain belongs to. This is for display purposes only.

master_ips Sequence[str]

The IP addresses representing the master DNS for this Domain.

refresh_sec int

The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

retry_sec int

The interval, in seconds, at which a failed refresh should be retried. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

soa_email str

Start of Authority email address. This is required for master Domains.

status str

Used to control whether this Domain is currently being rendered (defaults to “active”).

tags Sequence[str]

A list of tags applied to this object. Tags are for organizational purposes only.

ttl_sec int

‘Time to Live’ - the amount of time in seconds that this Domain’s records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

Outputs

All input properties are implicitly available as output properties. Additionally, the Domain 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 Domain Resource

Get an existing Domain 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?: DomainState, opts?: CustomResourceOptions): Domain
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, axfr_ips: Optional[Sequence[str]] = None, description: Optional[str] = None, domain: Optional[str] = None, expire_sec: Optional[int] = None, group: Optional[str] = None, master_ips: Optional[Sequence[str]] = None, refresh_sec: Optional[int] = None, retry_sec: Optional[int] = None, soa_email: Optional[str] = None, status: Optional[str] = None, tags: Optional[Sequence[str]] = None, ttl_sec: Optional[int] = None, type: Optional[str] = None) -> Domain
func GetDomain(ctx *Context, name string, id IDInput, state *DomainState, opts ...ResourceOption) (*Domain, error)
public static Domain Get(string name, Input<string> id, DomainState? 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:

AxfrIps List<string>

The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it.

Description string

A description for this Domain. This is for display purposes only.

DomainName string

The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain.

ExpireSec int

The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

Group string

The group this Domain belongs to. This is for display purposes only.

MasterIps List<string>

The IP addresses representing the master DNS for this Domain.

RefreshSec int

The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

RetrySec int

The interval, in seconds, at which a failed refresh should be retried. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

SoaEmail string

Start of Authority email address. This is required for master Domains.

Status string

Used to control whether this Domain is currently being rendered (defaults to “active”).

Tags List<string>

A list of tags applied to this object. Tags are for organizational purposes only.

TtlSec int

‘Time to Live’ - the amount of time in seconds that this Domain’s records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

Type string

If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave).

AxfrIps []string

The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it.

Description string

A description for this Domain. This is for display purposes only.

Domain string

The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain.

ExpireSec int

The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

Group string

The group this Domain belongs to. This is for display purposes only.

MasterIps []string

The IP addresses representing the master DNS for this Domain.

RefreshSec int

The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

RetrySec int

The interval, in seconds, at which a failed refresh should be retried. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

SoaEmail string

Start of Authority email address. This is required for master Domains.

Status string

Used to control whether this Domain is currently being rendered (defaults to “active”).

Tags []string

A list of tags applied to this object. Tags are for organizational purposes only.

TtlSec int

‘Time to Live’ - the amount of time in seconds that this Domain’s records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

Type string

If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave).

axfrIps string[]

The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it.

description string

A description for this Domain. This is for display purposes only.

domain string

The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain.

expireSec number

The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

group string

The group this Domain belongs to. This is for display purposes only.

masterIps string[]

The IP addresses representing the master DNS for this Domain.

refreshSec number

The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

retrySec number

The interval, in seconds, at which a failed refresh should be retried. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

soaEmail string

Start of Authority email address. This is required for master Domains.

status string

Used to control whether this Domain is currently being rendered (defaults to “active”).

tags string[]

A list of tags applied to this object. Tags are for organizational purposes only.

ttlSec number

‘Time to Live’ - the amount of time in seconds that this Domain’s records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

type string

If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave).

axfr_ips Sequence[str]

The list of IPs that may perform a zone transfer for this Domain. This is potentially dangerous, and should be set to an empty list unless you intend to use it.

description str

A description for this Domain. This is for display purposes only.

domain str

The domain this Domain represents. These must be unique in our system; you cannot have two Domains representing the same domain.

expire_sec int

The amount of time in seconds that may pass before this Domain is no longer authoritative. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

group str

The group this Domain belongs to. This is for display purposes only.

master_ips Sequence[str]

The IP addresses representing the master DNS for this Domain.

refresh_sec int

The amount of time in seconds before this Domain should be refreshed. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

retry_sec int

The interval, in seconds, at which a failed refresh should be retried. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

soa_email str

Start of Authority email address. This is required for master Domains.

status str

Used to control whether this Domain is currently being rendered (defaults to “active”).

tags Sequence[str]

A list of tags applied to this object. Tags are for organizational purposes only.

ttl_sec int

‘Time to Live’ - the amount of time in seconds that this Domain’s records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.

type str

If this Domain represents the authoritative source of information for the domain it describes, or if it is a read-only copy of a master (also called a slave).

Import

Linodes Domains can be imported using the Linode Domain id, e.g.

 $ pulumi import linode:index/domain:Domain foobar 1234567

The Linode Guide, Import Existing Infrastructure to Terraform, offers resource importing examples for Domains and other Linode resource types.

Package Details

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