published on Monday, Jun 29, 2026 by Zscaler
published on Monday, Jun 29, 2026 by Zscaler
The zpa_tag_group resource creates and manages tag groups in Zscaler Private Access (ZPA). A tag group associates tag values together.
NOTE: This an Early Access feature.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as zpa from "@bdzscaler/pulumi-zpa";
const _this = new zpa.TagGroup("this", {
name: "Example Tag Group",
description: "An example tag group",
});
import pulumi
import zscaler_pulumi_zpa as zpa
this = zpa.TagGroup("this",
name="Example Tag Group",
description="An example tag group")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/zscaler/pulumi-zpa/sdk/go/zpa"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := zpa.NewTagGroup(ctx, "this", &zpa.TagGroupArgs{
Name: pulumi.String("Example Tag Group"),
Description: pulumi.String("An example tag group"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zpa = zscaler.PulumiPackage.Zpa;
return await Deployment.RunAsync(() =>
{
var @this = new Zpa.TagGroup("this", new()
{
Name = "Example Tag Group",
Description = "An example tag group",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zpa.TagGroup;
import com.pulumi.zpa.TagGroupArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 this_ = new TagGroup("this", TagGroupArgs.builder()
.name("Example Tag Group")
.description("An example tag group")
.build());
}
}
resources:
this:
type: zpa:TagGroup
properties:
name: Example Tag Group
description: An example tag group
pulumi {
required_providers {
zpa = {
source = "pulumi/zpa"
}
}
}
resource "zpa_taggroup" "this" {
name = "Example Tag Group"
description = "An example tag group"
}
With Tag Values
import * as pulumi from "@pulumi/pulumi";
import * as zpa from "@bdzscaler/pulumi-zpa";
const _this = new zpa.TagNamespace("this", {
name: "Example Namespace",
description: "An example tag namespace",
enabled: true,
});
const thisTagKey = new zpa.TagKey("this", {
name: "Environment",
description: "Environment tag key",
enabled: true,
namespaceId: _this.id,
tagValues: [
{
name: "Production",
},
{
name: "Staging",
},
],
});
const thisTagGroup = new zpa.TagGroup("this", {
name: "Example Tag Group",
description: "An example tag group",
tags: [
thisTagKey.tagValues.apply(tagValues => tagValues?.[0]?.id),
thisTagKey.tagValues.apply(tagValues => tagValues?.[1]?.id),
],
});
import pulumi
import zscaler_pulumi_zpa as zpa
this = zpa.TagNamespace("this",
name="Example Namespace",
description="An example tag namespace",
enabled=True)
this_tag_key = zpa.TagKey("this",
name="Environment",
description="Environment tag key",
enabled=True,
namespace_id=this.id,
tag_values=[
{
"name": "Production",
},
{
"name": "Staging",
},
])
this_tag_group = zpa.TagGroup("this",
name="Example Tag Group",
description="An example tag group",
tags=[
this_tag_key.tag_values[0].id,
this_tag_key.tag_values[1].id,
])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/zscaler/pulumi-zpa/sdk/go/zpa"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
this, err := zpa.NewTagNamespace(ctx, "this", &zpa.TagNamespaceArgs{
Name: pulumi.String("Example Namespace"),
Description: pulumi.String("An example tag namespace"),
Enabled: pulumi.Bool(true),
})
if err != nil {
return err
}
thisTagKey, err := zpa.NewTagKey(ctx, "this", &zpa.TagKeyArgs{
Name: pulumi.String("Environment"),
Description: pulumi.String("Environment tag key"),
Enabled: pulumi.Bool(true),
NamespaceId: this.ID(),
TagValues: zpa.TagKeyTagValueArray{
&zpa.TagKeyTagValueArgs{
Name: pulumi.String("Production"),
},
&zpa.TagKeyTagValueArgs{
Name: pulumi.String("Staging"),
},
},
})
if err != nil {
return err
}
_, err = zpa.NewTagGroup(ctx, "this", &zpa.TagGroupArgs{
Name: pulumi.String("Example Tag Group"),
Description: pulumi.String("An example tag group"),
Tags: pulumi.StringArray{
pulumi.String(thisTagKey.TagValues.ApplyT(func(tagValues []zpa.TagKeyTagValue) (*string, error) {
return tagValues[0].Id, nil
}).(pulumi.StringPtrOutput)),
pulumi.String(thisTagKey.TagValues.ApplyT(func(tagValues []zpa.TagKeyTagValue) (*string, error) {
return tagValues[1].Id, nil
}).(pulumi.StringPtrOutput)),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zpa = zscaler.PulumiPackage.Zpa;
return await Deployment.RunAsync(() =>
{
var @this = new Zpa.TagNamespace("this", new()
{
Name = "Example Namespace",
Description = "An example tag namespace",
Enabled = true,
});
var thisTagKey = new Zpa.TagKey("this", new()
{
Name = "Environment",
Description = "Environment tag key",
Enabled = true,
NamespaceId = @this.Id,
TagValues = new[]
{
new Zpa.Inputs.TagKeyTagValueArgs
{
Name = "Production",
},
new Zpa.Inputs.TagKeyTagValueArgs
{
Name = "Staging",
},
},
});
var thisTagGroup = new Zpa.TagGroup("this", new()
{
Name = "Example Tag Group",
Description = "An example tag group",
Tags = new[]
{
thisTagKey.TagValues.Apply(tagValues => tagValues[0]?.Id),
thisTagKey.TagValues.Apply(tagValues => tagValues[1]?.Id),
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zpa.TagNamespace;
import com.pulumi.zpa.TagNamespaceArgs;
import com.pulumi.zpa.TagKey;
import com.pulumi.zpa.TagKeyArgs;
import com.pulumi.zpa.inputs.TagKeyTagValueArgs;
import com.pulumi.zpa.TagGroup;
import com.pulumi.zpa.TagGroupArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 this_ = new TagNamespace("this", TagNamespaceArgs.builder()
.name("Example Namespace")
.description("An example tag namespace")
.enabled(true)
.build());
var thisTagKey = new TagKey("thisTagKey", TagKeyArgs.builder()
.name("Environment")
.description("Environment tag key")
.enabled(true)
.namespaceId(this_.id())
.tagValues(
TagKeyTagValueArgs.builder()
.name("Production")
.build(),
TagKeyTagValueArgs.builder()
.name("Staging")
.build())
.build());
var thisTagGroup = new TagGroup("thisTagGroup", TagGroupArgs.builder()
.name("Example Tag Group")
.description("An example tag group")
.tags(
thisTagKey.tagValues().applyValue(_tagValues -> _tagValues[0].id()),
thisTagKey.tagValues().applyValue(_tagValues -> _tagValues[1].id()))
.build());
}
}
resources:
this:
type: zpa:TagNamespace
properties:
name: Example Namespace
description: An example tag namespace
enabled: true
thisTagKey:
type: zpa:TagKey
name: this
properties:
name: Environment
description: Environment tag key
enabled: true
namespaceId: ${this.id}
tagValues:
- name: Production
- name: Staging
thisTagGroup:
type: zpa:TagGroup
name: this
properties:
name: Example Tag Group
description: An example tag group
tags:
- ${thisTagKey.tagValues[0].id}
- ${thisTagKey.tagValues[1].id}
pulumi {
required_providers {
zpa = {
source = "pulumi/zpa"
}
}
}
resource "zpa_tagnamespace" "this" {
name = "Example Namespace"
description = "An example tag namespace"
enabled = true
}
resource "zpa_tagkey" "this" {
name = "Environment"
description = "Environment tag key"
enabled = true
namespace_id = zpa_tagnamespace.this.id
tag_values {
name = "Production"
}
tag_values {
name = "Staging"
}
}
resource "zpa_taggroup" "this" {
name = "Example Tag Group"
description = "An example tag group"
tags = [zpa_tagkey.this.tag_values[0].id, zpa_tagkey.this.tag_values[1].id]
}
Create TagGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TagGroup(name: string, args?: TagGroupArgs, opts?: CustomResourceOptions);@overload
def TagGroup(resource_name: str,
args: Optional[TagGroupArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def TagGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
microtenant_id: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Sequence[str]] = None)func NewTagGroup(ctx *Context, name string, args *TagGroupArgs, opts ...ResourceOption) (*TagGroup, error)public TagGroup(string name, TagGroupArgs? args = null, CustomResourceOptions? opts = null)
public TagGroup(String name, TagGroupArgs args)
public TagGroup(String name, TagGroupArgs args, CustomResourceOptions options)
type: zpa:TagGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "zpa_tag_group" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args TagGroupArgs
- 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 TagGroupArgs
- 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 TagGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TagGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TagGroupArgs
- 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 tagGroupResource = new Zpa.TagGroup("tagGroupResource", new()
{
Description = "string",
MicrotenantId = "string",
Name = "string",
Tags = new[]
{
"string",
},
});
example, err := zpa.NewTagGroup(ctx, "tagGroupResource", &zpa.TagGroupArgs{
Description: pulumi.String("string"),
MicrotenantId: pulumi.String("string"),
Name: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
resource "zpa_tag_group" "tagGroupResource" {
lifecycle {
create_before_destroy = true
}
description = "string"
microtenant_id = "string"
name = "string"
tags = ["string"]
}
var tagGroupResource = new TagGroup("tagGroupResource", TagGroupArgs.builder()
.description("string")
.microtenantId("string")
.name("string")
.tags("string")
.build());
tag_group_resource = zpa.TagGroup("tagGroupResource",
description="string",
microtenant_id="string",
name="string",
tags=["string"])
const tagGroupResource = new zpa.TagGroup("tagGroupResource", {
description: "string",
microtenantId: "string",
name: "string",
tags: ["string"],
});
type: zpa:TagGroup
properties:
description: string
microtenantId: string
name: string
tags:
- string
TagGroup 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 TagGroup resource accepts the following input properties:
- Description string
- Description of the tag group
- Microtenant
Id string - Microtenant ID
- Name string
- Name of the tag group
- List<string>
- Set of tag value IDs associated with this tag group
- Description string
- Description of the tag group
- Microtenant
Id string - Microtenant ID
- Name string
- Name of the tag group
- []string
- Set of tag value IDs associated with this tag group
- description string
- Description of the tag group
- microtenant_
id string - Microtenant ID
- name string
- Name of the tag group
- list(string)
- Set of tag value IDs associated with this tag group
- description String
- Description of the tag group
- microtenant
Id String - Microtenant ID
- name String
- Name of the tag group
- List<String>
- Set of tag value IDs associated with this tag group
- description string
- Description of the tag group
- microtenant
Id string - Microtenant ID
- name string
- Name of the tag group
- string[]
- Set of tag value IDs associated with this tag group
- description str
- Description of the tag group
- microtenant_
id str - Microtenant ID
- name str
- Name of the tag group
- Sequence[str]
- Set of tag value IDs associated with this tag group
- description String
- Description of the tag group
- microtenant
Id String - Microtenant ID
- name String
- Name of the tag group
- List<String>
- Set of tag value IDs associated with this tag group
Outputs
All input properties are implicitly available as output properties. Additionally, the TagGroup 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 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 TagGroup Resource
Get an existing TagGroup 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?: TagGroupState, opts?: CustomResourceOptions): TagGroup@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
microtenant_id: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Sequence[str]] = None) -> TagGroupfunc GetTagGroup(ctx *Context, name string, id IDInput, state *TagGroupState, opts ...ResourceOption) (*TagGroup, error)public static TagGroup Get(string name, Input<string> id, TagGroupState? state, CustomResourceOptions? opts = null)public static TagGroup get(String name, Output<String> id, TagGroupState state, CustomResourceOptions options)resources: _: type: zpa:TagGroup get: id: ${id}import {
to = zpa_tag_group.example
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.
- Description string
- Description of the tag group
- Microtenant
Id string - Microtenant ID
- Name string
- Name of the tag group
- List<string>
- Set of tag value IDs associated with this tag group
- Description string
- Description of the tag group
- Microtenant
Id string - Microtenant ID
- Name string
- Name of the tag group
- []string
- Set of tag value IDs associated with this tag group
- description string
- Description of the tag group
- microtenant_
id string - Microtenant ID
- name string
- Name of the tag group
- list(string)
- Set of tag value IDs associated with this tag group
- description String
- Description of the tag group
- microtenant
Id String - Microtenant ID
- name String
- Name of the tag group
- List<String>
- Set of tag value IDs associated with this tag group
- description string
- Description of the tag group
- microtenant
Id string - Microtenant ID
- name string
- Name of the tag group
- string[]
- Set of tag value IDs associated with this tag group
- description str
- Description of the tag group
- microtenant_
id str - Microtenant ID
- name str
- Name of the tag group
- Sequence[str]
- Set of tag value IDs associated with this tag group
- description String
- Description of the tag group
- microtenant
Id String - Microtenant ID
- name String
- Name of the tag group
- List<String>
- Set of tag value IDs associated with this tag group
Import
Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZPA configurations into Terraform-compliant HashiCorp Configuration Language. Visit
zpa_tag_group can be imported by using <TAG GROUP ID> or <TAG GROUP NAME> as the import ID.
For example:
$ pulumi import zpa:index/tagGroup:TagGroup example <tag_group_id>
or
$ pulumi import zpa:index/tagGroup:TagGroup example <tag_group_name>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- zpa zscaler/pulumi-zpa
- License
- MIT
- Notes
- This Pulumi package is based on the
zpaTerraform Provider.
published on Monday, Jun 29, 2026 by Zscaler