1. Packages
  2. Zscaler Internet Access (ZIA)
  3. API Docs
  4. WorkloadGroups
Zscaler Internet Access v1.2.0 published on Friday, Feb 20, 2026 by Zscaler
zia logo
Zscaler Internet Access v1.2.0 published on Friday, Feb 20, 2026 by Zscaler

    Use the zia_workload_groups resource allows the creation and management of Workload Group objects in the Zscaler Internet Access. This resource can then be used as a criterion in ZIA policies such as, Firewall Filtering, URL Filtering, and Data Loss Prevention (DLP) to apply security policies to the workload traffic.

    Example Usage

    resource "zia_workload_groups" "example" {
      name = "Test Group"
      description = "Test Group"
    
      expression_json {
        expression_containers {
          tag_type = "ATTR"
          operator = "AND"
    
          tag_container {
            operator = "AND"
    
            tags {
              key   = "GroupName"
              value = "example"
            }
          }
        }
    
        expression_containers {
          tag_type = "ENI"
          operator = "AND"
    
          tag_container {
            operator = "AND"
    
            tags {
              key   = "GroupId"
              value = "123456789"
            }
          }
        }
    
        expression_containers {
          tag_type = "VPC"
          operator = "AND"
    
          tag_container {
            operator = "AND"
    
            tags {
              key   = "Vpc-id"
              value = "vpcid12344"
            }
          }
        }
    
        expression_containers {
          tag_type = "VM"
          operator = "AND"
    
          tag_container {
            operator = "AND"
    
            tags {
              key   = "IamInstanceProfile-Arn"
              value = "test01"
            }
          }
        }
      }
    }
    

    Create WorkloadGroups Resource

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

    Constructor syntax

    new WorkloadGroups(name: string, args?: WorkloadGroupsArgs, opts?: CustomResourceOptions);
    @overload
    def WorkloadGroups(resource_name: str,
                       args: Optional[WorkloadGroupsArgs] = None,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def WorkloadGroups(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       description: Optional[str] = None,
                       expression_jsons: Optional[Sequence[WorkloadGroupsExpressionJsonArgs]] = None,
                       name: Optional[str] = None)
    func NewWorkloadGroups(ctx *Context, name string, args *WorkloadGroupsArgs, opts ...ResourceOption) (*WorkloadGroups, error)
    public WorkloadGroups(string name, WorkloadGroupsArgs? args = null, CustomResourceOptions? opts = null)
    public WorkloadGroups(String name, WorkloadGroupsArgs args)
    public WorkloadGroups(String name, WorkloadGroupsArgs args, CustomResourceOptions options)
    
    type: zia:WorkloadGroups
    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 WorkloadGroupsArgs
    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 WorkloadGroupsArgs
    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 WorkloadGroupsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WorkloadGroupsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WorkloadGroupsArgs
    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 workloadGroupsResource = new Zia.WorkloadGroups("workloadGroupsResource", new()
    {
        Description = "string",
        ExpressionJsons = new[]
        {
            new Zia.Inputs.WorkloadGroupsExpressionJsonArgs
            {
                ExpressionContainers = new[]
                {
                    new Zia.Inputs.WorkloadGroupsExpressionJsonExpressionContainerArgs
                    {
                        Operator = "string",
                        TagContainers = new[]
                        {
                            new Zia.Inputs.WorkloadGroupsExpressionJsonExpressionContainerTagContainerArgs
                            {
                                Operator = "string",
                                Tags = new[]
                                {
                                    new Zia.Inputs.WorkloadGroupsExpressionJsonExpressionContainerTagContainerTagArgs
                                    {
                                        Key = "string",
                                        Value = "string",
                                    },
                                },
                            },
                        },
                        TagType = "string",
                    },
                },
            },
        },
        Name = "string",
    });
    
    example, err := zia.NewWorkloadGroups(ctx, "workloadGroupsResource", &zia.WorkloadGroupsArgs{
    	Description: pulumi.String("string"),
    	ExpressionJsons: zia.WorkloadGroupsExpressionJsonArray{
    		&zia.WorkloadGroupsExpressionJsonArgs{
    			ExpressionContainers: zia.WorkloadGroupsExpressionJsonExpressionContainerArray{
    				&zia.WorkloadGroupsExpressionJsonExpressionContainerArgs{
    					Operator: pulumi.String("string"),
    					TagContainers: zia.WorkloadGroupsExpressionJsonExpressionContainerTagContainerArray{
    						&zia.WorkloadGroupsExpressionJsonExpressionContainerTagContainerArgs{
    							Operator: pulumi.String("string"),
    							Tags: zia.WorkloadGroupsExpressionJsonExpressionContainerTagContainerTagArray{
    								&zia.WorkloadGroupsExpressionJsonExpressionContainerTagContainerTagArgs{
    									Key:   pulumi.String("string"),
    									Value: pulumi.String("string"),
    								},
    							},
    						},
    					},
    					TagType: pulumi.String("string"),
    				},
    			},
    		},
    	},
    	Name: pulumi.String("string"),
    })
    
    var workloadGroupsResource = new WorkloadGroups("workloadGroupsResource", WorkloadGroupsArgs.builder()
        .description("string")
        .expressionJsons(WorkloadGroupsExpressionJsonArgs.builder()
            .expressionContainers(WorkloadGroupsExpressionJsonExpressionContainerArgs.builder()
                .operator("string")
                .tagContainers(WorkloadGroupsExpressionJsonExpressionContainerTagContainerArgs.builder()
                    .operator("string")
                    .tags(WorkloadGroupsExpressionJsonExpressionContainerTagContainerTagArgs.builder()
                        .key("string")
                        .value("string")
                        .build())
                    .build())
                .tagType("string")
                .build())
            .build())
        .name("string")
        .build());
    
    workload_groups_resource = zia.WorkloadGroups("workloadGroupsResource",
        description="string",
        expression_jsons=[{
            "expression_containers": [{
                "operator": "string",
                "tag_containers": [{
                    "operator": "string",
                    "tags": [{
                        "key": "string",
                        "value": "string",
                    }],
                }],
                "tag_type": "string",
            }],
        }],
        name="string")
    
    const workloadGroupsResource = new zia.WorkloadGroups("workloadGroupsResource", {
        description: "string",
        expressionJsons: [{
            expressionContainers: [{
                operator: "string",
                tagContainers: [{
                    operator: "string",
                    tags: [{
                        key: "string",
                        value: "string",
                    }],
                }],
                tagType: "string",
            }],
        }],
        name: "string",
    });
    
    type: zia:WorkloadGroups
    properties:
        description: string
        expressionJsons:
            - expressionContainers:
                - operator: string
                  tagContainers:
                    - operator: string
                      tags:
                        - key: string
                          value: string
                  tagType: string
        name: string
    

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

    Description string
    (String) The description of the workload group.
    ExpressionJsons List<zscaler.PulumiPackage.Zia.Inputs.WorkloadGroupsExpressionJson>
    (List) The workload group expression containing tag types, tags, and their relationships represented in a JSON format.
    Name string
    (String) The name of the workload group.
    Description string
    (String) The description of the workload group.
    ExpressionJsons []WorkloadGroupsExpressionJsonArgs
    (List) The workload group expression containing tag types, tags, and their relationships represented in a JSON format.
    Name string
    (String) The name of the workload group.
    description String
    (String) The description of the workload group.
    expressionJsons List<WorkloadGroupsExpressionJson>
    (List) The workload group expression containing tag types, tags, and their relationships represented in a JSON format.
    name String
    (String) The name of the workload group.
    description string
    (String) The description of the workload group.
    expressionJsons WorkloadGroupsExpressionJson[]
    (List) The workload group expression containing tag types, tags, and their relationships represented in a JSON format.
    name string
    (String) The name of the workload group.
    description str
    (String) The description of the workload group.
    expression_jsons Sequence[WorkloadGroupsExpressionJsonArgs]
    (List) The workload group expression containing tag types, tags, and their relationships represented in a JSON format.
    name str
    (String) The name of the workload group.
    description String
    (String) The description of the workload group.
    expressionJsons List<Property Map>
    (List) The workload group expression containing tag types, tags, and their relationships represented in a JSON format.
    name String
    (String) The name of the workload group.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the WorkloadGroups resource produces the following output properties:

    GroupId int
    (Number) A unique identifier assigned to the workload group.
    Id string
    The provider-assigned unique ID for this managed resource.
    GroupId int
    (Number) A unique identifier assigned to the workload group.
    Id string
    The provider-assigned unique ID for this managed resource.
    groupId Integer
    (Number) A unique identifier assigned to the workload group.
    id String
    The provider-assigned unique ID for this managed resource.
    groupId number
    (Number) A unique identifier assigned to the workload group.
    id string
    The provider-assigned unique ID for this managed resource.
    group_id int
    (Number) A unique identifier assigned to the workload group.
    id str
    The provider-assigned unique ID for this managed resource.
    groupId Number
    (Number) A unique identifier assigned to the workload group.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing WorkloadGroups Resource

    Get an existing WorkloadGroups 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?: WorkloadGroupsState, opts?: CustomResourceOptions): WorkloadGroups
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            expression_jsons: Optional[Sequence[WorkloadGroupsExpressionJsonArgs]] = None,
            group_id: Optional[int] = None,
            name: Optional[str] = None) -> WorkloadGroups
    func GetWorkloadGroups(ctx *Context, name string, id IDInput, state *WorkloadGroupsState, opts ...ResourceOption) (*WorkloadGroups, error)
    public static WorkloadGroups Get(string name, Input<string> id, WorkloadGroupsState? state, CustomResourceOptions? opts = null)
    public static WorkloadGroups get(String name, Output<String> id, WorkloadGroupsState state, CustomResourceOptions options)
    resources:  _:    type: zia:WorkloadGroups    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
    (String) The description of the workload group.
    ExpressionJsons List<zscaler.PulumiPackage.Zia.Inputs.WorkloadGroupsExpressionJson>
    (List) The workload group expression containing tag types, tags, and their relationships represented in a JSON format.
    GroupId int
    (Number) A unique identifier assigned to the workload group.
    Name string
    (String) The name of the workload group.
    Description string
    (String) The description of the workload group.
    ExpressionJsons []WorkloadGroupsExpressionJsonArgs
    (List) The workload group expression containing tag types, tags, and their relationships represented in a JSON format.
    GroupId int
    (Number) A unique identifier assigned to the workload group.
    Name string
    (String) The name of the workload group.
    description String
    (String) The description of the workload group.
    expressionJsons List<WorkloadGroupsExpressionJson>
    (List) The workload group expression containing tag types, tags, and their relationships represented in a JSON format.
    groupId Integer
    (Number) A unique identifier assigned to the workload group.
    name String
    (String) The name of the workload group.
    description string
    (String) The description of the workload group.
    expressionJsons WorkloadGroupsExpressionJson[]
    (List) The workload group expression containing tag types, tags, and their relationships represented in a JSON format.
    groupId number
    (Number) A unique identifier assigned to the workload group.
    name string
    (String) The name of the workload group.
    description str
    (String) The description of the workload group.
    expression_jsons Sequence[WorkloadGroupsExpressionJsonArgs]
    (List) The workload group expression containing tag types, tags, and their relationships represented in a JSON format.
    group_id int
    (Number) A unique identifier assigned to the workload group.
    name str
    (String) The name of the workload group.
    description String
    (String) The description of the workload group.
    expressionJsons List<Property Map>
    (List) The workload group expression containing tag types, tags, and their relationships represented in a JSON format.
    groupId Number
    (Number) A unique identifier assigned to the workload group.
    name String
    (String) The name of the workload group.

    Supporting Types

    WorkloadGroupsExpressionJson, WorkloadGroupsExpressionJsonArgs

    ExpressionContainers List<zscaler.PulumiPackage.Zia.Inputs.WorkloadGroupsExpressionJsonExpressionContainer>
    (List) Contains one or more tag types (and associated tags) combined using logical operators within a workload group.
    ExpressionContainers []WorkloadGroupsExpressionJsonExpressionContainer
    (List) Contains one or more tag types (and associated tags) combined using logical operators within a workload group.
    expressionContainers List<WorkloadGroupsExpressionJsonExpressionContainer>
    (List) Contains one or more tag types (and associated tags) combined using logical operators within a workload group.
    expressionContainers WorkloadGroupsExpressionJsonExpressionContainer[]
    (List) Contains one or more tag types (and associated tags) combined using logical operators within a workload group.
    expression_containers Sequence[WorkloadGroupsExpressionJsonExpressionContainer]
    (List) Contains one or more tag types (and associated tags) combined using logical operators within a workload group.
    expressionContainers List<Property Map>
    (List) Contains one or more tag types (and associated tags) combined using logical operators within a workload group.

    WorkloadGroupsExpressionJsonExpressionContainer, WorkloadGroupsExpressionJsonExpressionContainerArgs

    Operator string
    (String) The logical operator (either AND or OR) used to combine the tags within a tag type. Returned values are: AND, OR.
    TagContainers List<zscaler.PulumiPackage.Zia.Inputs.WorkloadGroupsExpressionJsonExpressionContainerTagContainer>
    (List) Contains one or more tags and the logical operator used to combine the tags within a tag type.
    TagType string
    (String) The tag type selected from a predefined list. Returned values are: ANY, VPC, SUBNET, VM, ENI, ATTR.
    Operator string
    (String) The logical operator (either AND or OR) used to combine the tags within a tag type. Returned values are: AND, OR.
    TagContainers []WorkloadGroupsExpressionJsonExpressionContainerTagContainer
    (List) Contains one or more tags and the logical operator used to combine the tags within a tag type.
    TagType string
    (String) The tag type selected from a predefined list. Returned values are: ANY, VPC, SUBNET, VM, ENI, ATTR.
    operator String
    (String) The logical operator (either AND or OR) used to combine the tags within a tag type. Returned values are: AND, OR.
    tagContainers List<WorkloadGroupsExpressionJsonExpressionContainerTagContainer>
    (List) Contains one or more tags and the logical operator used to combine the tags within a tag type.
    tagType String
    (String) The tag type selected from a predefined list. Returned values are: ANY, VPC, SUBNET, VM, ENI, ATTR.
    operator string
    (String) The logical operator (either AND or OR) used to combine the tags within a tag type. Returned values are: AND, OR.
    tagContainers WorkloadGroupsExpressionJsonExpressionContainerTagContainer[]
    (List) Contains one or more tags and the logical operator used to combine the tags within a tag type.
    tagType string
    (String) The tag type selected from a predefined list. Returned values are: ANY, VPC, SUBNET, VM, ENI, ATTR.
    operator str
    (String) The logical operator (either AND or OR) used to combine the tags within a tag type. Returned values are: AND, OR.
    tag_containers Sequence[WorkloadGroupsExpressionJsonExpressionContainerTagContainer]
    (List) Contains one or more tags and the logical operator used to combine the tags within a tag type.
    tag_type str
    (String) The tag type selected from a predefined list. Returned values are: ANY, VPC, SUBNET, VM, ENI, ATTR.
    operator String
    (String) The logical operator (either AND or OR) used to combine the tags within a tag type. Returned values are: AND, OR.
    tagContainers List<Property Map>
    (List) Contains one or more tags and the logical operator used to combine the tags within a tag type.
    tagType String
    (String) The tag type selected from a predefined list. Returned values are: ANY, VPC, SUBNET, VM, ENI, ATTR.

    WorkloadGroupsExpressionJsonExpressionContainerTagContainer, WorkloadGroupsExpressionJsonExpressionContainerTagContainerArgs

    Operator string
    (String) The logical operator (either AND or OR) used to combine the tags within a tag type. Returned values are: AND, OR.
    Tags List<zscaler.PulumiPackage.Zia.Inputs.WorkloadGroupsExpressionJsonExpressionContainerTagContainerTag>
    (List) One or more tags, each consisting of a key-value pair, selected within a tag type. If multiple tags are present within a tag type, they are combined using a logical operator. Note: A maximum of 8 tags can be added to a workload group, irrespective of the number of tag types present.
    Operator string
    (String) The logical operator (either AND or OR) used to combine the tags within a tag type. Returned values are: AND, OR.
    Tags []WorkloadGroupsExpressionJsonExpressionContainerTagContainerTag
    (List) One or more tags, each consisting of a key-value pair, selected within a tag type. If multiple tags are present within a tag type, they are combined using a logical operator. Note: A maximum of 8 tags can be added to a workload group, irrespective of the number of tag types present.
    operator String
    (String) The logical operator (either AND or OR) used to combine the tags within a tag type. Returned values are: AND, OR.
    tags List<WorkloadGroupsExpressionJsonExpressionContainerTagContainerTag>
    (List) One or more tags, each consisting of a key-value pair, selected within a tag type. If multiple tags are present within a tag type, they are combined using a logical operator. Note: A maximum of 8 tags can be added to a workload group, irrespective of the number of tag types present.
    operator string
    (String) The logical operator (either AND or OR) used to combine the tags within a tag type. Returned values are: AND, OR.
    tags WorkloadGroupsExpressionJsonExpressionContainerTagContainerTag[]
    (List) One or more tags, each consisting of a key-value pair, selected within a tag type. If multiple tags are present within a tag type, they are combined using a logical operator. Note: A maximum of 8 tags can be added to a workload group, irrespective of the number of tag types present.
    operator str
    (String) The logical operator (either AND or OR) used to combine the tags within a tag type. Returned values are: AND, OR.
    tags Sequence[WorkloadGroupsExpressionJsonExpressionContainerTagContainerTag]
    (List) One or more tags, each consisting of a key-value pair, selected within a tag type. If multiple tags are present within a tag type, they are combined using a logical operator. Note: A maximum of 8 tags can be added to a workload group, irrespective of the number of tag types present.
    operator String
    (String) The logical operator (either AND or OR) used to combine the tags within a tag type. Returned values are: AND, OR.
    tags List<Property Map>
    (List) One or more tags, each consisting of a key-value pair, selected within a tag type. If multiple tags are present within a tag type, they are combined using a logical operator. Note: A maximum of 8 tags can be added to a workload group, irrespective of the number of tag types present.

    WorkloadGroupsExpressionJsonExpressionContainerTagContainerTag, WorkloadGroupsExpressionJsonExpressionContainerTagContainerTagArgs

    Key string
    (String) The key component present in the key-value pair contained in a tag.
    Value string
    (String) The value component present in the key-value pair contained in a tag.
    Key string
    (String) The key component present in the key-value pair contained in a tag.
    Value string
    (String) The value component present in the key-value pair contained in a tag.
    key String
    (String) The key component present in the key-value pair contained in a tag.
    value String
    (String) The value component present in the key-value pair contained in a tag.
    key string
    (String) The key component present in the key-value pair contained in a tag.
    value string
    (String) The value component present in the key-value pair contained in a tag.
    key str
    (String) The key component present in the key-value pair contained in a tag.
    value str
    (String) The value component present in the key-value pair contained in a tag.
    key String
    (String) The key component present in the key-value pair contained in a tag.
    value String
    (String) The value component present in the key-value pair contained in a tag.

    Import

    Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZIA configurations into Terraform-compliant HashiCorp Configuration Language. Visit

    zia_workload_groups can be imported by using <GROUP_ID> or <GROUP_NAME> as the import ID.

    For example:

    $ pulumi import zia:index/workloadGroups:WorkloadGroups example <group_id>
    

    or

    $ pulumi import zia:index/workloadGroups:WorkloadGroups example <group_name>
    

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

    Package Details

    Repository
    zia zscaler/pulumi-zia
    License
    MIT
    Notes
    This Pulumi package is based on the zia Terraform Provider.
    zia logo
    Zscaler Internet Access v1.2.0 published on Friday, Feb 20, 2026 by Zscaler
      Meet Neo: Your AI Platform Teammate