1. Packages
  2. Panos Provider
  3. API Docs
  4. Dhcp
panos 2.0.4 published on Friday, Jul 25, 2025 by paloaltonetworks

panos.Dhcp

Explore with Pulumi AI

panos logo
panos 2.0.4 published on Friday, Jul 25, 2025 by paloaltonetworks

    Example Usage

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.panos.Template;
    import com.pulumi.panos.TemplateArgs;
    import com.pulumi.panos.inputs.TemplateLocationArgs;
    import com.pulumi.panos.inputs.TemplateLocationPanoramaArgs;
    import com.pulumi.panos.EthernetInterface;
    import com.pulumi.panos.EthernetInterfaceArgs;
    import com.pulumi.panos.inputs.EthernetInterfaceLocationArgs;
    import com.pulumi.panos.inputs.EthernetInterfaceLocationTemplateArgs;
    import com.pulumi.panos.inputs.EthernetInterfaceLayer3Args;
    import com.pulumi.panos.Dhcp;
    import com.pulumi.panos.DhcpArgs;
    import com.pulumi.panos.inputs.DhcpLocationArgs;
    import com.pulumi.panos.inputs.DhcpLocationTemplateArgs;
    import com.pulumi.panos.inputs.DhcpRelayArgs;
    import com.pulumi.panos.inputs.DhcpRelayIpArgs;
    import com.pulumi.panos.inputs.DhcpRelayIpv6Args;
    import com.pulumi.panos.inputs.DhcpServerArgs;
    import com.pulumi.panos.inputs.DhcpServerOptionArgs;
    import com.pulumi.panos.inputs.DhcpServerOptionDnsArgs;
    import com.pulumi.panos.inputs.DhcpServerOptionLeaseArgs;
    import com.pulumi.panos.inputs.DhcpServerOptionNisArgs;
    import com.pulumi.panos.inputs.DhcpServerOptionNtpArgs;
    import com.pulumi.panos.inputs.DhcpServerOptionWinsArgs;
    import com.pulumi.panos.inputs.DhcpServerOptionLeaseUnlimitedArgs;
    import com.pulumi.panos.inputs.DhcpServerOptionInheritanceArgs;
    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) {
            // Configure a template
            var example = new Template("example", TemplateArgs.builder()
                .location(TemplateLocationArgs.builder()
                    .panorama()
                    .build())
                .build());
    
            // Configure ethernet interfaces
            var eth1 = new EthernetInterface("eth1", EthernetInterfaceArgs.builder()
                .location(EthernetInterfaceLocationArgs.builder()
                    .template(EthernetInterfaceLocationTemplateArgs.builder()
                        .name(example.name())
                        .build())
                    .build())
                .layer3()
                .build());
    
            var eth2 = new EthernetInterface("eth2", EthernetInterfaceArgs.builder()
                .location(EthernetInterfaceLocationArgs.builder()
                    .template(EthernetInterfaceLocationTemplateArgs.builder()
                        .name(example.name())
                        .build())
                    .build())
                .layer3()
                .build());
    
            var eth3 = new EthernetInterface("eth3", EthernetInterfaceArgs.builder()
                .location(EthernetInterfaceLocationArgs.builder()
                    .template(EthernetInterfaceLocationTemplateArgs.builder()
                        .name(example.name())
                        .build())
                    .build())
                .layer3()
                .build());
    
            var eth4 = new EthernetInterface("eth4", EthernetInterfaceArgs.builder()
                .location(EthernetInterfaceLocationArgs.builder()
                    .template(EthernetInterfaceLocationTemplateArgs.builder()
                        .name(example.name())
                        .build())
                    .build())
                .layer3()
                .build());
    
            var eth5 = new EthernetInterface("eth5", EthernetInterfaceArgs.builder()
                .location(EthernetInterfaceLocationArgs.builder()
                    .template(EthernetInterfaceLocationTemplateArgs.builder()
                        .name(example.name())
                        .build())
                    .build())
                .layer3()
                .build());
    
            // DHCP Relay configuration
            var relayExample = new Dhcp("relayExample", DhcpArgs.builder()
                .location(DhcpLocationArgs.builder()
                    .template(DhcpLocationTemplateArgs.builder()
                        .name(example.name())
                        .build())
                    .build())
                .relay(DhcpRelayArgs.builder()
                    .ip(DhcpRelayIpArgs.builder()
                        .enabled(true)
                        .server(                    
                            "10.0.0.1",
                            "10.0.0.2")
                        .build())
                    .build())
                .build());
    
            // DHCP Relay IPv6 configuration
            var relayIpv6Example = new Dhcp("relayIpv6Example", DhcpArgs.builder()
                .location(DhcpLocationArgs.builder()
                    .template(DhcpLocationTemplateArgs.builder()
                        .name(example.name())
                        .build())
                    .build())
                .relay(DhcpRelayArgs.builder()
                    .ipv6(DhcpRelayIpv6Args.builder()
                        .enabled(true)
                        .server(                    
                            %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
                            %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                        .build())
                    .build())
                .build());
    
            // DHCP Server configuration with various options
            var serverExample = new Dhcp("serverExample", DhcpArgs.builder()
                .location(DhcpLocationArgs.builder()
                    .template(DhcpLocationTemplateArgs.builder()
                        .name(example.name())
                        .build())
                    .build())
                .server(DhcpServerArgs.builder()
                    .ip_pool("192.168.1.0/24")
                    .mode("enabled")
                    .option(DhcpServerOptionArgs.builder()
                        .dns(DhcpServerOptionDnsArgs.builder()
                            .primary("8.8.8.8")
                            .secondary("8.8.4.4")
                            .build())
                        .dnsSuffix("example.com")
                        .gateway("192.168.1.1")
                        .lease(DhcpServerOptionLeaseArgs.builder()
                            .timeout(720)
                            .build())
                        .nis(DhcpServerOptionNisArgs.builder()
                            .primary("192.168.1.10")
                            .secondary("192.168.1.11")
                            .build())
                        .ntp(DhcpServerOptionNtpArgs.builder()
                            .primary("192.168.1.20")
                            .secondary("192.168.1.21")
                            .build())
                        .pop3Server("192.168.1.30")
                        .smtpServer("192.168.1.25")
                        .subnetMask("255.255.255.0")
                        .wins(DhcpServerOptionWinsArgs.builder()
                            .primary("192.168.1.40")
                            .secondary("192.168.1.41")
                            .build())
                        .userDefined(                    
                            %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
                            %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
                            %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                        .build())
                    .reserved(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                    .build())
                .build());
    
            // DHCP Server configuration with unlimited lease
            var serverUnlimitedLeaseExample = new Dhcp("serverUnlimitedLeaseExample", DhcpArgs.builder()
                .location(DhcpLocationArgs.builder()
                    .template(DhcpLocationTemplateArgs.builder()
                        .name(example.name())
                        .build())
                    .build())
                .server(DhcpServerArgs.builder()
                    .ip_pool("192.168.2.0/24")
                    .option(DhcpServerOptionArgs.builder()
                        .lease(DhcpServerOptionLeaseArgs.builder()
                            .unlimited()
                            .build())
                        .build())
                    .build())
                .build());
    
            // DHCP Server configuration with inheritance
            var serverInheritanceExample = new Dhcp("serverInheritanceExample", DhcpArgs.builder()
                .location(DhcpLocationArgs.builder()
                    .template(DhcpLocationTemplateArgs.builder()
                        .name(example.name())
                        .build())
                    .build())
                .server(DhcpServerArgs.builder()
                    .ip_pool("192.168.3.0/24")
                    .option(DhcpServerOptionArgs.builder()
                        .inheritance(DhcpServerOptionInheritanceArgs.builder()
                            .source(eth1.name())
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Configure a template
      example:
        type: panos:Template
        properties:
          location:
            panorama: {}
      # Configure ethernet interfaces
      eth1:
        type: panos:EthernetInterface
        properties:
          location:
            template:
              name: ${example.name}
          layer3: {}
      eth2:
        type: panos:EthernetInterface
        properties:
          location:
            template:
              name: ${example.name}
          layer3: {}
      eth3:
        type: panos:EthernetInterface
        properties:
          location:
            template:
              name: ${example.name}
          layer3: {}
      eth4:
        type: panos:EthernetInterface
        properties:
          location:
            template:
              name: ${example.name}
          layer3: {}
      eth5:
        type: panos:EthernetInterface
        properties:
          location:
            template:
              name: ${example.name}
          layer3: {}
      # DHCP Relay configuration
      relayExample:
        type: panos:Dhcp
        properties:
          location:
            template:
              name: ${example.name}
          relay:
            ip:
              enabled: true
              server:
                - 10.0.0.1
                - 10.0.0.2
      # DHCP Relay IPv6 configuration
      relayIpv6Example:
        type: panos:Dhcp
        properties:
          location:
            template:
              name: ${example.name}
          relay:
            ipv6:
              enabled: true
              server:
                - name: 2001:db8::1
                  interface: ${eth1.name}
                - name: 2001:db8::2
      # DHCP Server configuration with various options
      serverExample:
        type: panos:Dhcp
        properties:
          location:
            template:
              name: ${example.name}
          server:
            ip_pool:
              - 192.168.1.0/24
            mode: enabled
            option:
              dns:
                primary: 8.8.8.8
                secondary: 8.8.4.4
              dnsSuffix: example.com
              gateway: 192.168.1.1
              lease:
                timeout: 720
              nis:
                primary: 192.168.1.10
                secondary: 192.168.1.11
              ntp:
                primary: 192.168.1.20
                secondary: 192.168.1.21
              pop3Server: 192.168.1.30
              smtpServer: 192.168.1.25
              subnetMask: 255.255.255.0
              wins:
                primary: 192.168.1.40
                secondary: 192.168.1.41
              userDefined:
                - name: custom_ip_option
                  code: 200
                  ip:
                    - 10.0.0.1
                    - 10.0.0.2
                  inherited: false
                - name: custom_ascii_option
                  code: 201
                  ascii:
                    - custom option
                  inherited: false
                - name: custom_hex_option
                  code: 202
                  hex:
                    - 0A0B0C
                  inherited: false
            reserved:
              - name: 192.168.1.100
                mac: 00:11:22:33:44:55
                description: reserved-printer
      # DHCP Server configuration with unlimited lease
      serverUnlimitedLeaseExample:
        type: panos:Dhcp
        properties:
          location:
            template:
              name: ${example.name}
          server:
            ip_pool:
              - 192.168.2.0/24
            option:
              lease:
                unlimited: {}
      # DHCP Server configuration with inheritance
      serverInheritanceExample:
        type: panos:Dhcp
        properties:
          location:
            template:
              name: ${example.name}
          server:
            ip_pool:
              - 192.168.3.0/24
            option:
              inheritance:
                source: ${eth1.name}
    

    Create Dhcp Resource

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

    Constructor syntax

    new Dhcp(name: string, args: DhcpArgs, opts?: CustomResourceOptions);
    @overload
    def Dhcp(resource_name: str,
             args: DhcpArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Dhcp(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             location: Optional[DhcpLocationArgs] = None,
             name: Optional[str] = None,
             relay: Optional[DhcpRelayArgs] = None,
             server: Optional[DhcpServerArgs] = None)
    func NewDhcp(ctx *Context, name string, args DhcpArgs, opts ...ResourceOption) (*Dhcp, error)
    public Dhcp(string name, DhcpArgs args, CustomResourceOptions? opts = null)
    public Dhcp(String name, DhcpArgs args)
    public Dhcp(String name, DhcpArgs args, CustomResourceOptions options)
    
    type: panos:Dhcp
    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 DhcpArgs
    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 DhcpArgs
    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 DhcpArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DhcpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DhcpArgs
    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 dhcpResource = new Panos.Dhcp("dhcpResource", new()
    {
        Location = new Panos.Inputs.DhcpLocationArgs
        {
            Ngfw = new Panos.Inputs.DhcpLocationNgfwArgs
            {
                NgfwDevice = "string",
            },
            Template = new Panos.Inputs.DhcpLocationTemplateArgs
            {
                Name = "string",
                NgfwDevice = "string",
                PanoramaDevice = "string",
            },
            TemplateStack = new Panos.Inputs.DhcpLocationTemplateStackArgs
            {
                Name = "string",
                NgfwDevice = "string",
                PanoramaDevice = "string",
            },
        },
        Name = "string",
        Relay = new Panos.Inputs.DhcpRelayArgs
        {
            Ip = new Panos.Inputs.DhcpRelayIpArgs
            {
                Enabled = false,
                Servers = new[]
                {
                    "string",
                },
            },
            Ipv6 = new Panos.Inputs.DhcpRelayIpv6Args
            {
                Enabled = false,
                Servers = new[]
                {
                    new Panos.Inputs.DhcpRelayIpv6ServerArgs
                    {
                        Name = "string",
                        Interface = "string",
                    },
                },
            },
        },
        Server = new Panos.Inputs.DhcpServerArgs
        {
            IpPools = new[]
            {
                "string",
            },
            Mode = "string",
            Option = new Panos.Inputs.DhcpServerOptionArgs
            {
                Dns = new Panos.Inputs.DhcpServerOptionDnsArgs
                {
                    Primary = "string",
                    Secondary = "string",
                },
                DnsSuffix = "string",
                Gateway = "string",
                Inheritance = new Panos.Inputs.DhcpServerOptionInheritanceArgs
                {
                    Source = "string",
                },
                Lease = new Panos.Inputs.DhcpServerOptionLeaseArgs
                {
                    Timeout = 0,
                    Unlimited = null,
                },
                Nis = new Panos.Inputs.DhcpServerOptionNisArgs
                {
                    Primary = "string",
                    Secondary = "string",
                },
                Ntp = new Panos.Inputs.DhcpServerOptionNtpArgs
                {
                    Primary = "string",
                    Secondary = "string",
                },
                Pop3Server = "string",
                SmtpServer = "string",
                SubnetMask = "string",
                UserDefineds = new[]
                {
                    new Panos.Inputs.DhcpServerOptionUserDefinedArgs
                    {
                        Name = "string",
                        Asciis = new[]
                        {
                            "string",
                        },
                        Code = 0,
                        Hexes = new[]
                        {
                            "string",
                        },
                        Inherited = false,
                        Ips = new[]
                        {
                            "string",
                        },
                        VendorClassIdentifier = "string",
                    },
                },
                Wins = new Panos.Inputs.DhcpServerOptionWinsArgs
                {
                    Primary = "string",
                    Secondary = "string",
                },
            },
            ProbeIp = false,
            Reserveds = new[]
            {
                new Panos.Inputs.DhcpServerReservedArgs
                {
                    Name = "string",
                    Description = "string",
                    Mac = "string",
                },
            },
        },
    });
    
    example, err := panos.NewDhcp(ctx, "dhcpResource", &panos.DhcpArgs{
    	Location: &panos.DhcpLocationArgs{
    		Ngfw: &panos.DhcpLocationNgfwArgs{
    			NgfwDevice: pulumi.String("string"),
    		},
    		Template: &panos.DhcpLocationTemplateArgs{
    			Name:           pulumi.String("string"),
    			NgfwDevice:     pulumi.String("string"),
    			PanoramaDevice: pulumi.String("string"),
    		},
    		TemplateStack: &panos.DhcpLocationTemplateStackArgs{
    			Name:           pulumi.String("string"),
    			NgfwDevice:     pulumi.String("string"),
    			PanoramaDevice: pulumi.String("string"),
    		},
    	},
    	Name: pulumi.String("string"),
    	Relay: &panos.DhcpRelayArgs{
    		Ip: &panos.DhcpRelayIpArgs{
    			Enabled: pulumi.Bool(false),
    			Servers: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    		Ipv6: &panos.DhcpRelayIpv6Args{
    			Enabled: pulumi.Bool(false),
    			Servers: panos.DhcpRelayIpv6ServerArray{
    				&panos.DhcpRelayIpv6ServerArgs{
    					Name:      pulumi.String("string"),
    					Interface: pulumi.String("string"),
    				},
    			},
    		},
    	},
    	Server: &panos.DhcpServerArgs{
    		IpPools: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Mode: pulumi.String("string"),
    		Option: &panos.DhcpServerOptionArgs{
    			Dns: &panos.DhcpServerOptionDnsArgs{
    				Primary:   pulumi.String("string"),
    				Secondary: pulumi.String("string"),
    			},
    			DnsSuffix: pulumi.String("string"),
    			Gateway:   pulumi.String("string"),
    			Inheritance: &panos.DhcpServerOptionInheritanceArgs{
    				Source: pulumi.String("string"),
    			},
    			Lease: &panos.DhcpServerOptionLeaseArgs{
    				Timeout:   pulumi.Float64(0),
    				Unlimited: &panos.DhcpServerOptionLeaseUnlimitedArgs{},
    			},
    			Nis: &panos.DhcpServerOptionNisArgs{
    				Primary:   pulumi.String("string"),
    				Secondary: pulumi.String("string"),
    			},
    			Ntp: &panos.DhcpServerOptionNtpArgs{
    				Primary:   pulumi.String("string"),
    				Secondary: pulumi.String("string"),
    			},
    			Pop3Server: pulumi.String("string"),
    			SmtpServer: pulumi.String("string"),
    			SubnetMask: pulumi.String("string"),
    			UserDefineds: panos.DhcpServerOptionUserDefinedArray{
    				&panos.DhcpServerOptionUserDefinedArgs{
    					Name: pulumi.String("string"),
    					Asciis: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					Code: pulumi.Float64(0),
    					Hexes: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					Inherited: pulumi.Bool(false),
    					Ips: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					VendorClassIdentifier: pulumi.String("string"),
    				},
    			},
    			Wins: &panos.DhcpServerOptionWinsArgs{
    				Primary:   pulumi.String("string"),
    				Secondary: pulumi.String("string"),
    			},
    		},
    		ProbeIp: pulumi.Bool(false),
    		Reserveds: panos.DhcpServerReservedArray{
    			&panos.DhcpServerReservedArgs{
    				Name:        pulumi.String("string"),
    				Description: pulumi.String("string"),
    				Mac:         pulumi.String("string"),
    			},
    		},
    	},
    })
    
    var dhcpResource = new Dhcp("dhcpResource", DhcpArgs.builder()
        .location(DhcpLocationArgs.builder()
            .ngfw(DhcpLocationNgfwArgs.builder()
                .ngfwDevice("string")
                .build())
            .template(DhcpLocationTemplateArgs.builder()
                .name("string")
                .ngfwDevice("string")
                .panoramaDevice("string")
                .build())
            .templateStack(DhcpLocationTemplateStackArgs.builder()
                .name("string")
                .ngfwDevice("string")
                .panoramaDevice("string")
                .build())
            .build())
        .name("string")
        .relay(DhcpRelayArgs.builder()
            .ip(DhcpRelayIpArgs.builder()
                .enabled(false)
                .servers("string")
                .build())
            .ipv6(DhcpRelayIpv6Args.builder()
                .enabled(false)
                .servers(DhcpRelayIpv6ServerArgs.builder()
                    .name("string")
                    .interface_("string")
                    .build())
                .build())
            .build())
        .server(DhcpServerArgs.builder()
            .ipPools("string")
            .mode("string")
            .option(DhcpServerOptionArgs.builder()
                .dns(DhcpServerOptionDnsArgs.builder()
                    .primary("string")
                    .secondary("string")
                    .build())
                .dnsSuffix("string")
                .gateway("string")
                .inheritance(DhcpServerOptionInheritanceArgs.builder()
                    .source("string")
                    .build())
                .lease(DhcpServerOptionLeaseArgs.builder()
                    .timeout(0.0)
                    .unlimited(DhcpServerOptionLeaseUnlimitedArgs.builder()
                        .build())
                    .build())
                .nis(DhcpServerOptionNisArgs.builder()
                    .primary("string")
                    .secondary("string")
                    .build())
                .ntp(DhcpServerOptionNtpArgs.builder()
                    .primary("string")
                    .secondary("string")
                    .build())
                .pop3Server("string")
                .smtpServer("string")
                .subnetMask("string")
                .userDefineds(DhcpServerOptionUserDefinedArgs.builder()
                    .name("string")
                    .asciis("string")
                    .code(0.0)
                    .hexes("string")
                    .inherited(false)
                    .ips("string")
                    .vendorClassIdentifier("string")
                    .build())
                .wins(DhcpServerOptionWinsArgs.builder()
                    .primary("string")
                    .secondary("string")
                    .build())
                .build())
            .probeIp(false)
            .reserveds(DhcpServerReservedArgs.builder()
                .name("string")
                .description("string")
                .mac("string")
                .build())
            .build())
        .build());
    
    dhcp_resource = panos.Dhcp("dhcpResource",
        location={
            "ngfw": {
                "ngfw_device": "string",
            },
            "template": {
                "name": "string",
                "ngfw_device": "string",
                "panorama_device": "string",
            },
            "template_stack": {
                "name": "string",
                "ngfw_device": "string",
                "panorama_device": "string",
            },
        },
        name="string",
        relay={
            "ip": {
                "enabled": False,
                "servers": ["string"],
            },
            "ipv6": {
                "enabled": False,
                "servers": [{
                    "name": "string",
                    "interface": "string",
                }],
            },
        },
        server={
            "ip_pools": ["string"],
            "mode": "string",
            "option": {
                "dns": {
                    "primary": "string",
                    "secondary": "string",
                },
                "dns_suffix": "string",
                "gateway": "string",
                "inheritance": {
                    "source": "string",
                },
                "lease": {
                    "timeout": 0,
                    "unlimited": {},
                },
                "nis": {
                    "primary": "string",
                    "secondary": "string",
                },
                "ntp": {
                    "primary": "string",
                    "secondary": "string",
                },
                "pop3_server": "string",
                "smtp_server": "string",
                "subnet_mask": "string",
                "user_defineds": [{
                    "name": "string",
                    "asciis": ["string"],
                    "code": 0,
                    "hexes": ["string"],
                    "inherited": False,
                    "ips": ["string"],
                    "vendor_class_identifier": "string",
                }],
                "wins": {
                    "primary": "string",
                    "secondary": "string",
                },
            },
            "probe_ip": False,
            "reserveds": [{
                "name": "string",
                "description": "string",
                "mac": "string",
            }],
        })
    
    const dhcpResource = new panos.Dhcp("dhcpResource", {
        location: {
            ngfw: {
                ngfwDevice: "string",
            },
            template: {
                name: "string",
                ngfwDevice: "string",
                panoramaDevice: "string",
            },
            templateStack: {
                name: "string",
                ngfwDevice: "string",
                panoramaDevice: "string",
            },
        },
        name: "string",
        relay: {
            ip: {
                enabled: false,
                servers: ["string"],
            },
            ipv6: {
                enabled: false,
                servers: [{
                    name: "string",
                    "interface": "string",
                }],
            },
        },
        server: {
            ipPools: ["string"],
            mode: "string",
            option: {
                dns: {
                    primary: "string",
                    secondary: "string",
                },
                dnsSuffix: "string",
                gateway: "string",
                inheritance: {
                    source: "string",
                },
                lease: {
                    timeout: 0,
                    unlimited: {},
                },
                nis: {
                    primary: "string",
                    secondary: "string",
                },
                ntp: {
                    primary: "string",
                    secondary: "string",
                },
                pop3Server: "string",
                smtpServer: "string",
                subnetMask: "string",
                userDefineds: [{
                    name: "string",
                    asciis: ["string"],
                    code: 0,
                    hexes: ["string"],
                    inherited: false,
                    ips: ["string"],
                    vendorClassIdentifier: "string",
                }],
                wins: {
                    primary: "string",
                    secondary: "string",
                },
            },
            probeIp: false,
            reserveds: [{
                name: "string",
                description: "string",
                mac: "string",
            }],
        },
    });
    
    type: panos:Dhcp
    properties:
        location:
            ngfw:
                ngfwDevice: string
            template:
                name: string
                ngfwDevice: string
                panoramaDevice: string
            templateStack:
                name: string
                ngfwDevice: string
                panoramaDevice: string
        name: string
        relay:
            ip:
                enabled: false
                servers:
                    - string
            ipv6:
                enabled: false
                servers:
                    - interface: string
                      name: string
        server:
            ipPools:
                - string
            mode: string
            option:
                dns:
                    primary: string
                    secondary: string
                dnsSuffix: string
                gateway: string
                inheritance:
                    source: string
                lease:
                    timeout: 0
                    unlimited: {}
                nis:
                    primary: string
                    secondary: string
                ntp:
                    primary: string
                    secondary: string
                pop3Server: string
                smtpServer: string
                subnetMask: string
                userDefineds:
                    - asciis:
                        - string
                      code: 0
                      hexes:
                        - string
                      inherited: false
                      ips:
                        - string
                      name: string
                      vendorClassIdentifier: string
                wins:
                    primary: string
                    secondary: string
            probeIp: false
            reserveds:
                - description: string
                  mac: string
                  name: string
    

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

    Location DhcpLocation
    The location of this object.
    Name string
    Relay DhcpRelay
    Server DhcpServer
    location DhcpLocation
    The location of this object.
    name String
    relay DhcpRelay
    server DhcpServer
    location DhcpLocation
    The location of this object.
    name string
    relay DhcpRelay
    server DhcpServer

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Dhcp 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 Dhcp Resource

    Get an existing Dhcp 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?: DhcpState, opts?: CustomResourceOptions): Dhcp
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            location: Optional[DhcpLocationArgs] = None,
            name: Optional[str] = None,
            relay: Optional[DhcpRelayArgs] = None,
            server: Optional[DhcpServerArgs] = None) -> Dhcp
    func GetDhcp(ctx *Context, name string, id IDInput, state *DhcpState, opts ...ResourceOption) (*Dhcp, error)
    public static Dhcp Get(string name, Input<string> id, DhcpState? state, CustomResourceOptions? opts = null)
    public static Dhcp get(String name, Output<String> id, DhcpState state, CustomResourceOptions options)
    resources:  _:    type: panos:Dhcp    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:
    Location DhcpLocation
    The location of this object.
    Name string
    Relay DhcpRelay
    Server DhcpServer
    location DhcpLocation
    The location of this object.
    name String
    relay DhcpRelay
    server DhcpServer
    location DhcpLocation
    The location of this object.
    name string
    relay DhcpRelay
    server DhcpServer

    Supporting Types

    DhcpLocation, DhcpLocationArgs

    Ngfw DhcpLocationNgfw
    Located in a specific NGFW device
    Template DhcpLocationTemplate
    Located in a specific template
    TemplateStack DhcpLocationTemplateStack
    Located in a specific template stack
    Ngfw DhcpLocationNgfw
    Located in a specific NGFW device
    Template DhcpLocationTemplate
    Located in a specific template
    TemplateStack DhcpLocationTemplateStack
    Located in a specific template stack
    ngfw DhcpLocationNgfw
    Located in a specific NGFW device
    template DhcpLocationTemplate
    Located in a specific template
    templateStack DhcpLocationTemplateStack
    Located in a specific template stack
    ngfw DhcpLocationNgfw
    Located in a specific NGFW device
    template DhcpLocationTemplate
    Located in a specific template
    templateStack DhcpLocationTemplateStack
    Located in a specific template stack
    ngfw DhcpLocationNgfw
    Located in a specific NGFW device
    template DhcpLocationTemplate
    Located in a specific template
    template_stack DhcpLocationTemplateStack
    Located in a specific template stack
    ngfw Property Map
    Located in a specific NGFW device
    template Property Map
    Located in a specific template
    templateStack Property Map
    Located in a specific template stack

    DhcpLocationNgfw, DhcpLocationNgfwArgs

    NgfwDevice string
    The NGFW device
    NgfwDevice string
    The NGFW device
    ngfwDevice String
    The NGFW device
    ngfwDevice string
    The NGFW device
    ngfw_device str
    The NGFW device
    ngfwDevice String
    The NGFW device

    DhcpLocationTemplate, DhcpLocationTemplateArgs

    Name string
    Specific Panorama template
    NgfwDevice string
    The NGFW device
    PanoramaDevice string
    Specific Panorama device
    Name string
    Specific Panorama template
    NgfwDevice string
    The NGFW device
    PanoramaDevice string
    Specific Panorama device
    name String
    Specific Panorama template
    ngfwDevice String
    The NGFW device
    panoramaDevice String
    Specific Panorama device
    name string
    Specific Panorama template
    ngfwDevice string
    The NGFW device
    panoramaDevice string
    Specific Panorama device
    name str
    Specific Panorama template
    ngfw_device str
    The NGFW device
    panorama_device str
    Specific Panorama device
    name String
    Specific Panorama template
    ngfwDevice String
    The NGFW device
    panoramaDevice String
    Specific Panorama device

    DhcpLocationTemplateStack, DhcpLocationTemplateStackArgs

    Name string
    Specific Panorama template stack
    NgfwDevice string
    The NGFW device
    PanoramaDevice string
    Specific Panorama device
    Name string
    Specific Panorama template stack
    NgfwDevice string
    The NGFW device
    PanoramaDevice string
    Specific Panorama device
    name String
    Specific Panorama template stack
    ngfwDevice String
    The NGFW device
    panoramaDevice String
    Specific Panorama device
    name string
    Specific Panorama template stack
    ngfwDevice string
    The NGFW device
    panoramaDevice string
    Specific Panorama device
    name str
    Specific Panorama template stack
    ngfw_device str
    The NGFW device
    panorama_device str
    Specific Panorama device
    name String
    Specific Panorama template stack
    ngfwDevice String
    The NGFW device
    panoramaDevice String
    Specific Panorama device

    DhcpRelay, DhcpRelayArgs

    DhcpRelayIp, DhcpRelayIpArgs

    Enabled bool
    Servers List<string>
    Enabled bool
    Servers []string
    enabled Boolean
    servers List<String>
    enabled boolean
    servers string[]
    enabled bool
    servers Sequence[str]
    enabled Boolean
    servers List<String>

    DhcpRelayIpv6, DhcpRelayIpv6Args

    DhcpRelayIpv6Server, DhcpRelayIpv6ServerArgs

    Name string
    Interface string
    Specify outgoing interface when using an IPv6 multicast address for your DHCPv6 server
    Name string
    Interface string
    Specify outgoing interface when using an IPv6 multicast address for your DHCPv6 server
    name String
    interface_ String
    Specify outgoing interface when using an IPv6 multicast address for your DHCPv6 server
    name string
    interface string
    Specify outgoing interface when using an IPv6 multicast address for your DHCPv6 server
    name str
    interface str
    Specify outgoing interface when using an IPv6 multicast address for your DHCPv6 server
    name String
    interface String
    Specify outgoing interface when using an IPv6 multicast address for your DHCPv6 server

    DhcpServer, DhcpServerArgs

    IpPools List<string>
    Mode string
    Option DhcpServerOption
    ProbeIp bool
    Ping IP when allocating a new IP
    Reserveds List<DhcpServerReserved>
    IpPools []string
    Mode string
    Option DhcpServerOption
    ProbeIp bool
    Ping IP when allocating a new IP
    Reserveds []DhcpServerReserved
    ipPools List<String>
    mode String
    option DhcpServerOption
    probeIp Boolean
    Ping IP when allocating a new IP
    reserveds List<DhcpServerReserved>
    ipPools string[]
    mode string
    option DhcpServerOption
    probeIp boolean
    Ping IP when allocating a new IP
    reserveds DhcpServerReserved[]
    ip_pools Sequence[str]
    mode str
    option DhcpServerOption
    probe_ip bool
    Ping IP when allocating a new IP
    reserveds Sequence[DhcpServerReserved]
    ipPools List<String>
    mode String
    option Property Map
    probeIp Boolean
    Ping IP when allocating a new IP
    reserveds List<Property Map>

    DhcpServerOption, DhcpServerOptionArgs

    DhcpServerOptionDns, DhcpServerOptionDnsArgs

    Primary string
    DNS primary server ip address
    Secondary string
    DNS secondary server ip address
    Primary string
    DNS primary server ip address
    Secondary string
    DNS secondary server ip address
    primary String
    DNS primary server ip address
    secondary String
    DNS secondary server ip address
    primary string
    DNS primary server ip address
    secondary string
    DNS secondary server ip address
    primary str
    DNS primary server ip address
    secondary str
    DNS secondary server ip address
    primary String
    DNS primary server ip address
    secondary String
    DNS secondary server ip address

    DhcpServerOptionInheritance, DhcpServerOptionInheritanceArgs

    Source string
    Dynamic interface
    Source string
    Dynamic interface
    source String
    Dynamic interface
    source string
    Dynamic interface
    source str
    Dynamic interface
    source String
    Dynamic interface

    DhcpServerOptionLease, DhcpServerOptionLeaseArgs

    timeout Number
    lease(minute)
    unlimited Property Map

    DhcpServerOptionNis, DhcpServerOptionNisArgs

    Primary string
    NIS primary server ip address
    Secondary string
    NIS secondary server ip address
    Primary string
    NIS primary server ip address
    Secondary string
    NIS secondary server ip address
    primary String
    NIS primary server ip address
    secondary String
    NIS secondary server ip address
    primary string
    NIS primary server ip address
    secondary string
    NIS secondary server ip address
    primary str
    NIS primary server ip address
    secondary str
    NIS secondary server ip address
    primary String
    NIS primary server ip address
    secondary String
    NIS secondary server ip address

    DhcpServerOptionNtp, DhcpServerOptionNtpArgs

    Primary string
    NTP primary server ip address
    Secondary string
    NTP secondary server ip address
    Primary string
    NTP primary server ip address
    Secondary string
    NTP secondary server ip address
    primary String
    NTP primary server ip address
    secondary String
    NTP secondary server ip address
    primary string
    NTP primary server ip address
    secondary string
    NTP secondary server ip address
    primary str
    NTP primary server ip address
    secondary str
    NTP secondary server ip address
    primary String
    NTP primary server ip address
    secondary String
    NTP secondary server ip address

    DhcpServerOptionUserDefined, DhcpServerOptionUserDefinedArgs

    Name string
    Asciis List<string>
    Code double
    option code
    Hexes List<string>
    Inherited bool
    Inherited from DHCP server inheritance source
    Ips List<string>
    VendorClassIdentifier string
    Name string
    Asciis []string
    Code float64
    option code
    Hexes []string
    Inherited bool
    Inherited from DHCP server inheritance source
    Ips []string
    VendorClassIdentifier string
    name String
    asciis List<String>
    code Double
    option code
    hexes List<String>
    inherited Boolean
    Inherited from DHCP server inheritance source
    ips List<String>
    vendorClassIdentifier String
    name string
    asciis string[]
    code number
    option code
    hexes string[]
    inherited boolean
    Inherited from DHCP server inheritance source
    ips string[]
    vendorClassIdentifier string
    name str
    asciis Sequence[str]
    code float
    option code
    hexes Sequence[str]
    inherited bool
    Inherited from DHCP server inheritance source
    ips Sequence[str]
    vendor_class_identifier str
    name String
    asciis List<String>
    code Number
    option code
    hexes List<String>
    inherited Boolean
    Inherited from DHCP server inheritance source
    ips List<String>
    vendorClassIdentifier String

    DhcpServerOptionWins, DhcpServerOptionWinsArgs

    Primary string
    WINS primary server ip address
    Secondary string
    WINS secondary server ip address
    Primary string
    WINS primary server ip address
    Secondary string
    WINS secondary server ip address
    primary String
    WINS primary server ip address
    secondary String
    WINS secondary server ip address
    primary string
    WINS primary server ip address
    secondary string
    WINS secondary server ip address
    primary str
    WINS primary server ip address
    secondary str
    WINS secondary server ip address
    primary String
    WINS primary server ip address
    secondary String
    WINS secondary server ip address

    DhcpServerReserved, DhcpServerReservedArgs

    Name string
    Description string
    Description of reserved entry, e.g. host name
    Mac string
    MAC address (format xx:xx:xx:xx:xx:xx)
    Name string
    Description string
    Description of reserved entry, e.g. host name
    Mac string
    MAC address (format xx:xx:xx:xx:xx:xx)
    name String
    description String
    Description of reserved entry, e.g. host name
    mac String
    MAC address (format xx:xx:xx:xx:xx:xx)
    name string
    description string
    Description of reserved entry, e.g. host name
    mac string
    MAC address (format xx:xx:xx:xx:xx:xx)
    name str
    description str
    Description of reserved entry, e.g. host name
    mac str
    MAC address (format xx:xx:xx:xx:xx:xx)
    name String
    description String
    Description of reserved entry, e.g. host name
    mac String
    MAC address (format xx:xx:xx:xx:xx:xx)

    Package Details

    Repository
    panos paloaltonetworks/terraform-provider-panos
    License
    Notes
    This Pulumi package is based on the panos Terraform Provider.
    panos logo
    panos 2.0.4 published on Friday, Jul 25, 2025 by paloaltonetworks