1. Packages
  2. Openwrt Provider
  3. API Docs
  4. DhcpDnsmasq
openwrt 0.0.20 published on Friday, Mar 7, 2025 by joneshf

openwrt.DhcpDnsmasq

Explore with Pulumi AI

A lightweight DHCP and caching DNS server.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as openwrt from "@pulumi/openwrt";

const _this = new openwrt.DhcpDnsmasq("this", {
    domain: "testing",
    expandhosts: true,
    dhcpDnsmasqId: "testing",
    local: "/testing/",
    rebindLocalhost: true,
    rebindProtection: true,
});
Copy
import pulumi
import pulumi_openwrt as openwrt

this = openwrt.DhcpDnsmasq("this",
    domain="testing",
    expandhosts=True,
    dhcp_dnsmasq_id="testing",
    local="/testing/",
    rebind_localhost=True,
    rebind_protection=True)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/openwrt/openwrt"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := openwrt.NewDhcpDnsmasq(ctx, "this", &openwrt.DhcpDnsmasqArgs{
			Domain:           pulumi.String("testing"),
			Expandhosts:      pulumi.Bool(true),
			DhcpDnsmasqId:    pulumi.String("testing"),
			Local:            pulumi.String("/testing/"),
			RebindLocalhost:  pulumi.Bool(true),
			RebindProtection: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Openwrt = Pulumi.Openwrt;

return await Deployment.RunAsync(() => 
{
    var @this = new Openwrt.DhcpDnsmasq("this", new()
    {
        Domain = "testing",
        Expandhosts = true,
        DhcpDnsmasqId = "testing",
        Local = "/testing/",
        RebindLocalhost = true,
        RebindProtection = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openwrt.DhcpDnsmasq;
import com.pulumi.openwrt.DhcpDnsmasqArgs;
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 this_ = new DhcpDnsmasq("this", DhcpDnsmasqArgs.builder()
            .domain("testing")
            .expandhosts(true)
            .dhcpDnsmasqId("testing")
            .local("/testing/")
            .rebindLocalhost(true)
            .rebindProtection(true)
            .build());

    }
}
Copy
resources:
  this:
    type: openwrt:DhcpDnsmasq
    properties:
      domain: testing
      expandhosts: true
      dhcpDnsmasqId: testing
      local: /testing/
      rebindLocalhost: true
      rebindProtection: true
Copy

Create DhcpDnsmasq Resource

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

Constructor syntax

new DhcpDnsmasq(name: string, args: DhcpDnsmasqArgs, opts?: CustomResourceOptions);
@overload
def DhcpDnsmasq(resource_name: str,
                args: DhcpDnsmasqArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def DhcpDnsmasq(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                dhcp_dnsmasq_id: Optional[str] = None,
                leasefile: Optional[str] = None,
                domain: Optional[str] = None,
                domainneeded: Optional[bool] = None,
                ednspacket_max: Optional[float] = None,
                expandhosts: Optional[bool] = None,
                authoritative: Optional[bool] = None,
                local: Optional[str] = None,
                localise_queries: Optional[bool] = None,
                localservice: Optional[bool] = None,
                readethers: Optional[bool] = None,
                rebind_localhost: Optional[bool] = None,
                rebind_protection: Optional[bool] = None,
                resolvfile: Optional[str] = None)
func NewDhcpDnsmasq(ctx *Context, name string, args DhcpDnsmasqArgs, opts ...ResourceOption) (*DhcpDnsmasq, error)
public DhcpDnsmasq(string name, DhcpDnsmasqArgs args, CustomResourceOptions? opts = null)
public DhcpDnsmasq(String name, DhcpDnsmasqArgs args)
public DhcpDnsmasq(String name, DhcpDnsmasqArgs args, CustomResourceOptions options)
type: openwrt:DhcpDnsmasq
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DhcpDnsmasqArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DhcpDnsmasqArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DhcpDnsmasqArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DhcpDnsmasqArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DhcpDnsmasqArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var dhcpDnsmasqResource = new Openwrt.DhcpDnsmasq("dhcpDnsmasqResource", new()
{
    DhcpDnsmasqId = "string",
    Leasefile = "string",
    Domain = "string",
    Domainneeded = false,
    EdnspacketMax = 0,
    Expandhosts = false,
    Authoritative = false,
    Local = "string",
    LocaliseQueries = false,
    Localservice = false,
    Readethers = false,
    RebindLocalhost = false,
    RebindProtection = false,
    Resolvfile = "string",
});
Copy
example, err := openwrt.NewDhcpDnsmasq(ctx, "dhcpDnsmasqResource", &openwrt.DhcpDnsmasqArgs{
	DhcpDnsmasqId:    pulumi.String("string"),
	Leasefile:        pulumi.String("string"),
	Domain:           pulumi.String("string"),
	Domainneeded:     pulumi.Bool(false),
	EdnspacketMax:    pulumi.Float64(0),
	Expandhosts:      pulumi.Bool(false),
	Authoritative:    pulumi.Bool(false),
	Local:            pulumi.String("string"),
	LocaliseQueries:  pulumi.Bool(false),
	Localservice:     pulumi.Bool(false),
	Readethers:       pulumi.Bool(false),
	RebindLocalhost:  pulumi.Bool(false),
	RebindProtection: pulumi.Bool(false),
	Resolvfile:       pulumi.String("string"),
})
Copy
var dhcpDnsmasqResource = new DhcpDnsmasq("dhcpDnsmasqResource", DhcpDnsmasqArgs.builder()
    .dhcpDnsmasqId("string")
    .leasefile("string")
    .domain("string")
    .domainneeded(false)
    .ednspacketMax(0)
    .expandhosts(false)
    .authoritative(false)
    .local("string")
    .localiseQueries(false)
    .localservice(false)
    .readethers(false)
    .rebindLocalhost(false)
    .rebindProtection(false)
    .resolvfile("string")
    .build());
Copy
dhcp_dnsmasq_resource = openwrt.DhcpDnsmasq("dhcpDnsmasqResource",
    dhcp_dnsmasq_id="string",
    leasefile="string",
    domain="string",
    domainneeded=False,
    ednspacket_max=0,
    expandhosts=False,
    authoritative=False,
    local="string",
    localise_queries=False,
    localservice=False,
    readethers=False,
    rebind_localhost=False,
    rebind_protection=False,
    resolvfile="string")
Copy
const dhcpDnsmasqResource = new openwrt.DhcpDnsmasq("dhcpDnsmasqResource", {
    dhcpDnsmasqId: "string",
    leasefile: "string",
    domain: "string",
    domainneeded: false,
    ednspacketMax: 0,
    expandhosts: false,
    authoritative: false,
    local: "string",
    localiseQueries: false,
    localservice: false,
    readethers: false,
    rebindLocalhost: false,
    rebindProtection: false,
    resolvfile: "string",
});
Copy
type: openwrt:DhcpDnsmasq
properties:
    authoritative: false
    dhcpDnsmasqId: string
    domain: string
    domainneeded: false
    ednspacketMax: 0
    expandhosts: false
    leasefile: string
    local: string
    localiseQueries: false
    localservice: false
    readethers: false
    rebindLocalhost: false
    rebindProtection: false
    resolvfile: string
Copy

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

DhcpDnsmasqId This property is required. string
Name of the section. This name is only used when interacting with UCI directly.
Authoritative bool
Force dnsmasq into authoritative mode. This speeds up DHCP leasing. Used if this is the only server on the network.
Domain string
DNS domain handed out to DHCP clients.
Domainneeded bool
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
EdnspacketMax double
Specify the largest EDNS.0 UDP packet which is supported by the DNS forwarder.
Expandhosts bool
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
Leasefile string
Store DHCP leases in this file.
Local string
Look up DNS entries for this domain from /etc/hosts.
LocaliseQueries bool
Choose IP address to match the incoming interface if multiple addresses are assigned to a host name in /etc/hosts.
Localservice bool
Accept DNS queries only from hosts whose address is on a local subnet.
Readethers bool
Read static lease entries from /etc/ethers, re-read on SIGHUP.
RebindLocalhost bool
Allows upstream 127.0.0.0/8 responses, required for DNS based blocklist services. Only takes effect if rebind protection is enabled.
RebindProtection bool
Enables DNS rebind attack protection by discarding upstream RFC1918 responses.
Resolvfile string
Specifies an alternative resolv file.
DhcpDnsmasqId This property is required. string
Name of the section. This name is only used when interacting with UCI directly.
Authoritative bool
Force dnsmasq into authoritative mode. This speeds up DHCP leasing. Used if this is the only server on the network.
Domain string
DNS domain handed out to DHCP clients.
Domainneeded bool
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
EdnspacketMax float64
Specify the largest EDNS.0 UDP packet which is supported by the DNS forwarder.
Expandhosts bool
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
Leasefile string
Store DHCP leases in this file.
Local string
Look up DNS entries for this domain from /etc/hosts.
LocaliseQueries bool
Choose IP address to match the incoming interface if multiple addresses are assigned to a host name in /etc/hosts.
Localservice bool
Accept DNS queries only from hosts whose address is on a local subnet.
Readethers bool
Read static lease entries from /etc/ethers, re-read on SIGHUP.
RebindLocalhost bool
Allows upstream 127.0.0.0/8 responses, required for DNS based blocklist services. Only takes effect if rebind protection is enabled.
RebindProtection bool
Enables DNS rebind attack protection by discarding upstream RFC1918 responses.
Resolvfile string
Specifies an alternative resolv file.
dhcpDnsmasqId This property is required. String
Name of the section. This name is only used when interacting with UCI directly.
authoritative Boolean
Force dnsmasq into authoritative mode. This speeds up DHCP leasing. Used if this is the only server on the network.
domain String
DNS domain handed out to DHCP clients.
domainneeded Boolean
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
ednspacketMax Double
Specify the largest EDNS.0 UDP packet which is supported by the DNS forwarder.
expandhosts Boolean
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
leasefile String
Store DHCP leases in this file.
local String
Look up DNS entries for this domain from /etc/hosts.
localiseQueries Boolean
Choose IP address to match the incoming interface if multiple addresses are assigned to a host name in /etc/hosts.
localservice Boolean
Accept DNS queries only from hosts whose address is on a local subnet.
readethers Boolean
Read static lease entries from /etc/ethers, re-read on SIGHUP.
rebindLocalhost Boolean
Allows upstream 127.0.0.0/8 responses, required for DNS based blocklist services. Only takes effect if rebind protection is enabled.
rebindProtection Boolean
Enables DNS rebind attack protection by discarding upstream RFC1918 responses.
resolvfile String
Specifies an alternative resolv file.
dhcpDnsmasqId This property is required. string
Name of the section. This name is only used when interacting with UCI directly.
authoritative boolean
Force dnsmasq into authoritative mode. This speeds up DHCP leasing. Used if this is the only server on the network.
domain string
DNS domain handed out to DHCP clients.
domainneeded boolean
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
ednspacketMax number
Specify the largest EDNS.0 UDP packet which is supported by the DNS forwarder.
expandhosts boolean
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
leasefile string
Store DHCP leases in this file.
local string
Look up DNS entries for this domain from /etc/hosts.
localiseQueries boolean
Choose IP address to match the incoming interface if multiple addresses are assigned to a host name in /etc/hosts.
localservice boolean
Accept DNS queries only from hosts whose address is on a local subnet.
readethers boolean
Read static lease entries from /etc/ethers, re-read on SIGHUP.
rebindLocalhost boolean
Allows upstream 127.0.0.0/8 responses, required for DNS based blocklist services. Only takes effect if rebind protection is enabled.
rebindProtection boolean
Enables DNS rebind attack protection by discarding upstream RFC1918 responses.
resolvfile string
Specifies an alternative resolv file.
dhcp_dnsmasq_id This property is required. str
Name of the section. This name is only used when interacting with UCI directly.
authoritative bool
Force dnsmasq into authoritative mode. This speeds up DHCP leasing. Used if this is the only server on the network.
domain str
DNS domain handed out to DHCP clients.
domainneeded bool
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
ednspacket_max float
Specify the largest EDNS.0 UDP packet which is supported by the DNS forwarder.
expandhosts bool
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
leasefile str
Store DHCP leases in this file.
local str
Look up DNS entries for this domain from /etc/hosts.
localise_queries bool
Choose IP address to match the incoming interface if multiple addresses are assigned to a host name in /etc/hosts.
localservice bool
Accept DNS queries only from hosts whose address is on a local subnet.
readethers bool
Read static lease entries from /etc/ethers, re-read on SIGHUP.
rebind_localhost bool
Allows upstream 127.0.0.0/8 responses, required for DNS based blocklist services. Only takes effect if rebind protection is enabled.
rebind_protection bool
Enables DNS rebind attack protection by discarding upstream RFC1918 responses.
resolvfile str
Specifies an alternative resolv file.
dhcpDnsmasqId This property is required. String
Name of the section. This name is only used when interacting with UCI directly.
authoritative Boolean
Force dnsmasq into authoritative mode. This speeds up DHCP leasing. Used if this is the only server on the network.
domain String
DNS domain handed out to DHCP clients.
domainneeded Boolean
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
ednspacketMax Number
Specify the largest EDNS.0 UDP packet which is supported by the DNS forwarder.
expandhosts Boolean
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
leasefile String
Store DHCP leases in this file.
local String
Look up DNS entries for this domain from /etc/hosts.
localiseQueries Boolean
Choose IP address to match the incoming interface if multiple addresses are assigned to a host name in /etc/hosts.
localservice Boolean
Accept DNS queries only from hosts whose address is on a local subnet.
readethers Boolean
Read static lease entries from /etc/ethers, re-read on SIGHUP.
rebindLocalhost Boolean
Allows upstream 127.0.0.0/8 responses, required for DNS based blocklist services. Only takes effect if rebind protection is enabled.
rebindProtection Boolean
Enables DNS rebind attack protection by discarding upstream RFC1918 responses.
resolvfile String
Specifies an alternative resolv file.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing DhcpDnsmasq Resource

Get an existing DhcpDnsmasq 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?: DhcpDnsmasqState, opts?: CustomResourceOptions): DhcpDnsmasq
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        authoritative: Optional[bool] = None,
        dhcp_dnsmasq_id: Optional[str] = None,
        domain: Optional[str] = None,
        domainneeded: Optional[bool] = None,
        ednspacket_max: Optional[float] = None,
        expandhosts: Optional[bool] = None,
        leasefile: Optional[str] = None,
        local: Optional[str] = None,
        localise_queries: Optional[bool] = None,
        localservice: Optional[bool] = None,
        readethers: Optional[bool] = None,
        rebind_localhost: Optional[bool] = None,
        rebind_protection: Optional[bool] = None,
        resolvfile: Optional[str] = None) -> DhcpDnsmasq
func GetDhcpDnsmasq(ctx *Context, name string, id IDInput, state *DhcpDnsmasqState, opts ...ResourceOption) (*DhcpDnsmasq, error)
public static DhcpDnsmasq Get(string name, Input<string> id, DhcpDnsmasqState? state, CustomResourceOptions? opts = null)
public static DhcpDnsmasq get(String name, Output<String> id, DhcpDnsmasqState state, CustomResourceOptions options)
resources:  _:    type: openwrt:DhcpDnsmasq    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Authoritative bool
Force dnsmasq into authoritative mode. This speeds up DHCP leasing. Used if this is the only server on the network.
DhcpDnsmasqId string
Name of the section. This name is only used when interacting with UCI directly.
Domain string
DNS domain handed out to DHCP clients.
Domainneeded bool
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
EdnspacketMax double
Specify the largest EDNS.0 UDP packet which is supported by the DNS forwarder.
Expandhosts bool
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
Leasefile string
Store DHCP leases in this file.
Local string
Look up DNS entries for this domain from /etc/hosts.
LocaliseQueries bool
Choose IP address to match the incoming interface if multiple addresses are assigned to a host name in /etc/hosts.
Localservice bool
Accept DNS queries only from hosts whose address is on a local subnet.
Readethers bool
Read static lease entries from /etc/ethers, re-read on SIGHUP.
RebindLocalhost bool
Allows upstream 127.0.0.0/8 responses, required for DNS based blocklist services. Only takes effect if rebind protection is enabled.
RebindProtection bool
Enables DNS rebind attack protection by discarding upstream RFC1918 responses.
Resolvfile string
Specifies an alternative resolv file.
Authoritative bool
Force dnsmasq into authoritative mode. This speeds up DHCP leasing. Used if this is the only server on the network.
DhcpDnsmasqId string
Name of the section. This name is only used when interacting with UCI directly.
Domain string
DNS domain handed out to DHCP clients.
Domainneeded bool
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
EdnspacketMax float64
Specify the largest EDNS.0 UDP packet which is supported by the DNS forwarder.
Expandhosts bool
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
Leasefile string
Store DHCP leases in this file.
Local string
Look up DNS entries for this domain from /etc/hosts.
LocaliseQueries bool
Choose IP address to match the incoming interface if multiple addresses are assigned to a host name in /etc/hosts.
Localservice bool
Accept DNS queries only from hosts whose address is on a local subnet.
Readethers bool
Read static lease entries from /etc/ethers, re-read on SIGHUP.
RebindLocalhost bool
Allows upstream 127.0.0.0/8 responses, required for DNS based blocklist services. Only takes effect if rebind protection is enabled.
RebindProtection bool
Enables DNS rebind attack protection by discarding upstream RFC1918 responses.
Resolvfile string
Specifies an alternative resolv file.
authoritative Boolean
Force dnsmasq into authoritative mode. This speeds up DHCP leasing. Used if this is the only server on the network.
dhcpDnsmasqId String
Name of the section. This name is only used when interacting with UCI directly.
domain String
DNS domain handed out to DHCP clients.
domainneeded Boolean
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
ednspacketMax Double
Specify the largest EDNS.0 UDP packet which is supported by the DNS forwarder.
expandhosts Boolean
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
leasefile String
Store DHCP leases in this file.
local String
Look up DNS entries for this domain from /etc/hosts.
localiseQueries Boolean
Choose IP address to match the incoming interface if multiple addresses are assigned to a host name in /etc/hosts.
localservice Boolean
Accept DNS queries only from hosts whose address is on a local subnet.
readethers Boolean
Read static lease entries from /etc/ethers, re-read on SIGHUP.
rebindLocalhost Boolean
Allows upstream 127.0.0.0/8 responses, required for DNS based blocklist services. Only takes effect if rebind protection is enabled.
rebindProtection Boolean
Enables DNS rebind attack protection by discarding upstream RFC1918 responses.
resolvfile String
Specifies an alternative resolv file.
authoritative boolean
Force dnsmasq into authoritative mode. This speeds up DHCP leasing. Used if this is the only server on the network.
dhcpDnsmasqId string
Name of the section. This name is only used when interacting with UCI directly.
domain string
DNS domain handed out to DHCP clients.
domainneeded boolean
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
ednspacketMax number
Specify the largest EDNS.0 UDP packet which is supported by the DNS forwarder.
expandhosts boolean
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
leasefile string
Store DHCP leases in this file.
local string
Look up DNS entries for this domain from /etc/hosts.
localiseQueries boolean
Choose IP address to match the incoming interface if multiple addresses are assigned to a host name in /etc/hosts.
localservice boolean
Accept DNS queries only from hosts whose address is on a local subnet.
readethers boolean
Read static lease entries from /etc/ethers, re-read on SIGHUP.
rebindLocalhost boolean
Allows upstream 127.0.0.0/8 responses, required for DNS based blocklist services. Only takes effect if rebind protection is enabled.
rebindProtection boolean
Enables DNS rebind attack protection by discarding upstream RFC1918 responses.
resolvfile string
Specifies an alternative resolv file.
authoritative bool
Force dnsmasq into authoritative mode. This speeds up DHCP leasing. Used if this is the only server on the network.
dhcp_dnsmasq_id str
Name of the section. This name is only used when interacting with UCI directly.
domain str
DNS domain handed out to DHCP clients.
domainneeded bool
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
ednspacket_max float
Specify the largest EDNS.0 UDP packet which is supported by the DNS forwarder.
expandhosts bool
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
leasefile str
Store DHCP leases in this file.
local str
Look up DNS entries for this domain from /etc/hosts.
localise_queries bool
Choose IP address to match the incoming interface if multiple addresses are assigned to a host name in /etc/hosts.
localservice bool
Accept DNS queries only from hosts whose address is on a local subnet.
readethers bool
Read static lease entries from /etc/ethers, re-read on SIGHUP.
rebind_localhost bool
Allows upstream 127.0.0.0/8 responses, required for DNS based blocklist services. Only takes effect if rebind protection is enabled.
rebind_protection bool
Enables DNS rebind attack protection by discarding upstream RFC1918 responses.
resolvfile str
Specifies an alternative resolv file.
authoritative Boolean
Force dnsmasq into authoritative mode. This speeds up DHCP leasing. Used if this is the only server on the network.
dhcpDnsmasqId String
Name of the section. This name is only used when interacting with UCI directly.
domain String
DNS domain handed out to DHCP clients.
domainneeded Boolean
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
ednspacketMax Number
Specify the largest EDNS.0 UDP packet which is supported by the DNS forwarder.
expandhosts Boolean
Never forward queries for plain names, without dots or domain parts, to upstream nameservers.
leasefile String
Store DHCP leases in this file.
local String
Look up DNS entries for this domain from /etc/hosts.
localiseQueries Boolean
Choose IP address to match the incoming interface if multiple addresses are assigned to a host name in /etc/hosts.
localservice Boolean
Accept DNS queries only from hosts whose address is on a local subnet.
readethers Boolean
Read static lease entries from /etc/ethers, re-read on SIGHUP.
rebindLocalhost Boolean
Allows upstream 127.0.0.0/8 responses, required for DNS based blocklist services. Only takes effect if rebind protection is enabled.
rebindProtection Boolean
Enables DNS rebind attack protection by discarding upstream RFC1918 responses.
resolvfile String
Specifies an alternative resolv file.

Import

Find the Terraform id from LuCI’s JSON-RPC API.

One way to find this information is with curl and jq:

curl \

--data '{"id": 0, "method": "foreach", "params": ["dhcp", "dnsmasq"]}' \

http://192.168.1.1/cgi-bin/luci/rpc/uci?auth=$AUTH_TOKEN \

| jq '.result | map({terraformId: .[".name"]})'

This command will output something like:

[

{

"terraformId": "cfg123456",

}

]

We’d then use the information to import the appropriate resource:

$ pulumi import openwrt:index/dhcpDnsmasq:DhcpDnsmasq this cfg123456
Copy

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

Package Details

Repository
openwrt joneshf/terraform-provider-openwrt
License
Notes
This Pulumi package is based on the openwrt Terraform Provider.