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

openwrt.getDhcpDnsmasq

Explore with Pulumi AI

openwrt 0.0.20 published on Friday, Mar 7, 2025 by joneshf

A lightweight DHCP and caching DNS server.

Example Usage

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

const testing = openwrt.getDhcpDnsmasq({
    id: "testing",
});
Copy
import pulumi
import pulumi_openwrt as openwrt

testing = openwrt.get_dhcp_dnsmasq(id="testing")
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.LookupDhcpDnsmasq(ctx, &openwrt.LookupDhcpDnsmasqArgs{
			Id: "testing",
		}, nil)
		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 testing = Openwrt.GetDhcpDnsmasq.Invoke(new()
    {
        Id = "testing",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openwrt.OpenwrtFunctions;
import com.pulumi.openwrt.inputs.GetDhcpDnsmasqArgs;
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) {
        final var testing = OpenwrtFunctions.getDhcpDnsmasq(GetDhcpDnsmasqArgs.builder()
            .id("testing")
            .build());

    }
}
Copy
variables:
  testing:
    fn::invoke:
      function: openwrt:getDhcpDnsmasq
      arguments:
        id: testing
Copy

Using getDhcpDnsmasq

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getDhcpDnsmasq(args: GetDhcpDnsmasqArgs, opts?: InvokeOptions): Promise<GetDhcpDnsmasqResult>
function getDhcpDnsmasqOutput(args: GetDhcpDnsmasqOutputArgs, opts?: InvokeOptions): Output<GetDhcpDnsmasqResult>
Copy
def get_dhcp_dnsmasq(id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetDhcpDnsmasqResult
def get_dhcp_dnsmasq_output(id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetDhcpDnsmasqResult]
Copy
func LookupDhcpDnsmasq(ctx *Context, args *LookupDhcpDnsmasqArgs, opts ...InvokeOption) (*LookupDhcpDnsmasqResult, error)
func LookupDhcpDnsmasqOutput(ctx *Context, args *LookupDhcpDnsmasqOutputArgs, opts ...InvokeOption) LookupDhcpDnsmasqResultOutput
Copy

> Note: This function is named LookupDhcpDnsmasq in the Go SDK.

public static class GetDhcpDnsmasq 
{
    public static Task<GetDhcpDnsmasqResult> InvokeAsync(GetDhcpDnsmasqArgs args, InvokeOptions? opts = null)
    public static Output<GetDhcpDnsmasqResult> Invoke(GetDhcpDnsmasqInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDhcpDnsmasqResult> getDhcpDnsmasq(GetDhcpDnsmasqArgs args, InvokeOptions options)
public static Output<GetDhcpDnsmasqResult> getDhcpDnsmasq(GetDhcpDnsmasqArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: openwrt:index/getDhcpDnsmasq:getDhcpDnsmasq
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id This property is required. string
Name of the section. This name is only used when interacting with UCI directly.
Id This property is required. string
Name of the section. This name is only used when interacting with UCI directly.
id This property is required. String
Name of the section. This name is only used when interacting with UCI directly.
id This property is required. string
Name of the section. This name is only used when interacting with UCI directly.
id This property is required. str
Name of the section. This name is only used when interacting with UCI directly.
id This property is required. String
Name of the section. This name is only used when interacting with UCI directly.

getDhcpDnsmasq Result

The following output properties are available:

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.
Id string
Name of the section. This name is only used when interacting with UCI directly.
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.
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.
Id string
Name of the section. This name is only used when interacting with UCI directly.
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.
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.
id String
Name of the section. This name is only used when interacting with UCI directly.
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.
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.
id string
Name of the section. This name is only used when interacting with UCI directly.
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.
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.
id str
Name of the section. This name is only used when interacting with UCI directly.
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.
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.
id String
Name of the section. This name is only used when interacting with UCI directly.
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.

Package Details

Repository
openwrt joneshf/terraform-provider-openwrt
License
Notes
This Pulumi package is based on the openwrt Terraform Provider.
openwrt 0.0.20 published on Friday, Mar 7, 2025 by joneshf