DomainRecord
Provides a Linode Domain Record resource. This can be used to create, modify, and delete Linodes Domain Records. For more information, see DNS Manager and the Linode APIv4 docs.
Attributes
This resource exports no additional attributes.
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",
Type = "master",
});
var foobarDomainRecord = new Linode.DomainRecord("foobarDomainRecord", new Linode.DomainRecordArgs
{
DomainId = foobarDomain.Id,
Name = "www",
RecordType = "CNAME",
Target = "foobar.example",
});
}
}
Coming soon!
import pulumi
import pulumi_linode as linode
foobar_domain = linode.Domain("foobarDomain",
domain="foobar.example",
soa_email="example@foobar.example",
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",
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 DomainRecord Resource
new DomainRecord(name: string, args: DomainRecordArgs, opts?: CustomResourceOptions);def DomainRecord(resource_name, opts=None, domain_id=None, name=None, port=None, priority=None, protocol=None, record_type=None, service=None, tag=None, target=None, ttl_sec=None, weight=None, __props__=None);func NewDomainRecord(ctx *Context, name string, args DomainRecordArgs, opts ...ResourceOption) (*DomainRecord, error)public DomainRecord(string name, DomainRecordArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args DomainRecordArgs
- 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 DomainRecordArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DomainRecordArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
DomainRecord Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The DomainRecord resource accepts the following input properties:
- Domain
Id int The ID of the Domain to access. Changing
domain_idforces the creation of a new Linode Domain Record..- Record
Type string The type of Record this is in the DNS system. For example, A records associate a domain name with an IPv4 address, and AAAA records associate a domain name with an IPv6 address. Changing
record_typeforces the creation of a new Linode Domain Record..- Target string
The target for this Record. This field’s actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.
- Name string
The name of this Record. Setting this is invalid for
SRVrecords as it is generated by the API. This field’s actual usage depends on the type of record this represents. For A and AAAA records, this is the subdomain being associated with an IP address.- Port int
The port this Record points to.
- Priority int
The priority of the target host. Lower values are preferred.
- Protocol string
The protocol this Record’s service communicates with. Only valid for SRV records.
- Service string
The service this Record identified. Only valid for SRV records.
- Tag string
The tag portion of a CAA record. It is invalid to set this on other record types.
- 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.
- Weight int
The relative weight of this Record. Higher values are preferred.
- Domain
Id int The ID of the Domain to access. Changing
domain_idforces the creation of a new Linode Domain Record..- Record
Type string The type of Record this is in the DNS system. For example, A records associate a domain name with an IPv4 address, and AAAA records associate a domain name with an IPv6 address. Changing
record_typeforces the creation of a new Linode Domain Record..- Target string
The target for this Record. This field’s actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.
- Name string
The name of this Record. Setting this is invalid for
SRVrecords as it is generated by the API. This field’s actual usage depends on the type of record this represents. For A and AAAA records, this is the subdomain being associated with an IP address.- Port int
The port this Record points to.
- Priority int
The priority of the target host. Lower values are preferred.
- Protocol string
The protocol this Record’s service communicates with. Only valid for SRV records.
- Service string
The service this Record identified. Only valid for SRV records.
- Tag string
The tag portion of a CAA record. It is invalid to set this on other record types.
- 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.
- Weight int
The relative weight of this Record. Higher values are preferred.
- domain
Id number The ID of the Domain to access. Changing
domain_idforces the creation of a new Linode Domain Record..- record
Type string The type of Record this is in the DNS system. For example, A records associate a domain name with an IPv4 address, and AAAA records associate a domain name with an IPv6 address. Changing
record_typeforces the creation of a new Linode Domain Record..- target string
The target for this Record. This field’s actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.
- name string
The name of this Record. Setting this is invalid for
SRVrecords as it is generated by the API. This field’s actual usage depends on the type of record this represents. For A and AAAA records, this is the subdomain being associated with an IP address.- port number
The port this Record points to.
- priority number
The priority of the target host. Lower values are preferred.
- protocol string
The protocol this Record’s service communicates with. Only valid for SRV records.
- service string
The service this Record identified. Only valid for SRV records.
- tag string
The tag portion of a CAA record. It is invalid to set this on other record types.
- ttl
Sec 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.
- weight number
The relative weight of this Record. Higher values are preferred.
- domain_
id float The ID of the Domain to access. Changing
domain_idforces the creation of a new Linode Domain Record..- record_
type str The type of Record this is in the DNS system. For example, A records associate a domain name with an IPv4 address, and AAAA records associate a domain name with an IPv6 address. Changing
record_typeforces the creation of a new Linode Domain Record..- target str
The target for this Record. This field’s actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.
- name str
The name of this Record. Setting this is invalid for
SRVrecords as it is generated by the API. This field’s actual usage depends on the type of record this represents. For A and AAAA records, this is the subdomain being associated with an IP address.- port float
The port this Record points to.
- priority float
The priority of the target host. Lower values are preferred.
- protocol str
The protocol this Record’s service communicates with. Only valid for SRV records.
- service str
The service this Record identified. Only valid for SRV records.
- tag str
The tag portion of a CAA record. It is invalid to set this on other record types.
- ttl_
sec float ‘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.
- weight float
The relative weight of this Record. Higher values are preferred.
Outputs
All input properties are implicitly available as output properties. Additionally, the DomainRecord resource produces the following output properties:
Look up an Existing DomainRecord Resource
Get an existing DomainRecord 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?: DomainRecordState, opts?: CustomResourceOptions): DomainRecordstatic get(resource_name, id, opts=None, domain_id=None, name=None, port=None, priority=None, protocol=None, record_type=None, service=None, tag=None, target=None, ttl_sec=None, weight=None, __props__=None);func GetDomainRecord(ctx *Context, name string, id IDInput, state *DomainRecordState, opts ...ResourceOption) (*DomainRecord, error)public static DomainRecord Get(string name, Input<string> id, DomainRecordState? 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:
- Domain
Id int The ID of the Domain to access. Changing
domain_idforces the creation of a new Linode Domain Record..- Name string
The name of this Record. Setting this is invalid for
SRVrecords as it is generated by the API. This field’s actual usage depends on the type of record this represents. For A and AAAA records, this is the subdomain being associated with an IP address.- Port int
The port this Record points to.
- Priority int
The priority of the target host. Lower values are preferred.
- Protocol string
The protocol this Record’s service communicates with. Only valid for SRV records.
- Record
Type string The type of Record this is in the DNS system. For example, A records associate a domain name with an IPv4 address, and AAAA records associate a domain name with an IPv6 address. Changing
record_typeforces the creation of a new Linode Domain Record..- Service string
The service this Record identified. Only valid for SRV records.
- Tag string
The tag portion of a CAA record. It is invalid to set this on other record types.
- Target string
The target for this Record. This field’s actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.
- 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.
- Weight int
The relative weight of this Record. Higher values are preferred.
- Domain
Id int The ID of the Domain to access. Changing
domain_idforces the creation of a new Linode Domain Record..- Name string
The name of this Record. Setting this is invalid for
SRVrecords as it is generated by the API. This field’s actual usage depends on the type of record this represents. For A and AAAA records, this is the subdomain being associated with an IP address.- Port int
The port this Record points to.
- Priority int
The priority of the target host. Lower values are preferred.
- Protocol string
The protocol this Record’s service communicates with. Only valid for SRV records.
- Record
Type string The type of Record this is in the DNS system. For example, A records associate a domain name with an IPv4 address, and AAAA records associate a domain name with an IPv6 address. Changing
record_typeforces the creation of a new Linode Domain Record..- Service string
The service this Record identified. Only valid for SRV records.
- Tag string
The tag portion of a CAA record. It is invalid to set this on other record types.
- Target string
The target for this Record. This field’s actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.
- 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.
- Weight int
The relative weight of this Record. Higher values are preferred.
- domain
Id number The ID of the Domain to access. Changing
domain_idforces the creation of a new Linode Domain Record..- name string
The name of this Record. Setting this is invalid for
SRVrecords as it is generated by the API. This field’s actual usage depends on the type of record this represents. For A and AAAA records, this is the subdomain being associated with an IP address.- port number
The port this Record points to.
- priority number
The priority of the target host. Lower values are preferred.
- protocol string
The protocol this Record’s service communicates with. Only valid for SRV records.
- record
Type string The type of Record this is in the DNS system. For example, A records associate a domain name with an IPv4 address, and AAAA records associate a domain name with an IPv6 address. Changing
record_typeforces the creation of a new Linode Domain Record..- service string
The service this Record identified. Only valid for SRV records.
- tag string
The tag portion of a CAA record. It is invalid to set this on other record types.
- target string
The target for this Record. This field’s actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.
- ttl
Sec 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.
- weight number
The relative weight of this Record. Higher values are preferred.
- domain_
id float The ID of the Domain to access. Changing
domain_idforces the creation of a new Linode Domain Record..- name str
The name of this Record. Setting this is invalid for
SRVrecords as it is generated by the API. This field’s actual usage depends on the type of record this represents. For A and AAAA records, this is the subdomain being associated with an IP address.- port float
The port this Record points to.
- priority float
The priority of the target host. Lower values are preferred.
- protocol str
The protocol this Record’s service communicates with. Only valid for SRV records.
- record_
type str The type of Record this is in the DNS system. For example, A records associate a domain name with an IPv4 address, and AAAA records associate a domain name with an IPv6 address. Changing
record_typeforces the creation of a new Linode Domain Record..- service str
The service this Record identified. Only valid for SRV records.
- tag str
The tag portion of a CAA record. It is invalid to set this on other record types.
- target str
The target for this Record. This field’s actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.
- ttl_
sec float ‘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.
- weight float
The relative weight of this Record. Higher values are preferred.
Package Details
- Repository
- https://github.com/pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
linodeTerraform Provider.