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

routeros.IpDhcpRelay

Explore with Pulumi AI

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as routeros from "@pulumi/routeros";
    
    const relay = new routeros.IpDhcpRelay("relay", {
        dhcpServer: "0.0.0.1",
        "interface": "ether1",
    });
    
    import pulumi
    import pulumi_routeros as routeros
    
    relay = routeros.IpDhcpRelay("relay",
        dhcp_server="0.0.0.1",
        interface="ether1")
    
    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.NewIpDhcpRelay(ctx, "relay", &routeros.IpDhcpRelayArgs{
    			DhcpServer: pulumi.String("0.0.0.1"),
    			Interface:  pulumi.String("ether1"),
    		})
    		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 relay = new Routeros.IpDhcpRelay("relay", new()
        {
            DhcpServer = "0.0.0.1",
            Interface = "ether1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.routeros.IpDhcpRelay;
    import com.pulumi.routeros.IpDhcpRelayArgs;
    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 relay = new IpDhcpRelay("relay", IpDhcpRelayArgs.builder()
                .dhcpServer("0.0.0.1")
                .interface_("ether1")
                .build());
    
        }
    }
    
    resources:
      relay:
        type: routeros:IpDhcpRelay
        properties:
          dhcpServer: 0.0.0.1
          interface: ether1
    

    Create IpDhcpRelay Resource

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

    Constructor syntax

    new IpDhcpRelay(name: string, args: IpDhcpRelayArgs, opts?: CustomResourceOptions);
    @overload
    def IpDhcpRelay(resource_name: str,
                    args: IpDhcpRelayArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def IpDhcpRelay(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    dhcp_server: Optional[str] = None,
                    interface: Optional[str] = None,
                    ___id_: Optional[float] = None,
                    ___path_: Optional[str] = None,
                    add_relay_info: Optional[bool] = None,
                    delay_threshold: Optional[str] = None,
                    dhcp_server_vrf: Optional[str] = None,
                    disabled: Optional[bool] = None,
                    ip_dhcp_relay_id: Optional[str] = None,
                    local_address: Optional[str] = None,
                    name: Optional[str] = None,
                    relay_info_remote_id: Optional[str] = None)
    func NewIpDhcpRelay(ctx *Context, name string, args IpDhcpRelayArgs, opts ...ResourceOption) (*IpDhcpRelay, error)
    public IpDhcpRelay(string name, IpDhcpRelayArgs args, CustomResourceOptions? opts = null)
    public IpDhcpRelay(String name, IpDhcpRelayArgs args)
    public IpDhcpRelay(String name, IpDhcpRelayArgs args, CustomResourceOptions options)
    
    type: routeros:IpDhcpRelay
    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 IpDhcpRelayArgs
    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 IpDhcpRelayArgs
    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 IpDhcpRelayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpDhcpRelayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpDhcpRelayArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    DhcpServer string
    List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
    Interface string
    Interface name the DHCP relay will be working on.
    AddRelayInfo bool
    Adds DHCP relay agent information if enabled according to RFC 3046. Agent Circuit ID Sub-option contains mac address of an interface, Agent Remote ID Sub-option contains MAC address of the client from which request was received.
    DelayThreshold string
    If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
    DhcpServerVrf string
    The VRF table this resource operates on.
    Disabled bool
    IpDhcpRelayId string
    The ID of this resource.
    LocalAddress string
    The unique IP address of this DHCP relay needed for DHCP server to distinguish relays. If set to 0.0.0.0 - the IP address will be chosen automatically
    Name string
    Descriptive name for the relay.
    RelayInfoRemoteId string
    Specified string will be used to construct Option 82 instead of client's MAC address. Option 82 consist of: interface from which packets was received + client mac address or relay-info-remote-id
    ___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.
    DhcpServer string
    List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
    Interface string
    Interface name the DHCP relay will be working on.
    AddRelayInfo bool
    Adds DHCP relay agent information if enabled according to RFC 3046. Agent Circuit ID Sub-option contains mac address of an interface, Agent Remote ID Sub-option contains MAC address of the client from which request was received.
    DelayThreshold string
    If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
    DhcpServerVrf string
    The VRF table this resource operates on.
    Disabled bool
    IpDhcpRelayId string
    The ID of this resource.
    LocalAddress string
    The unique IP address of this DHCP relay needed for DHCP server to distinguish relays. If set to 0.0.0.0 - the IP address will be chosen automatically
    Name string
    Descriptive name for the relay.
    RelayInfoRemoteId string
    Specified string will be used to construct Option 82 instead of client's MAC address. Option 82 consist of: interface from which packets was received + client mac address or relay-info-remote-id
    ___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.
    dhcpServer String
    List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
    interface_ String
    Interface name the DHCP relay will be working on.
    ___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.
    addRelayInfo Boolean
    Adds DHCP relay agent information if enabled according to RFC 3046. Agent Circuit ID Sub-option contains mac address of an interface, Agent Remote ID Sub-option contains MAC address of the client from which request was received.
    delayThreshold String
    If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
    dhcpServerVrf String
    The VRF table this resource operates on.
    disabled Boolean
    ipDhcpRelayId String
    The ID of this resource.
    localAddress String
    The unique IP address of this DHCP relay needed for DHCP server to distinguish relays. If set to 0.0.0.0 - the IP address will be chosen automatically
    name String
    Descriptive name for the relay.
    relayInfoRemoteId String
    Specified string will be used to construct Option 82 instead of client's MAC address. Option 82 consist of: interface from which packets was received + client mac address or relay-info-remote-id
    dhcpServer string
    List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
    interface string
    Interface name the DHCP relay will be working on.
    ___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.
    addRelayInfo boolean
    Adds DHCP relay agent information if enabled according to RFC 3046. Agent Circuit ID Sub-option contains mac address of an interface, Agent Remote ID Sub-option contains MAC address of the client from which request was received.
    delayThreshold string
    If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
    dhcpServerVrf string
    The VRF table this resource operates on.
    disabled boolean
    ipDhcpRelayId string
    The ID of this resource.
    localAddress string
    The unique IP address of this DHCP relay needed for DHCP server to distinguish relays. If set to 0.0.0.0 - the IP address will be chosen automatically
    name string
    Descriptive name for the relay.
    relayInfoRemoteId string
    Specified string will be used to construct Option 82 instead of client's MAC address. Option 82 consist of: interface from which packets was received + client mac address or relay-info-remote-id
    dhcp_server str
    List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
    interface str
    Interface name the DHCP relay will be working on.
    ___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.
    add_relay_info bool
    Adds DHCP relay agent information if enabled according to RFC 3046. Agent Circuit ID Sub-option contains mac address of an interface, Agent Remote ID Sub-option contains MAC address of the client from which request was received.
    delay_threshold str
    If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
    dhcp_server_vrf str
    The VRF table this resource operates on.
    disabled bool
    ip_dhcp_relay_id str
    The ID of this resource.
    local_address str
    The unique IP address of this DHCP relay needed for DHCP server to distinguish relays. If set to 0.0.0.0 - the IP address will be chosen automatically
    name str
    Descriptive name for the relay.
    relay_info_remote_id str
    Specified string will be used to construct Option 82 instead of client's MAC address. Option 82 consist of: interface from which packets was received + client mac address or relay-info-remote-id
    dhcpServer String
    List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
    interface String
    Interface name the DHCP relay will be working on.
    ___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.
    addRelayInfo Boolean
    Adds DHCP relay agent information if enabled according to RFC 3046. Agent Circuit ID Sub-option contains mac address of an interface, Agent Remote ID Sub-option contains MAC address of the client from which request was received.
    delayThreshold String
    If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
    dhcpServerVrf String
    The VRF table this resource operates on.
    disabled Boolean
    ipDhcpRelayId String
    The ID of this resource.
    localAddress String
    The unique IP address of this DHCP relay needed for DHCP server to distinguish relays. If set to 0.0.0.0 - the IP address will be chosen automatically
    name String
    Descriptive name for the relay.
    relayInfoRemoteId String
    Specified string will be used to construct Option 82 instead of client's MAC address. Option 82 consist of: interface from which packets was received + client mac address or relay-info-remote-id

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Invalid bool
    Id string
    The provider-assigned unique ID for this managed resource.
    Invalid bool
    id String
    The provider-assigned unique ID for this managed resource.
    invalid Boolean
    id string
    The provider-assigned unique ID for this managed resource.
    invalid boolean
    id str
    The provider-assigned unique ID for this managed resource.
    invalid bool
    id String
    The provider-assigned unique ID for this managed resource.
    invalid Boolean

    Look up Existing IpDhcpRelay Resource

    Get an existing IpDhcpRelay 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?: IpDhcpRelayState, opts?: CustomResourceOptions): IpDhcpRelay
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ___id_: Optional[float] = None,
            ___path_: Optional[str] = None,
            add_relay_info: Optional[bool] = None,
            delay_threshold: Optional[str] = None,
            dhcp_server: Optional[str] = None,
            dhcp_server_vrf: Optional[str] = None,
            disabled: Optional[bool] = None,
            interface: Optional[str] = None,
            invalid: Optional[bool] = None,
            ip_dhcp_relay_id: Optional[str] = None,
            local_address: Optional[str] = None,
            name: Optional[str] = None,
            relay_info_remote_id: Optional[str] = None) -> IpDhcpRelay
    func GetIpDhcpRelay(ctx *Context, name string, id IDInput, state *IpDhcpRelayState, opts ...ResourceOption) (*IpDhcpRelay, error)
    public static IpDhcpRelay Get(string name, Input<string> id, IpDhcpRelayState? state, CustomResourceOptions? opts = null)
    public static IpDhcpRelay get(String name, Output<String> id, IpDhcpRelayState state, CustomResourceOptions options)
    resources:  _:    type: routeros:IpDhcpRelay    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:
    AddRelayInfo bool
    Adds DHCP relay agent information if enabled according to RFC 3046. Agent Circuit ID Sub-option contains mac address of an interface, Agent Remote ID Sub-option contains MAC address of the client from which request was received.
    DelayThreshold string
    If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
    DhcpServer string
    List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
    DhcpServerVrf string
    The VRF table this resource operates on.
    Disabled bool
    Interface string
    Interface name the DHCP relay will be working on.
    Invalid bool
    IpDhcpRelayId string
    The ID of this resource.
    LocalAddress string
    The unique IP address of this DHCP relay needed for DHCP server to distinguish relays. If set to 0.0.0.0 - the IP address will be chosen automatically
    Name string
    Descriptive name for the relay.
    RelayInfoRemoteId string
    Specified string will be used to construct Option 82 instead of client's MAC address. Option 82 consist of: interface from which packets was received + client mac address or relay-info-remote-id
    ___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.
    AddRelayInfo bool
    Adds DHCP relay agent information if enabled according to RFC 3046. Agent Circuit ID Sub-option contains mac address of an interface, Agent Remote ID Sub-option contains MAC address of the client from which request was received.
    DelayThreshold string
    If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
    DhcpServer string
    List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
    DhcpServerVrf string
    The VRF table this resource operates on.
    Disabled bool
    Interface string
    Interface name the DHCP relay will be working on.
    Invalid bool
    IpDhcpRelayId string
    The ID of this resource.
    LocalAddress string
    The unique IP address of this DHCP relay needed for DHCP server to distinguish relays. If set to 0.0.0.0 - the IP address will be chosen automatically
    Name string
    Descriptive name for the relay.
    RelayInfoRemoteId string
    Specified string will be used to construct Option 82 instead of client's MAC address. Option 82 consist of: interface from which packets was received + client mac address or relay-info-remote-id
    ___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.
    addRelayInfo Boolean
    Adds DHCP relay agent information if enabled according to RFC 3046. Agent Circuit ID Sub-option contains mac address of an interface, Agent Remote ID Sub-option contains MAC address of the client from which request was received.
    delayThreshold String
    If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
    dhcpServer String
    List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
    dhcpServerVrf String
    The VRF table this resource operates on.
    disabled Boolean
    interface_ String
    Interface name the DHCP relay will be working on.
    invalid Boolean
    ipDhcpRelayId String
    The ID of this resource.
    localAddress String
    The unique IP address of this DHCP relay needed for DHCP server to distinguish relays. If set to 0.0.0.0 - the IP address will be chosen automatically
    name String
    Descriptive name for the relay.
    relayInfoRemoteId String
    Specified string will be used to construct Option 82 instead of client's MAC address. Option 82 consist of: interface from which packets was received + client mac address or relay-info-remote-id
    ___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.
    addRelayInfo boolean
    Adds DHCP relay agent information if enabled according to RFC 3046. Agent Circuit ID Sub-option contains mac address of an interface, Agent Remote ID Sub-option contains MAC address of the client from which request was received.
    delayThreshold string
    If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
    dhcpServer string
    List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
    dhcpServerVrf string
    The VRF table this resource operates on.
    disabled boolean
    interface string
    Interface name the DHCP relay will be working on.
    invalid boolean
    ipDhcpRelayId string
    The ID of this resource.
    localAddress string
    The unique IP address of this DHCP relay needed for DHCP server to distinguish relays. If set to 0.0.0.0 - the IP address will be chosen automatically
    name string
    Descriptive name for the relay.
    relayInfoRemoteId string
    Specified string will be used to construct Option 82 instead of client's MAC address. Option 82 consist of: interface from which packets was received + client mac address or relay-info-remote-id
    ___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.
    add_relay_info bool
    Adds DHCP relay agent information if enabled according to RFC 3046. Agent Circuit ID Sub-option contains mac address of an interface, Agent Remote ID Sub-option contains MAC address of the client from which request was received.
    delay_threshold str
    If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
    dhcp_server str
    List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
    dhcp_server_vrf str
    The VRF table this resource operates on.
    disabled bool
    interface str
    Interface name the DHCP relay will be working on.
    invalid bool
    ip_dhcp_relay_id str
    The ID of this resource.
    local_address str
    The unique IP address of this DHCP relay needed for DHCP server to distinguish relays. If set to 0.0.0.0 - the IP address will be chosen automatically
    name str
    Descriptive name for the relay.
    relay_info_remote_id str
    Specified string will be used to construct Option 82 instead of client's MAC address. Option 82 consist of: interface from which packets was received + client mac address or relay-info-remote-id
    ___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.
    addRelayInfo Boolean
    Adds DHCP relay agent information if enabled according to RFC 3046. Agent Circuit ID Sub-option contains mac address of an interface, Agent Remote ID Sub-option contains MAC address of the client from which request was received.
    delayThreshold String
    If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
    dhcpServer String
    List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
    dhcpServerVrf String
    The VRF table this resource operates on.
    disabled Boolean
    interface String
    Interface name the DHCP relay will be working on.
    invalid Boolean
    ipDhcpRelayId String
    The ID of this resource.
    localAddress String
    The unique IP address of this DHCP relay needed for DHCP server to distinguish relays. If set to 0.0.0.0 - the IP address will be chosen automatically
    name String
    Descriptive name for the relay.
    relayInfoRemoteId String
    Specified string will be used to construct Option 82 instead of client's MAC address. Option 82 consist of: interface from which packets was received + client mac address or relay-info-remote-id

    Import

    #The ID can be found via API or the terminal

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

    $ pulumi import routeros:index/ipDhcpRelay:IpDhcpRelay relay "*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