routeros.IpDhcpRelay
Explore with Pulumi AI
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:
- Dhcp
Server 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.
- Add
Relay boolInfo - 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 string - If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
- Dhcp
Server stringVrf - The VRF table this resource operates on.
- Disabled bool
- Ip
Dhcp stringRelay Id - The ID of this resource.
- Local
Address 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.
- Relay
Info stringRemote Id - 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.
- Dhcp
Server 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.
- Add
Relay boolInfo - 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 string - If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
- Dhcp
Server stringVrf - The VRF table this resource operates on.
- Disabled bool
- Ip
Dhcp stringRelay Id - The ID of this resource.
- Local
Address 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.
- Relay
Info stringRemote Id - 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.
- dhcp
Server 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.
- add
Relay BooleanInfo - 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 String - If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
- dhcp
Server StringVrf - The VRF table this resource operates on.
- disabled Boolean
- ip
Dhcp StringRelay Id - The ID of this resource.
- local
Address 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.
- relay
Info StringRemote Id - 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 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.
- add
Relay booleanInfo - 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 string - If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
- dhcp
Server stringVrf - The VRF table this resource operates on.
- disabled boolean
- ip
Dhcp stringRelay Id - The ID of this resource.
- local
Address 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.
- relay
Info stringRemote Id - 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_ boolinfo - 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_ strvrf - The VRF table this resource operates on.
- disabled bool
- ip_
dhcp_ strrelay_ id - 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_ strremote_ id - 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 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.
- add
Relay BooleanInfo - 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 String - If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
- dhcp
Server StringVrf - The VRF table this resource operates on.
- disabled Boolean
- ip
Dhcp StringRelay Id - The ID of this resource.
- local
Address 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.
- relay
Info StringRemote Id - 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:
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.
- Add
Relay boolInfo - 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 string - If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
- Dhcp
Server string - List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
- Dhcp
Server stringVrf - The VRF table this resource operates on.
- Disabled bool
- Interface string
- Interface name the DHCP relay will be working on.
- Invalid bool
- Ip
Dhcp stringRelay Id - The ID of this resource.
- Local
Address 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.
- Relay
Info stringRemote Id - 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.
- Add
Relay boolInfo - 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 string - If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
- Dhcp
Server string - List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
- Dhcp
Server stringVrf - The VRF table this resource operates on.
- Disabled bool
- Interface string
- Interface name the DHCP relay will be working on.
- Invalid bool
- Ip
Dhcp stringRelay Id - The ID of this resource.
- Local
Address 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.
- Relay
Info stringRemote Id - 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.
- add
Relay BooleanInfo - 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 String - If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
- dhcp
Server String - List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
- dhcp
Server StringVrf - The VRF table this resource operates on.
- disabled Boolean
- interface_ String
- Interface name the DHCP relay will be working on.
- invalid Boolean
- ip
Dhcp StringRelay Id - The ID of this resource.
- local
Address 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.
- relay
Info StringRemote Id - 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.
- add
Relay booleanInfo - 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 string - If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
- dhcp
Server string - List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
- dhcp
Server stringVrf - The VRF table this resource operates on.
- disabled boolean
- interface string
- Interface name the DHCP relay will be working on.
- invalid boolean
- ip
Dhcp stringRelay Id - The ID of this resource.
- local
Address 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.
- relay
Info stringRemote Id - 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_ boolinfo - 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_ strvrf - The VRF table this resource operates on.
- disabled bool
- interface str
- Interface name the DHCP relay will be working on.
- invalid bool
- ip_
dhcp_ strrelay_ id - 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_ strremote_ id - 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.
- add
Relay BooleanInfo - 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 String - If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored.
- dhcp
Server String - List of DHCP servers' IP addresses which should the DHCP requests be forwarded to.
- dhcp
Server StringVrf - The VRF table this resource operates on.
- disabled Boolean
- interface String
- Interface name the DHCP relay will be working on.
- invalid Boolean
- ip
Dhcp StringRelay Id - The ID of this resource.
- local
Address 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.
- relay
Info StringRemote Id - 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.