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

routeros.IpDhcpServerLease

Explore with Pulumi AI

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

    # routeros.IpDhcpServerLease (Resource)

    Creates a DHCP lease on the mikrotik device.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as routeros from "@pulumi/routeros";
    
    const dhcpLease = new routeros.IpDhcpServerLease("dhcpLease", {
        address: "10.0.0.2",
        macAddress: "AA:BB:CC:DD:11:22",
    });
    
    import pulumi
    import pulumi_routeros as routeros
    
    dhcp_lease = routeros.IpDhcpServerLease("dhcpLease",
        address="10.0.0.2",
        mac_address="AA:BB:CC:DD:11:22")
    
    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.NewIpDhcpServerLease(ctx, "dhcpLease", &routeros.IpDhcpServerLeaseArgs{
    			Address:    pulumi.String("10.0.0.2"),
    			MacAddress: pulumi.String("AA:BB:CC:DD:11:22"),
    		})
    		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 dhcpLease = new Routeros.IpDhcpServerLease("dhcpLease", new()
        {
            Address = "10.0.0.2",
            MacAddress = "AA:BB:CC:DD:11:22",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.routeros.IpDhcpServerLease;
    import com.pulumi.routeros.IpDhcpServerLeaseArgs;
    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 dhcpLease = new IpDhcpServerLease("dhcpLease", IpDhcpServerLeaseArgs.builder()
                .address("10.0.0.2")
                .macAddress("AA:BB:CC:DD:11:22")
                .build());
    
        }
    }
    
    resources:
      dhcpLease:
        type: routeros:IpDhcpServerLease
        properties:
          address: 10.0.0.2
          macAddress: AA:BB:CC:DD:11:22
    

    Create IpDhcpServerLease Resource

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

    Constructor syntax

    new IpDhcpServerLease(name: string, args: IpDhcpServerLeaseArgs, opts?: CustomResourceOptions);
    @overload
    def IpDhcpServerLease(resource_name: str,
                          args: IpDhcpServerLeaseArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def IpDhcpServerLease(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          address: Optional[str] = None,
                          mac_address: Optional[str] = None,
                          comment: Optional[str] = None,
                          disabled: Optional[bool] = None,
                          allow_dual_stack_queue: Optional[bool] = None,
                          always_broadcast: Optional[bool] = None,
                          block_access: Optional[bool] = None,
                          client_id: Optional[str] = None,
                          ___id_: Optional[float] = None,
                          dhcp_option: Optional[str] = None,
                          dhcp_option_set: Optional[str] = None,
                          address_lists: Optional[str] = None,
                          insert_queue_before: Optional[str] = None,
                          ip_dhcp_server_lease_id: Optional[str] = None,
                          lease_time: Optional[str] = None,
                          ___path_: Optional[str] = None,
                          rate_limit: Optional[str] = None,
                          server: Optional[str] = None,
                          use_src_mac: Optional[bool] = None)
    func NewIpDhcpServerLease(ctx *Context, name string, args IpDhcpServerLeaseArgs, opts ...ResourceOption) (*IpDhcpServerLease, error)
    public IpDhcpServerLease(string name, IpDhcpServerLeaseArgs args, CustomResourceOptions? opts = null)
    public IpDhcpServerLease(String name, IpDhcpServerLeaseArgs args)
    public IpDhcpServerLease(String name, IpDhcpServerLeaseArgs args, CustomResourceOptions options)
    
    type: routeros:IpDhcpServerLease
    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 IpDhcpServerLeaseArgs
    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 IpDhcpServerLeaseArgs
    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 IpDhcpServerLeaseArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpDhcpServerLeaseArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpDhcpServerLeaseArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Address string
    The IP address of the DHCP lease to be created.
    MacAddress string
    The MAC addreess of the DHCP lease to be created.
    AddressLists string
    Address list to which address will be added if lease is bound.
    AllowDualStackQueue bool
    Creates a single simple queue entry for both IPv4 and IPv6 addresses, uses the MAC address and DUID for identification.
    AlwaysBroadcast bool
    Send all replies as broadcasts.
    BlockAccess bool
    Whether to block access for this DHCP client (true|false).
    ClientId string
    If specified, must match DHCP 'client identifier' option of the request.
    Comment string
    DhcpOption string
    Add additional DHCP options.
    DhcpOptionSet string
    Add additional set of DHCP options.
    Disabled bool
    InsertQueueBefore string
    Specify where to place dynamic simple queue entries for static DCHP leases with rate-limit parameter set.
    IpDhcpServerLeaseId string
    The ID of this resource.
    LeaseTime string
    Time that the client may use the address. If set to 0s lease will never expire.
    RateLimit string
    Adds a dynamic simple queue to limit IP's bandwidth to a specified rate. Requires the lease to be static.
    Server string
    Server name which serves this client.
    UseSrcMac bool
    When this option is set server uses source MAC address instead of received CHADDR to assign address.
    ___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 IP address of the DHCP lease to be created.
    MacAddress string
    The MAC addreess of the DHCP lease to be created.
    AddressLists string
    Address list to which address will be added if lease is bound.
    AllowDualStackQueue bool
    Creates a single simple queue entry for both IPv4 and IPv6 addresses, uses the MAC address and DUID for identification.
    AlwaysBroadcast bool
    Send all replies as broadcasts.
    BlockAccess bool
    Whether to block access for this DHCP client (true|false).
    ClientId string
    If specified, must match DHCP 'client identifier' option of the request.
    Comment string
    DhcpOption string
    Add additional DHCP options.
    DhcpOptionSet string
    Add additional set of DHCP options.
    Disabled bool
    InsertQueueBefore string
    Specify where to place dynamic simple queue entries for static DCHP leases with rate-limit parameter set.
    IpDhcpServerLeaseId string
    The ID of this resource.
    LeaseTime string
    Time that the client may use the address. If set to 0s lease will never expire.
    RateLimit string
    Adds a dynamic simple queue to limit IP's bandwidth to a specified rate. Requires the lease to be static.
    Server string
    Server name which serves this client.
    UseSrcMac bool
    When this option is set server uses source MAC address instead of received CHADDR to assign address.
    ___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.
    address String
    The IP address of the DHCP lease to be created.
    macAddress String
    The MAC addreess of the DHCP lease to be created.
    ___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.
    addressLists String
    Address list to which address will be added if lease is bound.
    allowDualStackQueue Boolean
    Creates a single simple queue entry for both IPv4 and IPv6 addresses, uses the MAC address and DUID for identification.
    alwaysBroadcast Boolean
    Send all replies as broadcasts.
    blockAccess Boolean
    Whether to block access for this DHCP client (true|false).
    clientId String
    If specified, must match DHCP 'client identifier' option of the request.
    comment String
    dhcpOption String
    Add additional DHCP options.
    dhcpOptionSet String
    Add additional set of DHCP options.
    disabled Boolean
    insertQueueBefore String
    Specify where to place dynamic simple queue entries for static DCHP leases with rate-limit parameter set.
    ipDhcpServerLeaseId String
    The ID of this resource.
    leaseTime String
    Time that the client may use the address. If set to 0s lease will never expire.
    rateLimit String
    Adds a dynamic simple queue to limit IP's bandwidth to a specified rate. Requires the lease to be static.
    server String
    Server name which serves this client.
    useSrcMac Boolean
    When this option is set server uses source MAC address instead of received CHADDR to assign address.
    address string
    The IP address of the DHCP lease to be created.
    macAddress string
    The MAC addreess of the DHCP lease to be created.
    ___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.
    addressLists string
    Address list to which address will be added if lease is bound.
    allowDualStackQueue boolean
    Creates a single simple queue entry for both IPv4 and IPv6 addresses, uses the MAC address and DUID for identification.
    alwaysBroadcast boolean
    Send all replies as broadcasts.
    blockAccess boolean
    Whether to block access for this DHCP client (true|false).
    clientId string
    If specified, must match DHCP 'client identifier' option of the request.
    comment string
    dhcpOption string
    Add additional DHCP options.
    dhcpOptionSet string
    Add additional set of DHCP options.
    disabled boolean
    insertQueueBefore string
    Specify where to place dynamic simple queue entries for static DCHP leases with rate-limit parameter set.
    ipDhcpServerLeaseId string
    The ID of this resource.
    leaseTime string
    Time that the client may use the address. If set to 0s lease will never expire.
    rateLimit string
    Adds a dynamic simple queue to limit IP's bandwidth to a specified rate. Requires the lease to be static.
    server string
    Server name which serves this client.
    useSrcMac boolean
    When this option is set server uses source MAC address instead of received CHADDR to assign address.
    address str
    The IP address of the DHCP lease to be created.
    mac_address str
    The MAC addreess of the DHCP lease to be created.
    ___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_lists str
    Address list to which address will be added if lease is bound.
    allow_dual_stack_queue bool
    Creates a single simple queue entry for both IPv4 and IPv6 addresses, uses the MAC address and DUID for identification.
    always_broadcast bool
    Send all replies as broadcasts.
    block_access bool
    Whether to block access for this DHCP client (true|false).
    client_id str
    If specified, must match DHCP 'client identifier' option of the request.
    comment str
    dhcp_option str
    Add additional DHCP options.
    dhcp_option_set str
    Add additional set of DHCP options.
    disabled bool
    insert_queue_before str
    Specify where to place dynamic simple queue entries for static DCHP leases with rate-limit parameter set.
    ip_dhcp_server_lease_id str
    The ID of this resource.
    lease_time str
    Time that the client may use the address. If set to 0s lease will never expire.
    rate_limit str
    Adds a dynamic simple queue to limit IP's bandwidth to a specified rate. Requires the lease to be static.
    server str
    Server name which serves this client.
    use_src_mac bool
    When this option is set server uses source MAC address instead of received CHADDR to assign address.
    address String
    The IP address of the DHCP lease to be created.
    macAddress String
    The MAC addreess of the DHCP lease to be created.
    ___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.
    addressLists String
    Address list to which address will be added if lease is bound.
    allowDualStackQueue Boolean
    Creates a single simple queue entry for both IPv4 and IPv6 addresses, uses the MAC address and DUID for identification.
    alwaysBroadcast Boolean
    Send all replies as broadcasts.
    blockAccess Boolean
    Whether to block access for this DHCP client (true|false).
    clientId String
    If specified, must match DHCP 'client identifier' option of the request.
    comment String
    dhcpOption String
    Add additional DHCP options.
    dhcpOptionSet String
    Add additional set of DHCP options.
    disabled Boolean
    insertQueueBefore String
    Specify where to place dynamic simple queue entries for static DCHP leases with rate-limit parameter set.
    ipDhcpServerLeaseId String
    The ID of this resource.
    leaseTime String
    Time that the client may use the address. If set to 0s lease will never expire.
    rateLimit String
    Adds a dynamic simple queue to limit IP's bandwidth to a specified rate. Requires the lease to be static.
    server String
    Server name which serves this client.
    useSrcMac Boolean
    When this option is set server uses source MAC address instead of received CHADDR to assign address.

    Outputs

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

    ActiveAddress string
    The IP address of the machine currently holding the DHCP lease.
    ActiveClientId string
    Actual client-id of the client.
    ActiveHostname string
    The hostname of the machine currently holding the DHCP lease.
    ActiveMacAddress string
    The MAC address of of the machine currently holding the DHCP lease.
    ActiveServer string
    Actual dhcp server, which serves this client.
    AgentCircuitId string
    Circuit ID of DHCP relay agent. If each character should be valid ASCII text symbol or else this value is displayed as hex dump.
    AgentRemoteId string
    Remote ID, set by DHCP relay agent.
    Blocked bool
    Whether the lease is blocked.
    ClassId string
    Class ID of the client. This option is available in RouterOS starting from version 7.16.
    Dynamic bool
    Whether the dhcp lease is static or dynamic. Dynamic leases are not guaranteed to continue to be assigned to that specific device.
    ExpiresAfter string
    Time until lease expires.
    HostName string
    The hostname of the device
    Id string
    The provider-assigned unique ID for this managed resource.
    LastSeen string
    Radius string
    Shows if this dynamic lease is authenticated by RADIUS or not.
    SrcMacAddress string
    Source MAC address.
    Status string
    Lease status.
    ActiveAddress string
    The IP address of the machine currently holding the DHCP lease.
    ActiveClientId string
    Actual client-id of the client.
    ActiveHostname string
    The hostname of the machine currently holding the DHCP lease.
    ActiveMacAddress string
    The MAC address of of the machine currently holding the DHCP lease.
    ActiveServer string
    Actual dhcp server, which serves this client.
    AgentCircuitId string
    Circuit ID of DHCP relay agent. If each character should be valid ASCII text symbol or else this value is displayed as hex dump.
    AgentRemoteId string
    Remote ID, set by DHCP relay agent.
    Blocked bool
    Whether the lease is blocked.
    ClassId string
    Class ID of the client. This option is available in RouterOS starting from version 7.16.
    Dynamic bool
    Whether the dhcp lease is static or dynamic. Dynamic leases are not guaranteed to continue to be assigned to that specific device.
    ExpiresAfter string
    Time until lease expires.
    HostName string
    The hostname of the device
    Id string
    The provider-assigned unique ID for this managed resource.
    LastSeen string
    Radius string
    Shows if this dynamic lease is authenticated by RADIUS or not.
    SrcMacAddress string
    Source MAC address.
    Status string
    Lease status.
    activeAddress String
    The IP address of the machine currently holding the DHCP lease.
    activeClientId String
    Actual client-id of the client.
    activeHostname String
    The hostname of the machine currently holding the DHCP lease.
    activeMacAddress String
    The MAC address of of the machine currently holding the DHCP lease.
    activeServer String
    Actual dhcp server, which serves this client.
    agentCircuitId String
    Circuit ID of DHCP relay agent. If each character should be valid ASCII text symbol or else this value is displayed as hex dump.
    agentRemoteId String
    Remote ID, set by DHCP relay agent.
    blocked Boolean
    Whether the lease is blocked.
    classId String
    Class ID of the client. This option is available in RouterOS starting from version 7.16.
    dynamic Boolean
    Whether the dhcp lease is static or dynamic. Dynamic leases are not guaranteed to continue to be assigned to that specific device.
    expiresAfter String
    Time until lease expires.
    hostName String
    The hostname of the device
    id String
    The provider-assigned unique ID for this managed resource.
    lastSeen String
    radius String
    Shows if this dynamic lease is authenticated by RADIUS or not.
    srcMacAddress String
    Source MAC address.
    status String
    Lease status.
    activeAddress string
    The IP address of the machine currently holding the DHCP lease.
    activeClientId string
    Actual client-id of the client.
    activeHostname string
    The hostname of the machine currently holding the DHCP lease.
    activeMacAddress string
    The MAC address of of the machine currently holding the DHCP lease.
    activeServer string
    Actual dhcp server, which serves this client.
    agentCircuitId string
    Circuit ID of DHCP relay agent. If each character should be valid ASCII text symbol or else this value is displayed as hex dump.
    agentRemoteId string
    Remote ID, set by DHCP relay agent.
    blocked boolean
    Whether the lease is blocked.
    classId string
    Class ID of the client. This option is available in RouterOS starting from version 7.16.
    dynamic boolean
    Whether the dhcp lease is static or dynamic. Dynamic leases are not guaranteed to continue to be assigned to that specific device.
    expiresAfter string
    Time until lease expires.
    hostName string
    The hostname of the device
    id string
    The provider-assigned unique ID for this managed resource.
    lastSeen string
    radius string
    Shows if this dynamic lease is authenticated by RADIUS or not.
    srcMacAddress string
    Source MAC address.
    status string
    Lease status.
    active_address str
    The IP address of the machine currently holding the DHCP lease.
    active_client_id str
    Actual client-id of the client.
    active_hostname str
    The hostname of the machine currently holding the DHCP lease.
    active_mac_address str
    The MAC address of of the machine currently holding the DHCP lease.
    active_server str
    Actual dhcp server, which serves this client.
    agent_circuit_id str
    Circuit ID of DHCP relay agent. If each character should be valid ASCII text symbol or else this value is displayed as hex dump.
    agent_remote_id str
    Remote ID, set by DHCP relay agent.
    blocked bool
    Whether the lease is blocked.
    class_id str
    Class ID of the client. This option is available in RouterOS starting from version 7.16.
    dynamic bool
    Whether the dhcp lease is static or dynamic. Dynamic leases are not guaranteed to continue to be assigned to that specific device.
    expires_after str
    Time until lease expires.
    host_name str
    The hostname of the device
    id str
    The provider-assigned unique ID for this managed resource.
    last_seen str
    radius str
    Shows if this dynamic lease is authenticated by RADIUS or not.
    src_mac_address str
    Source MAC address.
    status str
    Lease status.
    activeAddress String
    The IP address of the machine currently holding the DHCP lease.
    activeClientId String
    Actual client-id of the client.
    activeHostname String
    The hostname of the machine currently holding the DHCP lease.
    activeMacAddress String
    The MAC address of of the machine currently holding the DHCP lease.
    activeServer String
    Actual dhcp server, which serves this client.
    agentCircuitId String
    Circuit ID of DHCP relay agent. If each character should be valid ASCII text symbol or else this value is displayed as hex dump.
    agentRemoteId String
    Remote ID, set by DHCP relay agent.
    blocked Boolean
    Whether the lease is blocked.
    classId String
    Class ID of the client. This option is available in RouterOS starting from version 7.16.
    dynamic Boolean
    Whether the dhcp lease is static or dynamic. Dynamic leases are not guaranteed to continue to be assigned to that specific device.
    expiresAfter String
    Time until lease expires.
    hostName String
    The hostname of the device
    id String
    The provider-assigned unique ID for this managed resource.
    lastSeen String
    radius String
    Shows if this dynamic lease is authenticated by RADIUS or not.
    srcMacAddress String
    Source MAC address.
    status String
    Lease status.

    Look up Existing IpDhcpServerLease Resource

    Get an existing IpDhcpServerLease 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?: IpDhcpServerLeaseState, opts?: CustomResourceOptions): IpDhcpServerLease
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ___id_: Optional[float] = None,
            ___path_: Optional[str] = None,
            active_address: Optional[str] = None,
            active_client_id: Optional[str] = None,
            active_hostname: Optional[str] = None,
            active_mac_address: Optional[str] = None,
            active_server: Optional[str] = None,
            address: Optional[str] = None,
            address_lists: Optional[str] = None,
            agent_circuit_id: Optional[str] = None,
            agent_remote_id: Optional[str] = None,
            allow_dual_stack_queue: Optional[bool] = None,
            always_broadcast: Optional[bool] = None,
            block_access: Optional[bool] = None,
            blocked: Optional[bool] = None,
            class_id: Optional[str] = None,
            client_id: Optional[str] = None,
            comment: Optional[str] = None,
            dhcp_option: Optional[str] = None,
            dhcp_option_set: Optional[str] = None,
            disabled: Optional[bool] = None,
            dynamic: Optional[bool] = None,
            expires_after: Optional[str] = None,
            host_name: Optional[str] = None,
            insert_queue_before: Optional[str] = None,
            ip_dhcp_server_lease_id: Optional[str] = None,
            last_seen: Optional[str] = None,
            lease_time: Optional[str] = None,
            mac_address: Optional[str] = None,
            radius: Optional[str] = None,
            rate_limit: Optional[str] = None,
            server: Optional[str] = None,
            src_mac_address: Optional[str] = None,
            status: Optional[str] = None,
            use_src_mac: Optional[bool] = None) -> IpDhcpServerLease
    func GetIpDhcpServerLease(ctx *Context, name string, id IDInput, state *IpDhcpServerLeaseState, opts ...ResourceOption) (*IpDhcpServerLease, error)
    public static IpDhcpServerLease Get(string name, Input<string> id, IpDhcpServerLeaseState? state, CustomResourceOptions? opts = null)
    public static IpDhcpServerLease get(String name, Output<String> id, IpDhcpServerLeaseState state, CustomResourceOptions options)
    resources:  _:    type: routeros:IpDhcpServerLease    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:
    ActiveAddress string
    The IP address of the machine currently holding the DHCP lease.
    ActiveClientId string
    Actual client-id of the client.
    ActiveHostname string
    The hostname of the machine currently holding the DHCP lease.
    ActiveMacAddress string
    The MAC address of of the machine currently holding the DHCP lease.
    ActiveServer string
    Actual dhcp server, which serves this client.
    Address string
    The IP address of the DHCP lease to be created.
    AddressLists string
    Address list to which address will be added if lease is bound.
    AgentCircuitId string
    Circuit ID of DHCP relay agent. If each character should be valid ASCII text symbol or else this value is displayed as hex dump.
    AgentRemoteId string
    Remote ID, set by DHCP relay agent.
    AllowDualStackQueue bool
    Creates a single simple queue entry for both IPv4 and IPv6 addresses, uses the MAC address and DUID for identification.
    AlwaysBroadcast bool
    Send all replies as broadcasts.
    BlockAccess bool
    Whether to block access for this DHCP client (true|false).
    Blocked bool
    Whether the lease is blocked.
    ClassId string
    Class ID of the client. This option is available in RouterOS starting from version 7.16.
    ClientId string
    If specified, must match DHCP 'client identifier' option of the request.
    Comment string
    DhcpOption string
    Add additional DHCP options.
    DhcpOptionSet string
    Add additional set of DHCP options.
    Disabled bool
    Dynamic bool
    Whether the dhcp lease is static or dynamic. Dynamic leases are not guaranteed to continue to be assigned to that specific device.
    ExpiresAfter string
    Time until lease expires.
    HostName string
    The hostname of the device
    InsertQueueBefore string
    Specify where to place dynamic simple queue entries for static DCHP leases with rate-limit parameter set.
    IpDhcpServerLeaseId string
    The ID of this resource.
    LastSeen string
    LeaseTime string
    Time that the client may use the address. If set to 0s lease will never expire.
    MacAddress string
    The MAC addreess of the DHCP lease to be created.
    Radius string
    Shows if this dynamic lease is authenticated by RADIUS or not.
    RateLimit string
    Adds a dynamic simple queue to limit IP's bandwidth to a specified rate. Requires the lease to be static.
    Server string
    Server name which serves this client.
    SrcMacAddress string
    Source MAC address.
    Status string
    Lease status.
    UseSrcMac bool
    When this option is set server uses source MAC address instead of received CHADDR to assign address.
    ___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.
    ActiveAddress string
    The IP address of the machine currently holding the DHCP lease.
    ActiveClientId string
    Actual client-id of the client.
    ActiveHostname string
    The hostname of the machine currently holding the DHCP lease.
    ActiveMacAddress string
    The MAC address of of the machine currently holding the DHCP lease.
    ActiveServer string
    Actual dhcp server, which serves this client.
    Address string
    The IP address of the DHCP lease to be created.
    AddressLists string
    Address list to which address will be added if lease is bound.
    AgentCircuitId string
    Circuit ID of DHCP relay agent. If each character should be valid ASCII text symbol or else this value is displayed as hex dump.
    AgentRemoteId string
    Remote ID, set by DHCP relay agent.
    AllowDualStackQueue bool
    Creates a single simple queue entry for both IPv4 and IPv6 addresses, uses the MAC address and DUID for identification.
    AlwaysBroadcast bool
    Send all replies as broadcasts.
    BlockAccess bool
    Whether to block access for this DHCP client (true|false).
    Blocked bool
    Whether the lease is blocked.
    ClassId string
    Class ID of the client. This option is available in RouterOS starting from version 7.16.
    ClientId string
    If specified, must match DHCP 'client identifier' option of the request.
    Comment string
    DhcpOption string
    Add additional DHCP options.
    DhcpOptionSet string
    Add additional set of DHCP options.
    Disabled bool
    Dynamic bool
    Whether the dhcp lease is static or dynamic. Dynamic leases are not guaranteed to continue to be assigned to that specific device.
    ExpiresAfter string
    Time until lease expires.
    HostName string
    The hostname of the device
    InsertQueueBefore string
    Specify where to place dynamic simple queue entries for static DCHP leases with rate-limit parameter set.
    IpDhcpServerLeaseId string
    The ID of this resource.
    LastSeen string
    LeaseTime string
    Time that the client may use the address. If set to 0s lease will never expire.
    MacAddress string
    The MAC addreess of the DHCP lease to be created.
    Radius string
    Shows if this dynamic lease is authenticated by RADIUS or not.
    RateLimit string
    Adds a dynamic simple queue to limit IP's bandwidth to a specified rate. Requires the lease to be static.
    Server string
    Server name which serves this client.
    SrcMacAddress string
    Source MAC address.
    Status string
    Lease status.
    UseSrcMac bool
    When this option is set server uses source MAC address instead of received CHADDR to assign address.
    ___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.
    activeAddress String
    The IP address of the machine currently holding the DHCP lease.
    activeClientId String
    Actual client-id of the client.
    activeHostname String
    The hostname of the machine currently holding the DHCP lease.
    activeMacAddress String
    The MAC address of of the machine currently holding the DHCP lease.
    activeServer String
    Actual dhcp server, which serves this client.
    address String
    The IP address of the DHCP lease to be created.
    addressLists String
    Address list to which address will be added if lease is bound.
    agentCircuitId String
    Circuit ID of DHCP relay agent. If each character should be valid ASCII text symbol or else this value is displayed as hex dump.
    agentRemoteId String
    Remote ID, set by DHCP relay agent.
    allowDualStackQueue Boolean
    Creates a single simple queue entry for both IPv4 and IPv6 addresses, uses the MAC address and DUID for identification.
    alwaysBroadcast Boolean
    Send all replies as broadcasts.
    blockAccess Boolean
    Whether to block access for this DHCP client (true|false).
    blocked Boolean
    Whether the lease is blocked.
    classId String
    Class ID of the client. This option is available in RouterOS starting from version 7.16.
    clientId String
    If specified, must match DHCP 'client identifier' option of the request.
    comment String
    dhcpOption String
    Add additional DHCP options.
    dhcpOptionSet String
    Add additional set of DHCP options.
    disabled Boolean
    dynamic Boolean
    Whether the dhcp lease is static or dynamic. Dynamic leases are not guaranteed to continue to be assigned to that specific device.
    expiresAfter String
    Time until lease expires.
    hostName String
    The hostname of the device
    insertQueueBefore String
    Specify where to place dynamic simple queue entries for static DCHP leases with rate-limit parameter set.
    ipDhcpServerLeaseId String
    The ID of this resource.
    lastSeen String
    leaseTime String
    Time that the client may use the address. If set to 0s lease will never expire.
    macAddress String
    The MAC addreess of the DHCP lease to be created.
    radius String
    Shows if this dynamic lease is authenticated by RADIUS or not.
    rateLimit String
    Adds a dynamic simple queue to limit IP's bandwidth to a specified rate. Requires the lease to be static.
    server String
    Server name which serves this client.
    srcMacAddress String
    Source MAC address.
    status String
    Lease status.
    useSrcMac Boolean
    When this option is set server uses source MAC address instead of received CHADDR to assign address.
    ___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.
    activeAddress string
    The IP address of the machine currently holding the DHCP lease.
    activeClientId string
    Actual client-id of the client.
    activeHostname string
    The hostname of the machine currently holding the DHCP lease.
    activeMacAddress string
    The MAC address of of the machine currently holding the DHCP lease.
    activeServer string
    Actual dhcp server, which serves this client.
    address string
    The IP address of the DHCP lease to be created.
    addressLists string
    Address list to which address will be added if lease is bound.
    agentCircuitId string
    Circuit ID of DHCP relay agent. If each character should be valid ASCII text symbol or else this value is displayed as hex dump.
    agentRemoteId string
    Remote ID, set by DHCP relay agent.
    allowDualStackQueue boolean
    Creates a single simple queue entry for both IPv4 and IPv6 addresses, uses the MAC address and DUID for identification.
    alwaysBroadcast boolean
    Send all replies as broadcasts.
    blockAccess boolean
    Whether to block access for this DHCP client (true|false).
    blocked boolean
    Whether the lease is blocked.
    classId string
    Class ID of the client. This option is available in RouterOS starting from version 7.16.
    clientId string
    If specified, must match DHCP 'client identifier' option of the request.
    comment string
    dhcpOption string
    Add additional DHCP options.
    dhcpOptionSet string
    Add additional set of DHCP options.
    disabled boolean
    dynamic boolean
    Whether the dhcp lease is static or dynamic. Dynamic leases are not guaranteed to continue to be assigned to that specific device.
    expiresAfter string
    Time until lease expires.
    hostName string
    The hostname of the device
    insertQueueBefore string
    Specify where to place dynamic simple queue entries for static DCHP leases with rate-limit parameter set.
    ipDhcpServerLeaseId string
    The ID of this resource.
    lastSeen string
    leaseTime string
    Time that the client may use the address. If set to 0s lease will never expire.
    macAddress string
    The MAC addreess of the DHCP lease to be created.
    radius string
    Shows if this dynamic lease is authenticated by RADIUS or not.
    rateLimit string
    Adds a dynamic simple queue to limit IP's bandwidth to a specified rate. Requires the lease to be static.
    server string
    Server name which serves this client.
    srcMacAddress string
    Source MAC address.
    status string
    Lease status.
    useSrcMac boolean
    When this option is set server uses source MAC address instead of received CHADDR to assign address.
    ___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.
    active_address str
    The IP address of the machine currently holding the DHCP lease.
    active_client_id str
    Actual client-id of the client.
    active_hostname str
    The hostname of the machine currently holding the DHCP lease.
    active_mac_address str
    The MAC address of of the machine currently holding the DHCP lease.
    active_server str
    Actual dhcp server, which serves this client.
    address str
    The IP address of the DHCP lease to be created.
    address_lists str
    Address list to which address will be added if lease is bound.
    agent_circuit_id str
    Circuit ID of DHCP relay agent. If each character should be valid ASCII text symbol or else this value is displayed as hex dump.
    agent_remote_id str
    Remote ID, set by DHCP relay agent.
    allow_dual_stack_queue bool
    Creates a single simple queue entry for both IPv4 and IPv6 addresses, uses the MAC address and DUID for identification.
    always_broadcast bool
    Send all replies as broadcasts.
    block_access bool
    Whether to block access for this DHCP client (true|false).
    blocked bool
    Whether the lease is blocked.
    class_id str
    Class ID of the client. This option is available in RouterOS starting from version 7.16.
    client_id str
    If specified, must match DHCP 'client identifier' option of the request.
    comment str
    dhcp_option str
    Add additional DHCP options.
    dhcp_option_set str
    Add additional set of DHCP options.
    disabled bool
    dynamic bool
    Whether the dhcp lease is static or dynamic. Dynamic leases are not guaranteed to continue to be assigned to that specific device.
    expires_after str
    Time until lease expires.
    host_name str
    The hostname of the device
    insert_queue_before str
    Specify where to place dynamic simple queue entries for static DCHP leases with rate-limit parameter set.
    ip_dhcp_server_lease_id str
    The ID of this resource.
    last_seen str
    lease_time str
    Time that the client may use the address. If set to 0s lease will never expire.
    mac_address str
    The MAC addreess of the DHCP lease to be created.
    radius str
    Shows if this dynamic lease is authenticated by RADIUS or not.
    rate_limit str
    Adds a dynamic simple queue to limit IP's bandwidth to a specified rate. Requires the lease to be static.
    server str
    Server name which serves this client.
    src_mac_address str
    Source MAC address.
    status str
    Lease status.
    use_src_mac bool
    When this option is set server uses source MAC address instead of received CHADDR to assign address.
    ___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.
    activeAddress String
    The IP address of the machine currently holding the DHCP lease.
    activeClientId String
    Actual client-id of the client.
    activeHostname String
    The hostname of the machine currently holding the DHCP lease.
    activeMacAddress String
    The MAC address of of the machine currently holding the DHCP lease.
    activeServer String
    Actual dhcp server, which serves this client.
    address String
    The IP address of the DHCP lease to be created.
    addressLists String
    Address list to which address will be added if lease is bound.
    agentCircuitId String
    Circuit ID of DHCP relay agent. If each character should be valid ASCII text symbol or else this value is displayed as hex dump.
    agentRemoteId String
    Remote ID, set by DHCP relay agent.
    allowDualStackQueue Boolean
    Creates a single simple queue entry for both IPv4 and IPv6 addresses, uses the MAC address and DUID for identification.
    alwaysBroadcast Boolean
    Send all replies as broadcasts.
    blockAccess Boolean
    Whether to block access for this DHCP client (true|false).
    blocked Boolean
    Whether the lease is blocked.
    classId String
    Class ID of the client. This option is available in RouterOS starting from version 7.16.
    clientId String
    If specified, must match DHCP 'client identifier' option of the request.
    comment String
    dhcpOption String
    Add additional DHCP options.
    dhcpOptionSet String
    Add additional set of DHCP options.
    disabled Boolean
    dynamic Boolean
    Whether the dhcp lease is static or dynamic. Dynamic leases are not guaranteed to continue to be assigned to that specific device.
    expiresAfter String
    Time until lease expires.
    hostName String
    The hostname of the device
    insertQueueBefore String
    Specify where to place dynamic simple queue entries for static DCHP leases with rate-limit parameter set.
    ipDhcpServerLeaseId String
    The ID of this resource.
    lastSeen String
    leaseTime String
    Time that the client may use the address. If set to 0s lease will never expire.
    macAddress String
    The MAC addreess of the DHCP lease to be created.
    radius String
    Shows if this dynamic lease is authenticated by RADIUS or not.
    rateLimit String
    Adds a dynamic simple queue to limit IP's bandwidth to a specified rate. Requires the lease to be static.
    server String
    Server name which serves this client.
    srcMacAddress String
    Source MAC address.
    status String
    Lease status.
    useSrcMac Boolean
    When this option is set server uses source MAC address instead of received CHADDR to assign address.

    Import

    #The ID can be found via API or the terminal

    #The command for the terminal is -> :put [/ip/dhcp-server/lease get [print show-ids]]

    $ pulumi import routeros:index/ipDhcpServerLease:IpDhcpServerLease dhcp_lease "*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