routeros.IpDhcpServerOption
Explore with Pulumi AI
# routeros.IpDhcpServerOption (Resource)
Creates a DHCP lease on the mikrotik device.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as routeros from "@pulumi/routeros";
const jumboFrameOpt = new routeros.IpDhcpServerOption("jumboFrameOpt", {
code: 77,
value: "0x2336",
});
const tftpOption = new routeros.IpDhcpServerOption("tftpOption", {
code: 66,
value: "s'10.10.10.22'",
});
import pulumi
import pulumi_routeros as routeros
jumbo_frame_opt = routeros.IpDhcpServerOption("jumboFrameOpt",
code=77,
value="0x2336")
tftp_option = routeros.IpDhcpServerOption("tftpOption",
code=66,
value="s'10.10.10.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.NewIpDhcpServerOption(ctx, "jumboFrameOpt", &routeros.IpDhcpServerOptionArgs{
Code: pulumi.Float64(77),
Value: pulumi.String("0x2336"),
})
if err != nil {
return err
}
_, err = routeros.NewIpDhcpServerOption(ctx, "tftpOption", &routeros.IpDhcpServerOptionArgs{
Code: pulumi.Float64(66),
Value: pulumi.String("s'10.10.10.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 jumboFrameOpt = new Routeros.IpDhcpServerOption("jumboFrameOpt", new()
{
Code = 77,
Value = "0x2336",
});
var tftpOption = new Routeros.IpDhcpServerOption("tftpOption", new()
{
Code = 66,
Value = "s'10.10.10.22'",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.routeros.IpDhcpServerOption;
import com.pulumi.routeros.IpDhcpServerOptionArgs;
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 jumboFrameOpt = new IpDhcpServerOption("jumboFrameOpt", IpDhcpServerOptionArgs.builder()
.code(77)
.value("0x2336")
.build());
var tftpOption = new IpDhcpServerOption("tftpOption", IpDhcpServerOptionArgs.builder()
.code(66)
.value("s'10.10.10.22'")
.build());
}
}
resources:
jumboFrameOpt:
type: routeros:IpDhcpServerOption
properties:
code: 77
value: 0x2336
tftpOption:
type: routeros:IpDhcpServerOption
properties:
code: 66
value: s'10.10.10.22'
Create IpDhcpServerOption Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IpDhcpServerOption(name: string, args: IpDhcpServerOptionArgs, opts?: CustomResourceOptions);
@overload
def IpDhcpServerOption(resource_name: str,
args: IpDhcpServerOptionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IpDhcpServerOption(resource_name: str,
opts: Optional[ResourceOptions] = None,
code: Optional[float] = None,
value: Optional[str] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
comment: Optional[str] = None,
force: Optional[bool] = None,
ip_dhcp_server_option_id: Optional[str] = None,
name: Optional[str] = None)
func NewIpDhcpServerOption(ctx *Context, name string, args IpDhcpServerOptionArgs, opts ...ResourceOption) (*IpDhcpServerOption, error)
public IpDhcpServerOption(string name, IpDhcpServerOptionArgs args, CustomResourceOptions? opts = null)
public IpDhcpServerOption(String name, IpDhcpServerOptionArgs args)
public IpDhcpServerOption(String name, IpDhcpServerOptionArgs args, CustomResourceOptions options)
type: routeros:IpDhcpServerOption
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 IpDhcpServerOptionArgs
- 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 IpDhcpServerOptionArgs
- 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 IpDhcpServerOptionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IpDhcpServerOptionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IpDhcpServerOptionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
IpDhcpServerOption 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 IpDhcpServerOption resource accepts the following input properties:
- Code double
- The number of the DHCP option
- Value string
- The value with formatting using Mikrotik settings https://wiki.mikrotik.com/wiki/Manual:IP/DHCPServer#DHCPOptions
- Comment string
- Force bool
- Force the DHCP option from the server-side even if the DHCP-client does not request such parameter.
- Ip
Dhcp stringServer Option Id - The ID of this resource.
- Name string
- The name of the DHCP option
- ___
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.
- Code float64
- The number of the DHCP option
- Value string
- The value with formatting using Mikrotik settings https://wiki.mikrotik.com/wiki/Manual:IP/DHCPServer#DHCPOptions
- Comment string
- Force bool
- Force the DHCP option from the server-side even if the DHCP-client does not request such parameter.
- Ip
Dhcp stringServer Option Id - The ID of this resource.
- Name string
- The name of the DHCP option
- ___
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.
- code Double
- The number of the DHCP option
- value String
- The value with formatting using Mikrotik settings https://wiki.mikrotik.com/wiki/Manual:IP/DHCPServer#DHCPOptions
- ___
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.
- comment String
- force Boolean
- Force the DHCP option from the server-side even if the DHCP-client does not request such parameter.
- ip
Dhcp StringServer Option Id - The ID of this resource.
- name String
- The name of the DHCP option
- code number
- The number of the DHCP option
- value string
- The value with formatting using Mikrotik settings https://wiki.mikrotik.com/wiki/Manual:IP/DHCPServer#DHCPOptions
- ___
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.
- comment string
- force boolean
- Force the DHCP option from the server-side even if the DHCP-client does not request such parameter.
- ip
Dhcp stringServer Option Id - The ID of this resource.
- name string
- The name of the DHCP option
- code float
- The number of the DHCP option
- value str
- The value with formatting using Mikrotik settings https://wiki.mikrotik.com/wiki/Manual:IP/DHCPServer#DHCPOptions
- ___
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.
- comment str
- force bool
- Force the DHCP option from the server-side even if the DHCP-client does not request such parameter.
- ip_
dhcp_ strserver_ option_ id - The ID of this resource.
- name str
- The name of the DHCP option
- code Number
- The number of the DHCP option
- value String
- The value with formatting using Mikrotik settings https://wiki.mikrotik.com/wiki/Manual:IP/DHCPServer#DHCPOptions
- ___
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.
- comment String
- force Boolean
- Force the DHCP option from the server-side even if the DHCP-client does not request such parameter.
- ip
Dhcp StringServer Option Id - The ID of this resource.
- name String
- The name of the DHCP option
Outputs
All input properties are implicitly available as output properties. Additionally, the IpDhcpServerOption resource produces the following output properties:
Look up Existing IpDhcpServerOption Resource
Get an existing IpDhcpServerOption 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?: IpDhcpServerOptionState, opts?: CustomResourceOptions): IpDhcpServerOption
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
___id_: Optional[float] = None,
___path_: Optional[str] = None,
code: Optional[float] = None,
comment: Optional[str] = None,
force: Optional[bool] = None,
ip_dhcp_server_option_id: Optional[str] = None,
name: Optional[str] = None,
raw_value: Optional[str] = None,
value: Optional[str] = None) -> IpDhcpServerOption
func GetIpDhcpServerOption(ctx *Context, name string, id IDInput, state *IpDhcpServerOptionState, opts ...ResourceOption) (*IpDhcpServerOption, error)
public static IpDhcpServerOption Get(string name, Input<string> id, IpDhcpServerOptionState? state, CustomResourceOptions? opts = null)
public static IpDhcpServerOption get(String name, Output<String> id, IpDhcpServerOptionState state, CustomResourceOptions options)
resources: _: type: routeros:IpDhcpServerOption 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.
- Code double
- The number of the DHCP option
- Comment string
- Force bool
- Force the DHCP option from the server-side even if the DHCP-client does not request such parameter.
- Ip
Dhcp stringServer Option Id - The ID of this resource.
- Name string
- The name of the DHCP option
- Raw
Value string - The computed value of the option as an hex value
- Value string
- The value with formatting using Mikrotik settings https://wiki.mikrotik.com/wiki/Manual:IP/DHCPServer#DHCPOptions
- ___
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.
- Code float64
- The number of the DHCP option
- Comment string
- Force bool
- Force the DHCP option from the server-side even if the DHCP-client does not request such parameter.
- Ip
Dhcp stringServer Option Id - The ID of this resource.
- Name string
- The name of the DHCP option
- Raw
Value string - The computed value of the option as an hex value
- Value string
- The value with formatting using Mikrotik settings https://wiki.mikrotik.com/wiki/Manual:IP/DHCPServer#DHCPOptions
- ___
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.
- code Double
- The number of the DHCP option
- comment String
- force Boolean
- Force the DHCP option from the server-side even if the DHCP-client does not request such parameter.
- ip
Dhcp StringServer Option Id - The ID of this resource.
- name String
- The name of the DHCP option
- raw
Value String - The computed value of the option as an hex value
- value String
- The value with formatting using Mikrotik settings https://wiki.mikrotik.com/wiki/Manual:IP/DHCPServer#DHCPOptions
- ___
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.
- code number
- The number of the DHCP option
- comment string
- force boolean
- Force the DHCP option from the server-side even if the DHCP-client does not request such parameter.
- ip
Dhcp stringServer Option Id - The ID of this resource.
- name string
- The name of the DHCP option
- raw
Value string - The computed value of the option as an hex value
- value string
- The value with formatting using Mikrotik settings https://wiki.mikrotik.com/wiki/Manual:IP/DHCPServer#DHCPOptions
- ___
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.
- code float
- The number of the DHCP option
- comment str
- force bool
- Force the DHCP option from the server-side even if the DHCP-client does not request such parameter.
- ip_
dhcp_ strserver_ option_ id - The ID of this resource.
- name str
- The name of the DHCP option
- raw_
value str - The computed value of the option as an hex value
- value str
- The value with formatting using Mikrotik settings https://wiki.mikrotik.com/wiki/Manual:IP/DHCPServer#DHCPOptions
- ___
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.
- code Number
- The number of the DHCP option
- comment String
- force Boolean
- Force the DHCP option from the server-side even if the DHCP-client does not request such parameter.
- ip
Dhcp StringServer Option Id - The ID of this resource.
- name String
- The name of the DHCP option
- raw
Value String - The computed value of the option as an hex value
- value String
- The value with formatting using Mikrotik settings https://wiki.mikrotik.com/wiki/Manual:IP/DHCPServer#DHCPOptions
Import
#The ID can be found via API or the terminal
#The command for the terminal is -> :put [/ip/dhcp-server/option/get [print show-ids]]
$ pulumi import routeros:index/ipDhcpServerOption:IpDhcpServerOption tftp_option "*1"
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.