1. Packages
  2. Netbox Provider
  3. API Docs
  4. getIpRange
Viewing docs for netbox 5.2.1
published on Thursday, Mar 12, 2026 by e-breuninger
netbox logo
Viewing docs for netbox 5.2.1
published on Thursday, Mar 12, 2026 by e-breuninger

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const custAProd = netbox.getIpRange({
        contains: "10.0.0.1/24",
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    cust_a_prod = netbox.get_ip_range(contains="10.0.0.1/24")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v5/netbox"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := netbox.LookupIpRange(ctx, &netbox.LookupIpRangeArgs{
    			Contains: pulumi.StringRef("10.0.0.1/24"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Netbox = Pulumi.Netbox;
    
    return await Deployment.RunAsync(() => 
    {
        var custAProd = Netbox.GetIpRange.Invoke(new()
        {
            Contains = "10.0.0.1/24",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netbox.NetboxFunctions;
    import com.pulumi.netbox.inputs.GetIpRangeArgs;
    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 custAProd = NetboxFunctions.getIpRange(GetIpRangeArgs.builder()
                .contains("10.0.0.1/24")
                .build());
    
        }
    }
    
    variables:
      custAProd:
        fn::invoke:
          function: netbox:getIpRange
          arguments:
            contains: 10.0.0.1/24
    

    Using getIpRange

    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 getIpRange(args: GetIpRangeArgs, opts?: InvokeOptions): Promise<GetIpRangeResult>
    function getIpRangeOutput(args: GetIpRangeOutputArgs, opts?: InvokeOptions): Output<GetIpRangeResult>
    def get_ip_range(contains: Optional[str] = None,
                     description: Optional[str] = None,
                     family: Optional[float] = None,
                     role_id: Optional[float] = None,
                     status: Optional[str] = None,
                     tag: Optional[str] = None,
                     tag_n: Optional[str] = None,
                     tenant_id: Optional[float] = None,
                     vrf_id: Optional[float] = None,
                     opts: Optional[InvokeOptions] = None) -> GetIpRangeResult
    def get_ip_range_output(contains: Optional[pulumi.Input[str]] = None,
                     description: Optional[pulumi.Input[str]] = None,
                     family: Optional[pulumi.Input[float]] = None,
                     role_id: Optional[pulumi.Input[float]] = None,
                     status: Optional[pulumi.Input[str]] = None,
                     tag: Optional[pulumi.Input[str]] = None,
                     tag_n: Optional[pulumi.Input[str]] = None,
                     tenant_id: Optional[pulumi.Input[float]] = None,
                     vrf_id: Optional[pulumi.Input[float]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetIpRangeResult]
    func LookupIpRange(ctx *Context, args *LookupIpRangeArgs, opts ...InvokeOption) (*LookupIpRangeResult, error)
    func LookupIpRangeOutput(ctx *Context, args *LookupIpRangeOutputArgs, opts ...InvokeOption) LookupIpRangeResultOutput

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

    public static class GetIpRange 
    {
        public static Task<GetIpRangeResult> InvokeAsync(GetIpRangeArgs args, InvokeOptions? opts = null)
        public static Output<GetIpRangeResult> Invoke(GetIpRangeInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIpRangeResult> getIpRange(GetIpRangeArgs args, InvokeOptions options)
    public static Output<GetIpRangeResult> getIpRange(GetIpRangeArgs args, InvokeOptions options)
    
    fn::invoke:
      function: netbox:index/getIpRange:getIpRange
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Contains string
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    Description string
    Description to include in the data source filter. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    Family double
    The IP family of the IP range. One of 4 or 6. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    RoleId double
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    Status string
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    Tag string
    Tag to include in the data source filter (must match the tag's slug). At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    TagN string
    Tag to exclude from the data source filter (must match the tag's slug). Refer to Netbox's documentation for more information on available lookup expressions.
    TenantId double
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    VrfId double
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    Contains string
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    Description string
    Description to include in the data source filter. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    Family float64
    The IP family of the IP range. One of 4 or 6. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    RoleId float64
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    Status string
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    Tag string
    Tag to include in the data source filter (must match the tag's slug). At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    TagN string
    Tag to exclude from the data source filter (must match the tag's slug). Refer to Netbox's documentation for more information on available lookup expressions.
    TenantId float64
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    VrfId float64
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    contains String
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    description String
    Description to include in the data source filter. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    family Double
    The IP family of the IP range. One of 4 or 6. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    roleId Double
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    status String
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    tag String
    Tag to include in the data source filter (must match the tag's slug). At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    tagN String
    Tag to exclude from the data source filter (must match the tag's slug). Refer to Netbox's documentation for more information on available lookup expressions.
    tenantId Double
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    vrfId Double
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    contains string
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    description string
    Description to include in the data source filter. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    family number
    The IP family of the IP range. One of 4 or 6. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    roleId number
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    status string
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    tag string
    Tag to include in the data source filter (must match the tag's slug). At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    tagN string
    Tag to exclude from the data source filter (must match the tag's slug). Refer to Netbox's documentation for more information on available lookup expressions.
    tenantId number
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    vrfId number
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    contains str
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    description str
    Description to include in the data source filter. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    family float
    The IP family of the IP range. One of 4 or 6. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    role_id float
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    status str
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    tag str
    Tag to include in the data source filter (must match the tag's slug). At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    tag_n str
    Tag to exclude from the data source filter (must match the tag's slug). Refer to Netbox's documentation for more information on available lookup expressions.
    tenant_id float
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    vrf_id float
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    contains String
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    description String
    Description to include in the data source filter. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    family Number
    The IP family of the IP range. One of 4 or 6. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    roleId Number
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    status String
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    tag String
    Tag to include in the data source filter (must match the tag's slug). At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    tagN String
    Tag to exclude from the data source filter (must match the tag's slug). Refer to Netbox's documentation for more information on available lookup expressions.
    tenantId Number
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    vrfId Number
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.

    getIpRange Result

    The following output properties are available:

    Description string
    Description to include in the data source filter. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    EndAddress string
    Family double
    The IP family of the IP range. One of 4 or 6. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    Id double
    The ID of this resource.
    RoleId double
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    StartAddress string
    Tags List<string>
    Contains string
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    Status string
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    Tag string
    Tag to include in the data source filter (must match the tag's slug). At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    TagN string
    Tag to exclude from the data source filter (must match the tag's slug). Refer to Netbox's documentation for more information on available lookup expressions.
    TenantId double
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    VrfId double
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    Description string
    Description to include in the data source filter. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    EndAddress string
    Family float64
    The IP family of the IP range. One of 4 or 6. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    Id float64
    The ID of this resource.
    RoleId float64
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    StartAddress string
    Tags []string
    Contains string
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    Status string
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    Tag string
    Tag to include in the data source filter (must match the tag's slug). At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    TagN string
    Tag to exclude from the data source filter (must match the tag's slug). Refer to Netbox's documentation for more information on available lookup expressions.
    TenantId float64
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    VrfId float64
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    description String
    Description to include in the data source filter. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    endAddress String
    family Double
    The IP family of the IP range. One of 4 or 6. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    id Double
    The ID of this resource.
    roleId Double
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    startAddress String
    tags List<String>
    contains String
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    status String
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    tag String
    Tag to include in the data source filter (must match the tag's slug). At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    tagN String
    Tag to exclude from the data source filter (must match the tag's slug). Refer to Netbox's documentation for more information on available lookup expressions.
    tenantId Double
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    vrfId Double
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    description string
    Description to include in the data source filter. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    endAddress string
    family number
    The IP family of the IP range. One of 4 or 6. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    id number
    The ID of this resource.
    roleId number
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    startAddress string
    tags string[]
    contains string
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    status string
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    tag string
    Tag to include in the data source filter (must match the tag's slug). At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    tagN string
    Tag to exclude from the data source filter (must match the tag's slug). Refer to Netbox's documentation for more information on available lookup expressions.
    tenantId number
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    vrfId number
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    description str
    Description to include in the data source filter. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    end_address str
    family float
    The IP family of the IP range. One of 4 or 6. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    id float
    The ID of this resource.
    role_id float
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    start_address str
    tags Sequence[str]
    contains str
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    status str
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    tag str
    Tag to include in the data source filter (must match the tag's slug). At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    tag_n str
    Tag to exclude from the data source filter (must match the tag's slug). Refer to Netbox's documentation for more information on available lookup expressions.
    tenant_id float
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    vrf_id float
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    description String
    Description to include in the data source filter. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    endAddress String
    family Number
    The IP family of the IP range. One of 4 or 6. At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    id Number
    The ID of this resource.
    roleId Number
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    startAddress String
    tags List<String>
    contains String
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    status String
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    tag String
    Tag to include in the data source filter (must match the tag's slug). At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    tagN String
    Tag to exclude from the data source filter (must match the tag's slug). Refer to Netbox's documentation for more information on available lookup expressions.
    tenantId Number
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.
    vrfId Number
    At least one of contains, family, vrf_id, tenant_id, status, role_id, description or tag must be given.

    Package Details

    Repository
    netbox e-breuninger/terraform-provider-netbox
    License
    Notes
    This Pulumi package is based on the netbox Terraform Provider.
    netbox logo
    Viewing docs for netbox 5.2.1
    published on Thursday, Mar 12, 2026 by e-breuninger
      Try Pulumi Cloud free. Your team will thank you.