1. Packages
  2. Routeros Provider
  3. API Docs
  4. IpDnsRecord
routeros 1.83.1 published on Monday, Apr 28, 2025 by terraform-routeros

routeros.IpDnsRecord

Explore with Pulumi AI

routeros logo
routeros 1.83.1 published on Monday, Apr 28, 2025 by terraform-routeros

    # routeros.IpDnsRecord (Resource)

    Creates a DNS record on the MikroTik device.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as routeros from "@pulumi/routeros";
    
    const nameRecord = new routeros.IpDnsRecord("nameRecord", {
        address: "192.168.88.1",
        type: "A",
    });
    const regexpRecord = new routeros.IpDnsRecord("regexpRecord", {
        address: "192.168.88.1",
        regexp: ".*pool.ntp.org",
        type: "A",
    });
    const aaaaRecord = new routeros.DnsRecord("aaaaRecord", {
        address: "ff00::1",
        type: "AAAA",
    });
    const cnameRecord = new routeros.DnsRecord("cnameRecord", {
        cname: "ipv4.lan",
        type: "CNAME",
    });
    const fwdRecord = new routeros.DnsRecord("fwdRecord", {
        forwardTo: "127.0.0.1",
        type: "FWD",
    });
    const mxRecord = new routeros.DnsRecord("mxRecord", {
        mxExchange: "127.0.0.1",
        mxPreference: 10,
        type: "MX",
    });
    const nsRecord = new routeros.DnsRecord("nsRecord", {
        ns: "127.0.0.1",
        type: "NS",
    });
    const nxdomainRecord = new routeros.DnsRecord("nxdomainRecord", {type: "NXDOMAIN"});
    const srvRecord = new routeros.DnsRecord("srvRecord", {
        srvPort: 8080,
        srvPriority: 10,
        srvTarget: "127.0.0.1",
        srvWeight: "100",
        type: "SRV",
    });
    const txtRecord = new routeros.DnsRecord("txtRecord", {
        text: "dW6MrI3nBy3eJgYWH3QAg1Cwk_TvjFESOuKo+mp6nm1",
        type: "TXT",
    });
    
    import pulumi
    import pulumi_routeros as routeros
    
    name_record = routeros.IpDnsRecord("nameRecord",
        address="192.168.88.1",
        type="A")
    regexp_record = routeros.IpDnsRecord("regexpRecord",
        address="192.168.88.1",
        regexp=".*pool.ntp.org",
        type="A")
    aaaa_record = routeros.DnsRecord("aaaaRecord",
        address="ff00::1",
        type="AAAA")
    cname_record = routeros.DnsRecord("cnameRecord",
        cname="ipv4.lan",
        type="CNAME")
    fwd_record = routeros.DnsRecord("fwdRecord",
        forward_to="127.0.0.1",
        type="FWD")
    mx_record = routeros.DnsRecord("mxRecord",
        mx_exchange="127.0.0.1",
        mx_preference=10,
        type="MX")
    ns_record = routeros.DnsRecord("nsRecord",
        ns="127.0.0.1",
        type="NS")
    nxdomain_record = routeros.DnsRecord("nxdomainRecord", type="NXDOMAIN")
    srv_record = routeros.DnsRecord("srvRecord",
        srv_port=8080,
        srv_priority=10,
        srv_target="127.0.0.1",
        srv_weight="100",
        type="SRV")
    txt_record = routeros.DnsRecord("txtRecord",
        text="dW6MrI3nBy3eJgYWH3QAg1Cwk_TvjFESOuKo+mp6nm1",
        type="TXT")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/routeros/routeros"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := routeros.NewIpDnsRecord(ctx, "nameRecord", &routeros.IpDnsRecordArgs{
    			Address: pulumi.String("192.168.88.1"),
    			Type:    pulumi.String("A"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = routeros.NewIpDnsRecord(ctx, "regexpRecord", &routeros.IpDnsRecordArgs{
    			Address: pulumi.String("192.168.88.1"),
    			Regexp:  pulumi.String(".*pool.ntp.org"),
    			Type:    pulumi.String("A"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = routeros.NewDnsRecord(ctx, "aaaaRecord", &routeros.DnsRecordArgs{
    			Address: pulumi.String("ff00::1"),
    			Type:    pulumi.String("AAAA"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = routeros.NewDnsRecord(ctx, "cnameRecord", &routeros.DnsRecordArgs{
    			Cname: pulumi.String("ipv4.lan"),
    			Type:  pulumi.String("CNAME"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = routeros.NewDnsRecord(ctx, "fwdRecord", &routeros.DnsRecordArgs{
    			ForwardTo: pulumi.String("127.0.0.1"),
    			Type:      pulumi.String("FWD"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = routeros.NewDnsRecord(ctx, "mxRecord", &routeros.DnsRecordArgs{
    			MxExchange:   pulumi.String("127.0.0.1"),
    			MxPreference: pulumi.Float64(10),
    			Type:         pulumi.String("MX"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = routeros.NewDnsRecord(ctx, "nsRecord", &routeros.DnsRecordArgs{
    			Ns:   pulumi.String("127.0.0.1"),
    			Type: pulumi.String("NS"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = routeros.NewDnsRecord(ctx, "nxdomainRecord", &routeros.DnsRecordArgs{
    			Type: pulumi.String("NXDOMAIN"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = routeros.NewDnsRecord(ctx, "srvRecord", &routeros.DnsRecordArgs{
    			SrvPort:     pulumi.Float64(8080),
    			SrvPriority: pulumi.Float64(10),
    			SrvTarget:   pulumi.String("127.0.0.1"),
    			SrvWeight:   pulumi.String("100"),
    			Type:        pulumi.String("SRV"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = routeros.NewDnsRecord(ctx, "txtRecord", &routeros.DnsRecordArgs{
    			Text: pulumi.String("dW6MrI3nBy3eJgYWH3QAg1Cwk_TvjFESOuKo+mp6nm1"),
    			Type: pulumi.String("TXT"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Routeros = Pulumi.Routeros;
    
    return await Deployment.RunAsync(() => 
    {
        var nameRecord = new Routeros.IpDnsRecord("nameRecord", new()
        {
            Address = "192.168.88.1",
            Type = "A",
        });
    
        var regexpRecord = new Routeros.IpDnsRecord("regexpRecord", new()
        {
            Address = "192.168.88.1",
            Regexp = ".*pool.ntp.org",
            Type = "A",
        });
    
        var aaaaRecord = new Routeros.DnsRecord("aaaaRecord", new()
        {
            Address = "ff00::1",
            Type = "AAAA",
        });
    
        var cnameRecord = new Routeros.DnsRecord("cnameRecord", new()
        {
            Cname = "ipv4.lan",
            Type = "CNAME",
        });
    
        var fwdRecord = new Routeros.DnsRecord("fwdRecord", new()
        {
            ForwardTo = "127.0.0.1",
            Type = "FWD",
        });
    
        var mxRecord = new Routeros.DnsRecord("mxRecord", new()
        {
            MxExchange = "127.0.0.1",
            MxPreference = 10,
            Type = "MX",
        });
    
        var nsRecord = new Routeros.DnsRecord("nsRecord", new()
        {
            Ns = "127.0.0.1",
            Type = "NS",
        });
    
        var nxdomainRecord = new Routeros.DnsRecord("nxdomainRecord", new()
        {
            Type = "NXDOMAIN",
        });
    
        var srvRecord = new Routeros.DnsRecord("srvRecord", new()
        {
            SrvPort = 8080,
            SrvPriority = 10,
            SrvTarget = "127.0.0.1",
            SrvWeight = "100",
            Type = "SRV",
        });
    
        var txtRecord = new Routeros.DnsRecord("txtRecord", new()
        {
            Text = "dW6MrI3nBy3eJgYWH3QAg1Cwk_TvjFESOuKo+mp6nm1",
            Type = "TXT",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.routeros.IpDnsRecord;
    import com.pulumi.routeros.IpDnsRecordArgs;
    import com.pulumi.routeros.DnsRecord;
    import com.pulumi.routeros.DnsRecordArgs;
    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 nameRecord = new IpDnsRecord("nameRecord", IpDnsRecordArgs.builder()
                .address("192.168.88.1")
                .type("A")
                .build());
    
            var regexpRecord = new IpDnsRecord("regexpRecord", IpDnsRecordArgs.builder()
                .address("192.168.88.1")
                .regexp(".*pool.ntp.org")
                .type("A")
                .build());
    
            var aaaaRecord = new DnsRecord("aaaaRecord", DnsRecordArgs.builder()
                .address("ff00::1")
                .type("AAAA")
                .build());
    
            var cnameRecord = new DnsRecord("cnameRecord", DnsRecordArgs.builder()
                .cname("ipv4.lan")
                .type("CNAME")
                .build());
    
            var fwdRecord = new DnsRecord("fwdRecord", DnsRecordArgs.builder()
                .forwardTo("127.0.0.1")
                .type("FWD")
                .build());
    
            var mxRecord = new DnsRecord("mxRecord", DnsRecordArgs.builder()
                .mxExchange("127.0.0.1")
                .mxPreference(10)
                .type("MX")
                .build());
    
            var nsRecord = new DnsRecord("nsRecord", DnsRecordArgs.builder()
                .ns("127.0.0.1")
                .type("NS")
                .build());
    
            var nxdomainRecord = new DnsRecord("nxdomainRecord", DnsRecordArgs.builder()
                .type("NXDOMAIN")
                .build());
    
            var srvRecord = new DnsRecord("srvRecord", DnsRecordArgs.builder()
                .srvPort(8080)
                .srvPriority(10)
                .srvTarget("127.0.0.1")
                .srvWeight(100)
                .type("SRV")
                .build());
    
            var txtRecord = new DnsRecord("txtRecord", DnsRecordArgs.builder()
                .text("dW6MrI3nBy3eJgYWH3QAg1Cwk_TvjFESOuKo+mp6nm1")
                .type("TXT")
                .build());
    
        }
    }
    
    resources:
      nameRecord:
        type: routeros:IpDnsRecord
        properties:
          address: 192.168.88.1
          type: A
      regexpRecord:
        type: routeros:IpDnsRecord
        properties:
          address: 192.168.88.1
          regexp: .*pool.ntp.org
          type: A
      aaaaRecord:
        type: routeros:DnsRecord
        properties:
          address: ff00::1
          type: AAAA
      cnameRecord:
        type: routeros:DnsRecord
        properties:
          cname: ipv4.lan
          type: CNAME
      fwdRecord:
        type: routeros:DnsRecord
        properties:
          forwardTo: 127.0.0.1
          type: FWD
      mxRecord:
        type: routeros:DnsRecord
        properties:
          mxExchange: 127.0.0.1
          mxPreference: 10
          type: MX
      nsRecord:
        type: routeros:DnsRecord
        properties:
          ns: 127.0.0.1
          type: NS
      nxdomainRecord:
        type: routeros:DnsRecord
        properties:
          type: NXDOMAIN
      srvRecord:
        type: routeros:DnsRecord
        properties:
          srvPort: 8080
          srvPriority: 10
          srvTarget: 127.0.0.1
          srvWeight: 100
          type: SRV
      txtRecord:
        type: routeros:DnsRecord
        properties:
          text: dW6MrI3nBy3eJgYWH3QAg1Cwk_TvjFESOuKo+mp6nm1
          type: TXT
    

    Create IpDnsRecord Resource

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

    Constructor syntax

    new IpDnsRecord(name: string, args: IpDnsRecordArgs, opts?: CustomResourceOptions);
    @overload
    def IpDnsRecord(resource_name: str,
                    args: IpDnsRecordArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def IpDnsRecord(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    type: Optional[str] = None,
                    mx_exchange: Optional[str] = None,
                    name: Optional[str] = None,
                    address_list: Optional[str] = None,
                    cname: Optional[str] = None,
                    comment: Optional[str] = None,
                    disabled: Optional[bool] = None,
                    forward_to: Optional[str] = None,
                    ip_dns_record_id: Optional[str] = None,
                    match_subdomain: Optional[bool] = None,
                    ___id_: Optional[float] = None,
                    address: Optional[str] = None,
                    ns: Optional[str] = None,
                    mx_preference: Optional[float] = None,
                    regexp: Optional[str] = None,
                    srv_port: Optional[float] = None,
                    srv_priority: Optional[float] = None,
                    srv_target: Optional[str] = None,
                    srv_weight: Optional[str] = None,
                    text: Optional[str] = None,
                    ttl: Optional[str] = None,
                    ___path_: Optional[str] = None)
    func NewIpDnsRecord(ctx *Context, name string, args IpDnsRecordArgs, opts ...ResourceOption) (*IpDnsRecord, error)
    public IpDnsRecord(string name, IpDnsRecordArgs args, CustomResourceOptions? opts = null)
    public IpDnsRecord(String name, IpDnsRecordArgs args)
    public IpDnsRecord(String name, IpDnsRecordArgs args, CustomResourceOptions options)
    
    type: routeros:IpDnsRecord
    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 IpDnsRecordArgs
    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 IpDnsRecordArgs
    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 IpDnsRecordArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpDnsRecordArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpDnsRecordArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    IpDnsRecord 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 IpDnsRecord resource accepts the following input properties:

    Type string
    Type of the DNS record. Available values are: A, AAAA, CNAME, FWD, MX, NS, NXDOMAIN, SRV, TXT
    Address string
    The A record to be returend from the DNS hostname.
    AddressList string
    Name of the Firewall address list to which address must be dynamically added when some request matches the entry.
    Cname string
    Alias name for a domain name.
    Comment string
    Disabled bool
    ForwardTo string
    The IP address of a domain name server to which a particular DNS request must be forwarded.
    IpDnsRecordId string
    The ID of this resource.
    MatchSubdomain bool
    Whether the record will match requests for subdomains.
    MxExchange string
    The domain name of the MX server.
    MxPreference double
    Preference of the particular MX record.
    Name string
    The name of the DNS hostname to be created.
    Ns string
    Name of the authoritative domain name server for the particular record.
    Regexp string
    DNS regexp. Regexp entries are case sensitive, but since DNS requests are not case sensitive, RouterOS converts DNS names to lowercase, you should write regex only with lowercase letters.
    SrvPort double
    The TCP or UDP port on which the service is to be found.
    SrvPriority double
    Priority of the particular SRV record.
    SrvTarget string
    The canonical hostname of the machine providing the service ends in a dot.
    SrvWeight string
    Weight of the particular SRC record.
    Text string
    Textual information about the domain name.
    Ttl string
    The ttl of the DNS record.
    ___id_ double
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    Type string
    Type of the DNS record. Available values are: A, AAAA, CNAME, FWD, MX, NS, NXDOMAIN, SRV, TXT
    Address string
    The A record to be returend from the DNS hostname.
    AddressList string
    Name of the Firewall address list to which address must be dynamically added when some request matches the entry.
    Cname string
    Alias name for a domain name.
    Comment string
    Disabled bool
    ForwardTo string
    The IP address of a domain name server to which a particular DNS request must be forwarded.
    IpDnsRecordId string
    The ID of this resource.
    MatchSubdomain bool
    Whether the record will match requests for subdomains.
    MxExchange string
    The domain name of the MX server.
    MxPreference float64
    Preference of the particular MX record.
    Name string
    The name of the DNS hostname to be created.
    Ns string
    Name of the authoritative domain name server for the particular record.
    Regexp string
    DNS regexp. Regexp entries are case sensitive, but since DNS requests are not case sensitive, RouterOS converts DNS names to lowercase, you should write regex only with lowercase letters.
    SrvPort float64
    The TCP or UDP port on which the service is to be found.
    SrvPriority float64
    Priority of the particular SRV record.
    SrvTarget string
    The canonical hostname of the machine providing the service ends in a dot.
    SrvWeight string
    Weight of the particular SRC record.
    Text string
    Textual information about the domain name.
    Ttl string
    The ttl of the DNS record.
    ___id_ float64
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    type String
    Type of the DNS record. Available values are: A, AAAA, CNAME, FWD, MX, NS, NXDOMAIN, SRV, TXT
    ___id_ Double
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ String
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address String
    The A record to be returend from the DNS hostname.
    addressList String
    Name of the Firewall address list to which address must be dynamically added when some request matches the entry.
    cname String
    Alias name for a domain name.
    comment String
    disabled Boolean
    forwardTo String
    The IP address of a domain name server to which a particular DNS request must be forwarded.
    ipDnsRecordId String
    The ID of this resource.
    matchSubdomain Boolean
    Whether the record will match requests for subdomains.
    mxExchange String
    The domain name of the MX server.
    mxPreference Double
    Preference of the particular MX record.
    name String
    The name of the DNS hostname to be created.
    ns String
    Name of the authoritative domain name server for the particular record.
    regexp String
    DNS regexp. Regexp entries are case sensitive, but since DNS requests are not case sensitive, RouterOS converts DNS names to lowercase, you should write regex only with lowercase letters.
    srvPort Double
    The TCP or UDP port on which the service is to be found.
    srvPriority Double
    Priority of the particular SRV record.
    srvTarget String
    The canonical hostname of the machine providing the service ends in a dot.
    srvWeight String
    Weight of the particular SRC record.
    text String
    Textual information about the domain name.
    ttl String
    The ttl of the DNS record.
    type string
    Type of the DNS record. Available values are: A, AAAA, CNAME, FWD, MX, NS, NXDOMAIN, SRV, TXT
    ___id_ number
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address string
    The A record to be returend from the DNS hostname.
    addressList string
    Name of the Firewall address list to which address must be dynamically added when some request matches the entry.
    cname string
    Alias name for a domain name.
    comment string
    disabled boolean
    forwardTo string
    The IP address of a domain name server to which a particular DNS request must be forwarded.
    ipDnsRecordId string
    The ID of this resource.
    matchSubdomain boolean
    Whether the record will match requests for subdomains.
    mxExchange string
    The domain name of the MX server.
    mxPreference number
    Preference of the particular MX record.
    name string
    The name of the DNS hostname to be created.
    ns string
    Name of the authoritative domain name server for the particular record.
    regexp string
    DNS regexp. Regexp entries are case sensitive, but since DNS requests are not case sensitive, RouterOS converts DNS names to lowercase, you should write regex only with lowercase letters.
    srvPort number
    The TCP or UDP port on which the service is to be found.
    srvPriority number
    Priority of the particular SRV record.
    srvTarget string
    The canonical hostname of the machine providing the service ends in a dot.
    srvWeight string
    Weight of the particular SRC record.
    text string
    Textual information about the domain name.
    ttl string
    The ttl of the DNS record.
    type str
    Type of the DNS record. Available values are: A, AAAA, CNAME, FWD, MX, NS, NXDOMAIN, SRV, TXT
    ___id_ float
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ str
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address str
    The A record to be returend from the DNS hostname.
    address_list str
    Name of the Firewall address list to which address must be dynamically added when some request matches the entry.
    cname str
    Alias name for a domain name.
    comment str
    disabled bool
    forward_to str
    The IP address of a domain name server to which a particular DNS request must be forwarded.
    ip_dns_record_id str
    The ID of this resource.
    match_subdomain bool
    Whether the record will match requests for subdomains.
    mx_exchange str
    The domain name of the MX server.
    mx_preference float
    Preference of the particular MX record.
    name str
    The name of the DNS hostname to be created.
    ns str
    Name of the authoritative domain name server for the particular record.
    regexp str
    DNS regexp. Regexp entries are case sensitive, but since DNS requests are not case sensitive, RouterOS converts DNS names to lowercase, you should write regex only with lowercase letters.
    srv_port float
    The TCP or UDP port on which the service is to be found.
    srv_priority float
    Priority of the particular SRV record.
    srv_target str
    The canonical hostname of the machine providing the service ends in a dot.
    srv_weight str
    Weight of the particular SRC record.
    text str
    Textual information about the domain name.
    ttl str
    The ttl of the DNS record.
    type String
    Type of the DNS record. Available values are: A, AAAA, CNAME, FWD, MX, NS, NXDOMAIN, SRV, TXT
    ___id_ Number
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ String
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address String
    The A record to be returend from the DNS hostname.
    addressList String
    Name of the Firewall address list to which address must be dynamically added when some request matches the entry.
    cname String
    Alias name for a domain name.
    comment String
    disabled Boolean
    forwardTo String
    The IP address of a domain name server to which a particular DNS request must be forwarded.
    ipDnsRecordId String
    The ID of this resource.
    matchSubdomain Boolean
    Whether the record will match requests for subdomains.
    mxExchange String
    The domain name of the MX server.
    mxPreference Number
    Preference of the particular MX record.
    name String
    The name of the DNS hostname to be created.
    ns String
    Name of the authoritative domain name server for the particular record.
    regexp String
    DNS regexp. Regexp entries are case sensitive, but since DNS requests are not case sensitive, RouterOS converts DNS names to lowercase, you should write regex only with lowercase letters.
    srvPort Number
    The TCP or UDP port on which the service is to be found.
    srvPriority Number
    Priority of the particular SRV record.
    srvTarget String
    The canonical hostname of the machine providing the service ends in a dot.
    srvWeight String
    Weight of the particular SRC record.
    text String
    Textual information about the domain name.
    ttl String
    The ttl of the DNS record.

    Outputs

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

    Dynamic bool
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    Id string
    The provider-assigned unique ID for this managed resource.
    Dynamic bool
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    Id string
    The provider-assigned unique ID for this managed resource.
    dynamic Boolean
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    id String
    The provider-assigned unique ID for this managed resource.
    dynamic boolean
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    id string
    The provider-assigned unique ID for this managed resource.
    dynamic bool
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    id str
    The provider-assigned unique ID for this managed resource.
    dynamic Boolean
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing IpDnsRecord Resource

    Get an existing IpDnsRecord 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?: IpDnsRecordState, opts?: CustomResourceOptions): IpDnsRecord
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ___id_: Optional[float] = None,
            ___path_: Optional[str] = None,
            address: Optional[str] = None,
            address_list: Optional[str] = None,
            cname: Optional[str] = None,
            comment: Optional[str] = None,
            disabled: Optional[bool] = None,
            dynamic: Optional[bool] = None,
            forward_to: Optional[str] = None,
            ip_dns_record_id: Optional[str] = None,
            match_subdomain: Optional[bool] = None,
            mx_exchange: Optional[str] = None,
            mx_preference: Optional[float] = None,
            name: Optional[str] = None,
            ns: Optional[str] = None,
            regexp: Optional[str] = None,
            srv_port: Optional[float] = None,
            srv_priority: Optional[float] = None,
            srv_target: Optional[str] = None,
            srv_weight: Optional[str] = None,
            text: Optional[str] = None,
            ttl: Optional[str] = None,
            type: Optional[str] = None) -> IpDnsRecord
    func GetIpDnsRecord(ctx *Context, name string, id IDInput, state *IpDnsRecordState, opts ...ResourceOption) (*IpDnsRecord, error)
    public static IpDnsRecord Get(string name, Input<string> id, IpDnsRecordState? state, CustomResourceOptions? opts = null)
    public static IpDnsRecord get(String name, Output<String> id, IpDnsRecordState state, CustomResourceOptions options)
    resources:  _:    type: routeros:IpDnsRecord    get:      id: ${id}
    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:
    Address string
    The A record to be returend from the DNS hostname.
    AddressList string
    Name of the Firewall address list to which address must be dynamically added when some request matches the entry.
    Cname string
    Alias name for a domain name.
    Comment string
    Disabled bool
    Dynamic bool
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    ForwardTo string
    The IP address of a domain name server to which a particular DNS request must be forwarded.
    IpDnsRecordId string
    The ID of this resource.
    MatchSubdomain bool
    Whether the record will match requests for subdomains.
    MxExchange string
    The domain name of the MX server.
    MxPreference double
    Preference of the particular MX record.
    Name string
    The name of the DNS hostname to be created.
    Ns string
    Name of the authoritative domain name server for the particular record.
    Regexp string
    DNS regexp. Regexp entries are case sensitive, but since DNS requests are not case sensitive, RouterOS converts DNS names to lowercase, you should write regex only with lowercase letters.
    SrvPort double
    The TCP or UDP port on which the service is to be found.
    SrvPriority double
    Priority of the particular SRV record.
    SrvTarget string
    The canonical hostname of the machine providing the service ends in a dot.
    SrvWeight string
    Weight of the particular SRC record.
    Text string
    Textual information about the domain name.
    Ttl string
    The ttl of the DNS record.
    Type string
    Type of the DNS record. Available values are: A, AAAA, CNAME, FWD, MX, NS, NXDOMAIN, SRV, TXT
    ___id_ double
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    Address string
    The A record to be returend from the DNS hostname.
    AddressList string
    Name of the Firewall address list to which address must be dynamically added when some request matches the entry.
    Cname string
    Alias name for a domain name.
    Comment string
    Disabled bool
    Dynamic bool
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    ForwardTo string
    The IP address of a domain name server to which a particular DNS request must be forwarded.
    IpDnsRecordId string
    The ID of this resource.
    MatchSubdomain bool
    Whether the record will match requests for subdomains.
    MxExchange string
    The domain name of the MX server.
    MxPreference float64
    Preference of the particular MX record.
    Name string
    The name of the DNS hostname to be created.
    Ns string
    Name of the authoritative domain name server for the particular record.
    Regexp string
    DNS regexp. Regexp entries are case sensitive, but since DNS requests are not case sensitive, RouterOS converts DNS names to lowercase, you should write regex only with lowercase letters.
    SrvPort float64
    The TCP or UDP port on which the service is to be found.
    SrvPriority float64
    Priority of the particular SRV record.
    SrvTarget string
    The canonical hostname of the machine providing the service ends in a dot.
    SrvWeight string
    Weight of the particular SRC record.
    Text string
    Textual information about the domain name.
    Ttl string
    The ttl of the DNS record.
    Type string
    Type of the DNS record. Available values are: A, AAAA, CNAME, FWD, MX, NS, NXDOMAIN, SRV, TXT
    ___id_ float64
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    ___id_ Double
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ String
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address String
    The A record to be returend from the DNS hostname.
    addressList String
    Name of the Firewall address list to which address must be dynamically added when some request matches the entry.
    cname String
    Alias name for a domain name.
    comment String
    disabled Boolean
    dynamic Boolean
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    forwardTo String
    The IP address of a domain name server to which a particular DNS request must be forwarded.
    ipDnsRecordId String
    The ID of this resource.
    matchSubdomain Boolean
    Whether the record will match requests for subdomains.
    mxExchange String
    The domain name of the MX server.
    mxPreference Double
    Preference of the particular MX record.
    name String
    The name of the DNS hostname to be created.
    ns String
    Name of the authoritative domain name server for the particular record.
    regexp String
    DNS regexp. Regexp entries are case sensitive, but since DNS requests are not case sensitive, RouterOS converts DNS names to lowercase, you should write regex only with lowercase letters.
    srvPort Double
    The TCP or UDP port on which the service is to be found.
    srvPriority Double
    Priority of the particular SRV record.
    srvTarget String
    The canonical hostname of the machine providing the service ends in a dot.
    srvWeight String
    Weight of the particular SRC record.
    text String
    Textual information about the domain name.
    ttl String
    The ttl of the DNS record.
    type String
    Type of the DNS record. Available values are: A, AAAA, CNAME, FWD, MX, NS, NXDOMAIN, SRV, TXT
    ___id_ number
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ string
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address string
    The A record to be returend from the DNS hostname.
    addressList string
    Name of the Firewall address list to which address must be dynamically added when some request matches the entry.
    cname string
    Alias name for a domain name.
    comment string
    disabled boolean
    dynamic boolean
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    forwardTo string
    The IP address of a domain name server to which a particular DNS request must be forwarded.
    ipDnsRecordId string
    The ID of this resource.
    matchSubdomain boolean
    Whether the record will match requests for subdomains.
    mxExchange string
    The domain name of the MX server.
    mxPreference number
    Preference of the particular MX record.
    name string
    The name of the DNS hostname to be created.
    ns string
    Name of the authoritative domain name server for the particular record.
    regexp string
    DNS regexp. Regexp entries are case sensitive, but since DNS requests are not case sensitive, RouterOS converts DNS names to lowercase, you should write regex only with lowercase letters.
    srvPort number
    The TCP or UDP port on which the service is to be found.
    srvPriority number
    Priority of the particular SRV record.
    srvTarget string
    The canonical hostname of the machine providing the service ends in a dot.
    srvWeight string
    Weight of the particular SRC record.
    text string
    Textual information about the domain name.
    ttl string
    The ttl of the DNS record.
    type string
    Type of the DNS record. Available values are: A, AAAA, CNAME, FWD, MX, NS, NXDOMAIN, SRV, TXT
    ___id_ float
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ str
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address str
    The A record to be returend from the DNS hostname.
    address_list str
    Name of the Firewall address list to which address must be dynamically added when some request matches the entry.
    cname str
    Alias name for a domain name.
    comment str
    disabled bool
    dynamic bool
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    forward_to str
    The IP address of a domain name server to which a particular DNS request must be forwarded.
    ip_dns_record_id str
    The ID of this resource.
    match_subdomain bool
    Whether the record will match requests for subdomains.
    mx_exchange str
    The domain name of the MX server.
    mx_preference float
    Preference of the particular MX record.
    name str
    The name of the DNS hostname to be created.
    ns str
    Name of the authoritative domain name server for the particular record.
    regexp str
    DNS regexp. Regexp entries are case sensitive, but since DNS requests are not case sensitive, RouterOS converts DNS names to lowercase, you should write regex only with lowercase letters.
    srv_port float
    The TCP or UDP port on which the service is to be found.
    srv_priority float
    Priority of the particular SRV record.
    srv_target str
    The canonical hostname of the machine providing the service ends in a dot.
    srv_weight str
    Weight of the particular SRC record.
    text str
    Textual information about the domain name.
    ttl str
    The ttl of the DNS record.
    type str
    Type of the DNS record. Available values are: A, AAAA, CNAME, FWD, MX, NS, NXDOMAIN, SRV, TXT
    ___id_ Number
    Resource ID type (.id / name). This is an internal service field, setting a value is not required.
    ___path_ String
    Resource path for CRUD operations. This is an internal service field, setting a value is not required.
    address String
    The A record to be returend from the DNS hostname.
    addressList String
    Name of the Firewall address list to which address must be dynamically added when some request matches the entry.
    cname String
    Alias name for a domain name.
    comment String
    disabled Boolean
    dynamic Boolean
    Configuration item created by software, not by management interface. It is not exported, and cannot be directly modified.
    forwardTo String
    The IP address of a domain name server to which a particular DNS request must be forwarded.
    ipDnsRecordId String
    The ID of this resource.
    matchSubdomain Boolean
    Whether the record will match requests for subdomains.
    mxExchange String
    The domain name of the MX server.
    mxPreference Number
    Preference of the particular MX record.
    name String
    The name of the DNS hostname to be created.
    ns String
    Name of the authoritative domain name server for the particular record.
    regexp String
    DNS regexp. Regexp entries are case sensitive, but since DNS requests are not case sensitive, RouterOS converts DNS names to lowercase, you should write regex only with lowercase letters.
    srvPort Number
    The TCP or UDP port on which the service is to be found.
    srvPriority Number
    Priority of the particular SRV record.
    srvTarget String
    The canonical hostname of the machine providing the service ends in a dot.
    srvWeight String
    Weight of the particular SRC record.
    text String
    Textual information about the domain name.
    ttl String
    The ttl of the DNS record.
    type String
    Type of the DNS record. Available values are: A, AAAA, CNAME, FWD, MX, NS, NXDOMAIN, SRV, TXT

    Import

    #The ID can be found via API or the terminal

    #The command for the terminal is -> :put [/ip/dns/static get [print show-ids]]

    $ pulumi import routeros:index/ipDnsRecord:IpDnsRecord name_record "*0"
    

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

    Package Details

    Repository
    routeros terraform-routeros/terraform-provider-routeros
    License
    Notes
    This Pulumi package is based on the routeros Terraform Provider.
    routeros logo
    routeros 1.83.1 published on Monday, Apr 28, 2025 by terraform-routeros