1. Packages
  2. Packages
  3. Panos Provider
  4. API Docs
  5. DynamicUserGroup
Viewing docs for panos 2.0.11
published on Tuesday, Apr 28, 2026 by paloaltonetworks
Viewing docs for panos 2.0.11
published on Tuesday, Apr 28, 2026 by paloaltonetworks

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as panos from "@pulumi/panos";
    
    const exampleDeviceGroup = new panos.DeviceGroup("example", {
        location: {
            panorama: {},
        },
        name: "example-device-group",
    });
    const dev = new panos.AdministrativeTag("dev", {
        location: {
            deviceGroup: {
                name: exampleDeviceGroup.name,
            },
        },
        name: "department-dev",
        color: "color3",
    });
    const hq = new panos.AdministrativeTag("hq", {
        location: {
            deviceGroup: {
                name: exampleDeviceGroup.name,
            },
        },
        name: "location-hq",
        color: "color5",
    });
    const example = new panos.DynamicUserGroup("example", {
        location: {
            deviceGroup: {
                name: exampleDeviceGroup.name,
            },
        },
        name: "developers",
        description: "Dynamic user group for developers",
        filter: "'department-dev' and 'location-hq'",
        tags: [
            dev.name,
            hq.name,
        ],
    });
    
    import pulumi
    import pulumi_panos as panos
    
    example_device_group = panos.DeviceGroup("example",
        location={
            "panorama": {},
        },
        name="example-device-group")
    dev = panos.AdministrativeTag("dev",
        location={
            "device_group": {
                "name": example_device_group.name,
            },
        },
        name="department-dev",
        color="color3")
    hq = panos.AdministrativeTag("hq",
        location={
            "device_group": {
                "name": example_device_group.name,
            },
        },
        name="location-hq",
        color="color5")
    example = panos.DynamicUserGroup("example",
        location={
            "device_group": {
                "name": example_device_group.name,
            },
        },
        name="developers",
        description="Dynamic user group for developers",
        filter="'department-dev' and 'location-hq'",
        tags=[
            dev.name,
            hq.name,
        ])
    
    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 {
    		exampleDeviceGroup, err := panos.NewDeviceGroup(ctx, "example", &panos.DeviceGroupArgs{
    			Location: &panos.DeviceGroupLocationArgs{
    				Panorama: &panos.DeviceGroupLocationPanoramaArgs{},
    			},
    			Name: pulumi.String("example-device-group"),
    		})
    		if err != nil {
    			return err
    		}
    		dev, err := panos.NewAdministrativeTag(ctx, "dev", &panos.AdministrativeTagArgs{
    			Location: &panos.AdministrativeTagLocationArgs{
    				DeviceGroup: &panos.AdministrativeTagLocationDeviceGroupArgs{
    					Name: exampleDeviceGroup.Name,
    				},
    			},
    			Name:  pulumi.String("department-dev"),
    			Color: pulumi.String("color3"),
    		})
    		if err != nil {
    			return err
    		}
    		hq, err := panos.NewAdministrativeTag(ctx, "hq", &panos.AdministrativeTagArgs{
    			Location: &panos.AdministrativeTagLocationArgs{
    				DeviceGroup: &panos.AdministrativeTagLocationDeviceGroupArgs{
    					Name: exampleDeviceGroup.Name,
    				},
    			},
    			Name:  pulumi.String("location-hq"),
    			Color: pulumi.String("color5"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = panos.NewDynamicUserGroup(ctx, "example", &panos.DynamicUserGroupArgs{
    			Location: &panos.DynamicUserGroupLocationArgs{
    				DeviceGroup: &panos.DynamicUserGroupLocationDeviceGroupArgs{
    					Name: exampleDeviceGroup.Name,
    				},
    			},
    			Name:        pulumi.String("developers"),
    			Description: pulumi.String("Dynamic user group for developers"),
    			Filter:      pulumi.String("'department-dev' and 'location-hq'"),
    			Tags: pulumi.StringArray{
    				dev.Name,
    				hq.Name,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Panos = Pulumi.Panos;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleDeviceGroup = new Panos.DeviceGroup("example", new()
        {
            Location = new Panos.Inputs.DeviceGroupLocationArgs
            {
                Panorama = null,
            },
            Name = "example-device-group",
        });
    
        var dev = new Panos.AdministrativeTag("dev", new()
        {
            Location = new Panos.Inputs.AdministrativeTagLocationArgs
            {
                DeviceGroup = new Panos.Inputs.AdministrativeTagLocationDeviceGroupArgs
                {
                    Name = exampleDeviceGroup.Name,
                },
            },
            Name = "department-dev",
            Color = "color3",
        });
    
        var hq = new Panos.AdministrativeTag("hq", new()
        {
            Location = new Panos.Inputs.AdministrativeTagLocationArgs
            {
                DeviceGroup = new Panos.Inputs.AdministrativeTagLocationDeviceGroupArgs
                {
                    Name = exampleDeviceGroup.Name,
                },
            },
            Name = "location-hq",
            Color = "color5",
        });
    
        var example = new Panos.DynamicUserGroup("example", new()
        {
            Location = new Panos.Inputs.DynamicUserGroupLocationArgs
            {
                DeviceGroup = new Panos.Inputs.DynamicUserGroupLocationDeviceGroupArgs
                {
                    Name = exampleDeviceGroup.Name,
                },
            },
            Name = "developers",
            Description = "Dynamic user group for developers",
            Filter = "'department-dev' and 'location-hq'",
            Tags = new[]
            {
                dev.Name,
                hq.Name,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.panos.DeviceGroup;
    import com.pulumi.panos.DeviceGroupArgs;
    import com.pulumi.panos.inputs.DeviceGroupLocationArgs;
    import com.pulumi.panos.inputs.DeviceGroupLocationPanoramaArgs;
    import com.pulumi.panos.AdministrativeTag;
    import com.pulumi.panos.AdministrativeTagArgs;
    import com.pulumi.panos.inputs.AdministrativeTagLocationArgs;
    import com.pulumi.panos.inputs.AdministrativeTagLocationDeviceGroupArgs;
    import com.pulumi.panos.DynamicUserGroup;
    import com.pulumi.panos.DynamicUserGroupArgs;
    import com.pulumi.panos.inputs.DynamicUserGroupLocationArgs;
    import com.pulumi.panos.inputs.DynamicUserGroupLocationDeviceGroupArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var exampleDeviceGroup = new DeviceGroup("exampleDeviceGroup", DeviceGroupArgs.builder()
                .location(DeviceGroupLocationArgs.builder()
                    .panorama(DeviceGroupLocationPanoramaArgs.builder()
                        .build())
                    .build())
                .name("example-device-group")
                .build());
    
            var dev = new AdministrativeTag("dev", AdministrativeTagArgs.builder()
                .location(AdministrativeTagLocationArgs.builder()
                    .deviceGroup(AdministrativeTagLocationDeviceGroupArgs.builder()
                        .name(exampleDeviceGroup.name())
                        .build())
                    .build())
                .name("department-dev")
                .color("color3")
                .build());
    
            var hq = new AdministrativeTag("hq", AdministrativeTagArgs.builder()
                .location(AdministrativeTagLocationArgs.builder()
                    .deviceGroup(AdministrativeTagLocationDeviceGroupArgs.builder()
                        .name(exampleDeviceGroup.name())
                        .build())
                    .build())
                .name("location-hq")
                .color("color5")
                .build());
    
            var example = new DynamicUserGroup("example", DynamicUserGroupArgs.builder()
                .location(DynamicUserGroupLocationArgs.builder()
                    .deviceGroup(DynamicUserGroupLocationDeviceGroupArgs.builder()
                        .name(exampleDeviceGroup.name())
                        .build())
                    .build())
                .name("developers")
                .description("Dynamic user group for developers")
                .filter("'department-dev' and 'location-hq'")
                .tags(            
                    dev.name(),
                    hq.name())
                .build());
    
        }
    }
    
    resources:
      example:
        type: panos:DynamicUserGroup
        properties:
          location:
            deviceGroup:
              name: ${exampleDeviceGroup.name}
          name: developers
          description: Dynamic user group for developers
          filter: '''department-dev'' and ''location-hq'''
          tags:
            - ${dev.name}
            - ${hq.name}
      dev:
        type: panos:AdministrativeTag
        properties:
          location:
            deviceGroup:
              name: ${exampleDeviceGroup.name}
          name: department-dev
          color: color3
      hq:
        type: panos:AdministrativeTag
        properties:
          location:
            deviceGroup:
              name: ${exampleDeviceGroup.name}
          name: location-hq
          color: color5
      exampleDeviceGroup:
        type: panos:DeviceGroup
        name: example
        properties:
          location:
            panorama: {}
          name: example-device-group
    

    Create DynamicUserGroup Resource

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

    Constructor syntax

    new DynamicUserGroup(name: string, args: DynamicUserGroupArgs, opts?: CustomResourceOptions);
    @overload
    def DynamicUserGroup(resource_name: str,
                         args: DynamicUserGroupArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def DynamicUserGroup(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         location: Optional[DynamicUserGroupLocationArgs] = None,
                         description: Optional[str] = None,
                         disable_override: Optional[str] = None,
                         filter: Optional[str] = None,
                         name: Optional[str] = None,
                         tags: Optional[Sequence[str]] = None)
    func NewDynamicUserGroup(ctx *Context, name string, args DynamicUserGroupArgs, opts ...ResourceOption) (*DynamicUserGroup, error)
    public DynamicUserGroup(string name, DynamicUserGroupArgs args, CustomResourceOptions? opts = null)
    public DynamicUserGroup(String name, DynamicUserGroupArgs args)
    public DynamicUserGroup(String name, DynamicUserGroupArgs args, CustomResourceOptions options)
    
    type: panos:DynamicUserGroup
    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 DynamicUserGroupArgs
    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 DynamicUserGroupArgs
    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 DynamicUserGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DynamicUserGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DynamicUserGroupArgs
    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 dynamicUserGroupResource = new Panos.DynamicUserGroup("dynamicUserGroupResource", new()
    {
        Location = new Panos.Inputs.DynamicUserGroupLocationArgs
        {
            DeviceGroup = new Panos.Inputs.DynamicUserGroupLocationDeviceGroupArgs
            {
                Name = "string",
                PanoramaDevice = "string",
            },
            Shared = null,
            Vsys = new Panos.Inputs.DynamicUserGroupLocationVsysArgs
            {
                Name = "string",
                NgfwDevice = "string",
            },
        },
        Description = "string",
        DisableOverride = "string",
        Filter = "string",
        Name = "string",
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := panos.NewDynamicUserGroup(ctx, "dynamicUserGroupResource", &panos.DynamicUserGroupArgs{
    	Location: &panos.DynamicUserGroupLocationArgs{
    		DeviceGroup: &panos.DynamicUserGroupLocationDeviceGroupArgs{
    			Name:           pulumi.String("string"),
    			PanoramaDevice: pulumi.String("string"),
    		},
    		Shared: &panos.DynamicUserGroupLocationSharedArgs{},
    		Vsys: &panos.DynamicUserGroupLocationVsysArgs{
    			Name:       pulumi.String("string"),
    			NgfwDevice: pulumi.String("string"),
    		},
    	},
    	Description:     pulumi.String("string"),
    	DisableOverride: pulumi.String("string"),
    	Filter:          pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var dynamicUserGroupResource = new DynamicUserGroup("dynamicUserGroupResource", DynamicUserGroupArgs.builder()
        .location(DynamicUserGroupLocationArgs.builder()
            .deviceGroup(DynamicUserGroupLocationDeviceGroupArgs.builder()
                .name("string")
                .panoramaDevice("string")
                .build())
            .shared(DynamicUserGroupLocationSharedArgs.builder()
                .build())
            .vsys(DynamicUserGroupLocationVsysArgs.builder()
                .name("string")
                .ngfwDevice("string")
                .build())
            .build())
        .description("string")
        .disableOverride("string")
        .filter("string")
        .name("string")
        .tags("string")
        .build());
    
    dynamic_user_group_resource = panos.DynamicUserGroup("dynamicUserGroupResource",
        location={
            "device_group": {
                "name": "string",
                "panorama_device": "string",
            },
            "shared": {},
            "vsys": {
                "name": "string",
                "ngfw_device": "string",
            },
        },
        description="string",
        disable_override="string",
        filter="string",
        name="string",
        tags=["string"])
    
    const dynamicUserGroupResource = new panos.DynamicUserGroup("dynamicUserGroupResource", {
        location: {
            deviceGroup: {
                name: "string",
                panoramaDevice: "string",
            },
            shared: {},
            vsys: {
                name: "string",
                ngfwDevice: "string",
            },
        },
        description: "string",
        disableOverride: "string",
        filter: "string",
        name: "string",
        tags: ["string"],
    });
    
    type: panos:DynamicUserGroup
    properties:
        description: string
        disableOverride: string
        filter: string
        location:
            deviceGroup:
                name: string
                panoramaDevice: string
            shared: {}
            vsys:
                name: string
                ngfwDevice: string
        name: string
        tags:
            - string
    

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

    Location DynamicUserGroupLocation
    The location of this object.
    Description string
    DisableOverride string
    disable object override in child device groups
    Filter string
    tag-based filter
    Name string
    Tags List<string>
    Location DynamicUserGroupLocationArgs
    The location of this object.
    Description string
    DisableOverride string
    disable object override in child device groups
    Filter string
    tag-based filter
    Name string
    Tags []string
    location DynamicUserGroupLocation
    The location of this object.
    description String
    disableOverride String
    disable object override in child device groups
    filter String
    tag-based filter
    name String
    tags List<String>
    location DynamicUserGroupLocation
    The location of this object.
    description string
    disableOverride string
    disable object override in child device groups
    filter string
    tag-based filter
    name string
    tags string[]
    location DynamicUserGroupLocationArgs
    The location of this object.
    description str
    disable_override str
    disable object override in child device groups
    filter str
    tag-based filter
    name str
    tags Sequence[str]
    location Property Map
    The location of this object.
    description String
    disableOverride String
    disable object override in child device groups
    filter String
    tag-based filter
    name String
    tags List<String>

    Outputs

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

    Get an existing DynamicUserGroup 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?: DynamicUserGroupState, opts?: CustomResourceOptions): DynamicUserGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            disable_override: Optional[str] = None,
            filter: Optional[str] = None,
            location: Optional[DynamicUserGroupLocationArgs] = None,
            name: Optional[str] = None,
            tags: Optional[Sequence[str]] = None) -> DynamicUserGroup
    func GetDynamicUserGroup(ctx *Context, name string, id IDInput, state *DynamicUserGroupState, opts ...ResourceOption) (*DynamicUserGroup, error)
    public static DynamicUserGroup Get(string name, Input<string> id, DynamicUserGroupState? state, CustomResourceOptions? opts = null)
    public static DynamicUserGroup get(String name, Output<String> id, DynamicUserGroupState state, CustomResourceOptions options)
    resources:  _:    type: panos:DynamicUserGroup    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:
    Description string
    DisableOverride string
    disable object override in child device groups
    Filter string
    tag-based filter
    Location DynamicUserGroupLocation
    The location of this object.
    Name string
    Tags List<string>
    Description string
    DisableOverride string
    disable object override in child device groups
    Filter string
    tag-based filter
    Location DynamicUserGroupLocationArgs
    The location of this object.
    Name string
    Tags []string
    description String
    disableOverride String
    disable object override in child device groups
    filter String
    tag-based filter
    location DynamicUserGroupLocation
    The location of this object.
    name String
    tags List<String>
    description string
    disableOverride string
    disable object override in child device groups
    filter string
    tag-based filter
    location DynamicUserGroupLocation
    The location of this object.
    name string
    tags string[]
    description str
    disable_override str
    disable object override in child device groups
    filter str
    tag-based filter
    location DynamicUserGroupLocationArgs
    The location of this object.
    name str
    tags Sequence[str]
    description String
    disableOverride String
    disable object override in child device groups
    filter String
    tag-based filter
    location Property Map
    The location of this object.
    name String
    tags List<String>

    Supporting Types

    DynamicUserGroupLocation, DynamicUserGroupLocationArgs

    DeviceGroup DynamicUserGroupLocationDeviceGroup
    Located in a specific Device Group
    Shared DynamicUserGroupLocationShared
    Panorama shared object
    Vsys DynamicUserGroupLocationVsys
    Located in a specific Virtual System
    DeviceGroup DynamicUserGroupLocationDeviceGroup
    Located in a specific Device Group
    Shared DynamicUserGroupLocationShared
    Panorama shared object
    Vsys DynamicUserGroupLocationVsys
    Located in a specific Virtual System
    deviceGroup DynamicUserGroupLocationDeviceGroup
    Located in a specific Device Group
    shared DynamicUserGroupLocationShared
    Panorama shared object
    vsys DynamicUserGroupLocationVsys
    Located in a specific Virtual System
    deviceGroup DynamicUserGroupLocationDeviceGroup
    Located in a specific Device Group
    shared DynamicUserGroupLocationShared
    Panorama shared object
    vsys DynamicUserGroupLocationVsys
    Located in a specific Virtual System
    device_group DynamicUserGroupLocationDeviceGroup
    Located in a specific Device Group
    shared DynamicUserGroupLocationShared
    Panorama shared object
    vsys DynamicUserGroupLocationVsys
    Located in a specific Virtual System
    deviceGroup Property Map
    Located in a specific Device Group
    shared Property Map
    Panorama shared object
    vsys Property Map
    Located in a specific Virtual System

    DynamicUserGroupLocationDeviceGroup, DynamicUserGroupLocationDeviceGroupArgs

    Name string
    Device Group name
    PanoramaDevice string
    Panorama device name
    Name string
    Device Group name
    PanoramaDevice string
    Panorama device name
    name String
    Device Group name
    panoramaDevice String
    Panorama device name
    name string
    Device Group name
    panoramaDevice string
    Panorama device name
    name str
    Device Group name
    panorama_device str
    Panorama device name
    name String
    Device Group name
    panoramaDevice String
    Panorama device name

    DynamicUserGroupLocationVsys, DynamicUserGroupLocationVsysArgs

    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
    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

    Import

    A dynamic user group can be imported by providing the following base64 encoded object as the ID

    {

    location = {

    device_group = {
    
      name            = "example-device-group"
    
      panorama_device = "localhost.localdomain"
    
    }
    

    }

    name = “developers”

    }

    $ pulumi import panos:index/dynamicUserGroup:DynamicUserGroup example $(echo '{"location":{"device_group":{"name":"example-device-group","panorama_device":"localhost.localdomain"}},"name":"developers"}' | base64)
    

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

    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.11
    published on Tuesday, Apr 28, 2026 by paloaltonetworks
      Try Pulumi Cloud free. Your team will thank you.