1. Packages
  2. Packages
  3. Panos Provider
  4. API Docs
  5. getIpTag
Viewing docs for panos 2.0.12
published on Wednesday, Jun 17, 2026 by paloaltonetworks
Viewing docs for panos 2.0.12
published on Wednesday, Jun 17, 2026 by paloaltonetworks

    This data source returns every tag currently registered against the given IP address in the firewall’s User-ID table — both tags managed by a panos.IpTag resource and tags registered by any other means. An IP with no registered tags yields an empty set.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as panos from "@pulumi/panos";
    
    // Look up every tag currently registered against an IP address.
    const example = panos.getIpTag({
        location: {
            panorama: {},
        },
        ip: "10.0.0.1",
    });
    export const registeredTags = example.then(example => example.tags);
    
    import pulumi
    import pulumi_panos as panos
    
    # Look up every tag currently registered against an IP address.
    example = panos.get_ip_tag(location={
            "panorama": {},
        },
        ip="10.0.0.1")
    pulumi.export("registeredTags", example.tags)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/panos/v2/panos"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Look up every tag currently registered against an IP address.
    		example, err := panos.LookupIpTag(ctx, &panos.LookupIpTagArgs{
    			Location: panos.GetIpTagLocation{
    				Panorama: panos.GetIpTagLocationPanorama{},
    			},
    			Ip: pulumi.StringRef("10.0.0.1"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("registeredTags", example.Tags)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Panos = Pulumi.Panos;
    
    return await Deployment.RunAsync(() => 
    {
        // Look up every tag currently registered against an IP address.
        var example = Panos.GetIpTag.Invoke(new()
        {
            Location = new Panos.Inputs.GetIpTagLocationInputArgs
            {
                Panorama = null,
            },
            Ip = "10.0.0.1",
        });
    
        return new Dictionary<string, object?>
        {
            ["registeredTags"] = example.Apply(getIpTagResult => getIpTagResult.Tags),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.panos.PanosFunctions;
    import com.pulumi.panos.inputs.GetIpTagArgs;
    import com.pulumi.panos.inputs.GetIpTagLocationArgs;
    import com.pulumi.panos.inputs.GetIpTagLocationPanoramaArgs;
    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) {
            // Look up every tag currently registered against an IP address.
            final var example = PanosFunctions.getIpTag(GetIpTagArgs.builder()
                .location(GetIpTagLocationArgs.builder()
                    .panorama(GetIpTagLocationPanoramaArgs.builder()
                        .build())
                    .build())
                .ip("10.0.0.1")
                .build());
    
            ctx.export("registeredTags", example.tags());
        }
    }
    
    variables:
      # Look up every tag currently registered against an IP address.
      example:
        fn::invoke:
          function: panos:getIpTag
          arguments:
            location:
              panorama: {}
            ip: 10.0.0.1
    outputs:
      # The data source reports all tags present on the IP, regardless of whether they
      # are managed by a panos_ip_tag resource.
      registeredTags: ${example.tags}
    
    Example coming soon!
    

    Using getIpTag

    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 getIpTag(args: GetIpTagArgs, opts?: InvokeOptions): Promise<GetIpTagResult>
    function getIpTagOutput(args: GetIpTagOutputArgs, opts?: InvokeOptions): Output<GetIpTagResult>
    def get_ip_tag(ip: Optional[str] = None,
                   location: Optional[GetIpTagLocation] = None,
                   tags: Optional[Sequence[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> GetIpTagResult
    def get_ip_tag_output(ip: pulumi.Input[Optional[str]] = None,
                   location: pulumi.Input[Optional[GetIpTagLocationArgs]] = None,
                   tags: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetIpTagResult]
    func LookupIpTag(ctx *Context, args *LookupIpTagArgs, opts ...InvokeOption) (*LookupIpTagResult, error)
    func LookupIpTagOutput(ctx *Context, args *LookupIpTagOutputArgs, opts ...InvokeOption) LookupIpTagResultOutput

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

    public static class GetIpTag 
    {
        public static Task<GetIpTagResult> InvokeAsync(GetIpTagArgs args, InvokeOptions? opts = null)
        public static Output<GetIpTagResult> Invoke(GetIpTagInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIpTagResult> getIpTag(GetIpTagArgs args, InvokeOptions options)
    public static Output<GetIpTagResult> getIpTag(GetIpTagArgs args, InvokeOptions options)
    
    fn::invoke:
      function: panos:index/getIpTag:getIpTag
      arguments:
        # arguments dictionary
    data "panos_getiptag" "name" {
        # arguments
    }

    The following arguments are supported:

    Location GetIpTagLocation
    The location of this object.
    Ip string
    The IP address to register tags against.
    Tags List<string>
    The set of tags to register against the IP address.
    Location GetIpTagLocation
    The location of this object.
    Ip string
    The IP address to register tags against.
    Tags []string
    The set of tags to register against the IP address.
    location object
    The location of this object.
    ip string
    The IP address to register tags against.
    tags list(string)
    The set of tags to register against the IP address.
    location GetIpTagLocation
    The location of this object.
    ip String
    The IP address to register tags against.
    tags List<String>
    The set of tags to register against the IP address.
    location GetIpTagLocation
    The location of this object.
    ip string
    The IP address to register tags against.
    tags string[]
    The set of tags to register against the IP address.
    location GetIpTagLocation
    The location of this object.
    ip str
    The IP address to register tags against.
    tags Sequence[str]
    The set of tags to register against the IP address.
    location Property Map
    The location of this object.
    ip String
    The IP address to register tags against.
    tags List<String>
    The set of tags to register against the IP address.

    getIpTag Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ip string
    The IP address to register tags against.
    Location GetIpTagLocation
    The location of this object.
    Tags List<string>
    The set of tags to register against the IP address.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ip string
    The IP address to register tags against.
    Location GetIpTagLocation
    The location of this object.
    Tags []string
    The set of tags to register against the IP address.
    id string
    The provider-assigned unique ID for this managed resource.
    ip string
    The IP address to register tags against.
    location object
    The location of this object.
    tags list(string)
    The set of tags to register against the IP address.
    id String
    The provider-assigned unique ID for this managed resource.
    ip String
    The IP address to register tags against.
    location GetIpTagLocation
    The location of this object.
    tags List<String>
    The set of tags to register against the IP address.
    id string
    The provider-assigned unique ID for this managed resource.
    ip string
    The IP address to register tags against.
    location GetIpTagLocation
    The location of this object.
    tags string[]
    The set of tags to register against the IP address.
    id str
    The provider-assigned unique ID for this managed resource.
    ip str
    The IP address to register tags against.
    location GetIpTagLocation
    The location of this object.
    tags Sequence[str]
    The set of tags to register against the IP address.
    id String
    The provider-assigned unique ID for this managed resource.
    ip String
    The IP address to register tags against.
    location Property Map
    The location of this object.
    tags List<String>
    The set of tags to register against the IP address.

    Supporting Types

    GetIpTagLocation

    Panorama GetIpTagLocationPanorama
    Registered directly on Panorama's own User-ID table (no target firewall).
    TargetDevice GetIpTagLocationTargetDevice
    A firewall managed by Panorama, targeted by serial number.
    Vsys GetIpTagLocationVsys
    Located in a specific Virtual System on an NGFW.
    Panorama GetIpTagLocationPanorama
    Registered directly on Panorama's own User-ID table (no target firewall).
    TargetDevice GetIpTagLocationTargetDevice
    A firewall managed by Panorama, targeted by serial number.
    Vsys GetIpTagLocationVsys
    Located in a specific Virtual System on an NGFW.
    panorama object
    Registered directly on Panorama's own User-ID table (no target firewall).
    target_device object
    A firewall managed by Panorama, targeted by serial number.
    vsys object
    Located in a specific Virtual System on an NGFW.
    panorama GetIpTagLocationPanorama
    Registered directly on Panorama's own User-ID table (no target firewall).
    targetDevice GetIpTagLocationTargetDevice
    A firewall managed by Panorama, targeted by serial number.
    vsys GetIpTagLocationVsys
    Located in a specific Virtual System on an NGFW.
    panorama GetIpTagLocationPanorama
    Registered directly on Panorama's own User-ID table (no target firewall).
    targetDevice GetIpTagLocationTargetDevice
    A firewall managed by Panorama, targeted by serial number.
    vsys GetIpTagLocationVsys
    Located in a specific Virtual System on an NGFW.
    panorama GetIpTagLocationPanorama
    Registered directly on Panorama's own User-ID table (no target firewall).
    target_device GetIpTagLocationTargetDevice
    A firewall managed by Panorama, targeted by serial number.
    vsys GetIpTagLocationVsys
    Located in a specific Virtual System on an NGFW.
    panorama Property Map
    Registered directly on Panorama's own User-ID table (no target firewall).
    targetDevice Property Map
    A firewall managed by Panorama, targeted by serial number.
    vsys Property Map
    Located in a specific Virtual System on an NGFW.

    GetIpTagLocationTargetDevice

    Serial string
    The serial number of the Panorama-managed firewall.
    Vsys string
    The Virtual System name.
    Serial string
    The serial number of the Panorama-managed firewall.
    Vsys string
    The Virtual System name.
    serial string
    The serial number of the Panorama-managed firewall.
    vsys string
    The Virtual System name.
    serial String
    The serial number of the Panorama-managed firewall.
    vsys String
    The Virtual System name.
    serial string
    The serial number of the Panorama-managed firewall.
    vsys string
    The Virtual System name.
    serial str
    The serial number of the Panorama-managed firewall.
    vsys str
    The Virtual System name.
    serial String
    The serial number of the Panorama-managed firewall.
    vsys String
    The Virtual System name.

    GetIpTagLocationVsys

    Name string
    The Virtual System name.
    NgfwDevice string
    The NGFW device name.
    Name string
    The Virtual System name.
    NgfwDevice string
    The NGFW device name.
    name string
    The Virtual System name.
    ngfw_device string
    The NGFW device name.
    name String
    The Virtual System name.
    ngfwDevice String
    The NGFW device name.
    name string
    The Virtual System name.
    ngfwDevice string
    The NGFW device name.
    name str
    The Virtual System name.
    ngfw_device str
    The NGFW device name.
    name String
    The Virtual System name.
    ngfwDevice String
    The NGFW device name.

    Package Details

    Repository
    panos paloaltonetworks/terraform-provider-panos
    License
    Notes
    This Pulumi package is based on the panos Terraform Provider.
    Viewing docs for panos 2.0.12
    published on Wednesday, Jun 17, 2026 by paloaltonetworks

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial