published on Monday, Jun 29, 2026 by Zscaler
published on Monday, Jun 29, 2026 by Zscaler
Use the zpa_tag_key data source to get information about a tag key in Zscaler Private Access (ZPA).
NOTE: This an Early Access feature.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as zpa from "@bdzscaler/pulumi-zpa";
const _this = zpa.getTagNamespace({
name: "Example Namespace",
});
const thisGetTagKey = _this.then(_this => zpa.getTagKey({
name: "Environment",
namespaceId: _this.id,
}));
export const zpaTagKey = thisGetTagKey;
import pulumi
import pulumi_zpa as zpa
this = zpa.get_tag_namespace(name="Example Namespace")
this_get_tag_key = zpa.get_tag_key(name="Environment",
namespace_id=this.id)
pulumi.export("zpaTagKey", this_get_tag_key)
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.GetTagNamespace(ctx, &zpa.LookupTagNamespaceArgs{
Name: pulumi.StringRef("Example Namespace"),
}, nil)
if err != nil {
return err
}
thisGetTagKey, err := zpa.GetTagKey(ctx, &zpa.LookupTagKeyArgs{
Name: pulumi.StringRef("Environment"),
NamespaceId: this.Id,
}, nil)
if err != nil {
return err
}
ctx.Export("zpaTagKey", thisGetTagKey)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zpa = zscaler.PulumiPackage.Zpa;
return await Deployment.RunAsync(() =>
{
var @this = Zpa.GetTagNamespace.Invoke(new()
{
Name = "Example Namespace",
});
var thisGetTagKey = Zpa.GetTagKey.Invoke(new()
{
Name = "Environment",
NamespaceId = @this.Apply(getTagNamespaceResult => getTagNamespaceResult.Id),
});
return new Dictionary<string, object?>
{
["zpaTagKey"] = thisGetTagKey,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zpa.ZpaFunctions;
import com.pulumi.zpa.inputs.GetTagNamespaceArgs;
import com.pulumi.zpa.inputs.GetTagKeyArgs;
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) {
final var this = ZpaFunctions.getTagNamespace(GetTagNamespaceArgs.builder()
.name("Example Namespace")
.build());
final var thisGetTagKey = ZpaFunctions.getTagKey(GetTagKeyArgs.builder()
.name("Environment")
.namespaceId(this_.id())
.build());
ctx.export("zpaTagKey", thisGetTagKey);
}
}
variables:
this:
fn::invoke:
function: zpa:getTagNamespace
arguments:
name: Example Namespace
thisGetTagKey:
fn::invoke:
function: zpa:getTagKey
arguments:
name: Environment
namespaceId: ${this.id}
outputs:
zpaTagKey: ${thisGetTagKey}
pulumi {
required_providers {
zpa = {
source = "pulumi/zpa"
}
}
}
data "zpa_gettagnamespace" "this" {
name = "Example Namespace"
}
data "zpa_gettagkey" "thisGetTagKey" {
name = "Environment"
namespace_id = data.zpa_gettagnamespace.this.id
}
output "zpaTagKey" {
value = data.zpa_gettagkey.thisGetTagKey
}
Using getTagKey
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 getTagKey(args: GetTagKeyArgs, opts?: InvokeOptions): Promise<GetTagKeyResult>
function getTagKeyOutput(args: GetTagKeyOutputArgs, opts?: InvokeOptions): Output<GetTagKeyResult>def get_tag_key(id: Optional[str] = None,
microtenant_id: Optional[str] = None,
name: Optional[str] = None,
namespace_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTagKeyResult
def get_tag_key_output(id: pulumi.Input[Optional[str]] = None,
microtenant_id: pulumi.Input[Optional[str]] = None,
name: pulumi.Input[Optional[str]] = None,
namespace_id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTagKeyResult]func LookupTagKey(ctx *Context, args *LookupTagKeyArgs, opts ...InvokeOption) (*LookupTagKeyResult, error)
func LookupTagKeyOutput(ctx *Context, args *LookupTagKeyOutputArgs, opts ...InvokeOption) LookupTagKeyResultOutput> Note: This function is named LookupTagKey in the Go SDK.
public static class GetTagKey
{
public static Task<GetTagKeyResult> InvokeAsync(GetTagKeyArgs args, InvokeOptions? opts = null)
public static Output<GetTagKeyResult> Invoke(GetTagKeyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTagKeyResult> getTagKey(GetTagKeyArgs args, InvokeOptions options)
public static Output<GetTagKeyResult> getTagKey(GetTagKeyArgs args, InvokeOptions options)
fn::invoke:
function: zpa:index/getTagKey:getTagKey
arguments:
# arguments dictionarydata "zpa_get_tag_key" "name" {
# arguments
}The following arguments are supported:
- Namespace
Id string - The ID of the tag namespace this key belongs to.
- Id string
- The ID of the tag key.
- Microtenant
Id string The ID of the microtenant.
NOTE:
idandnameare mutually exclusive but at least one must be provided.- Name string
- The name of the tag key.
- Namespace
Id string - The ID of the tag namespace this key belongs to.
- Id string
- The ID of the tag key.
- Microtenant
Id string The ID of the microtenant.
NOTE:
idandnameare mutually exclusive but at least one must be provided.- Name string
- The name of the tag key.
- namespace_
id string - The ID of the tag namespace this key belongs to.
- id string
- The ID of the tag key.
- microtenant_
id string The ID of the microtenant.
NOTE:
idandnameare mutually exclusive but at least one must be provided.- name string
- The name of the tag key.
- namespace
Id String - The ID of the tag namespace this key belongs to.
- id String
- The ID of the tag key.
- microtenant
Id String The ID of the microtenant.
NOTE:
idandnameare mutually exclusive but at least one must be provided.- name String
- The name of the tag key.
- namespace
Id string - The ID of the tag namespace this key belongs to.
- id string
- The ID of the tag key.
- microtenant
Id string The ID of the microtenant.
NOTE:
idandnameare mutually exclusive but at least one must be provided.- name string
- The name of the tag key.
- namespace_
id str - The ID of the tag namespace this key belongs to.
- id str
- The ID of the tag key.
- microtenant_
id str The ID of the microtenant.
NOTE:
idandnameare mutually exclusive but at least one must be provided.- name str
- The name of the tag key.
- namespace
Id String - The ID of the tag namespace this key belongs to.
- id String
- The ID of the tag key.
- microtenant
Id String The ID of the microtenant.
NOTE:
idandnameare mutually exclusive but at least one must be provided.- name String
- The name of the tag key.
getTagKey Result
The following output properties are available:
- Customer
Id string - The customer ID.
- Description string
- The description of the tag key.
- Enabled bool
- Whether the tag key is enabled.
- Microtenant
Name string - The name of the microtenant.
- Namespace
Id string - Origin string
- The origin of the tag key.
- Tag
Values List<zscaler.Pulumi Package. Zpa. Outputs. Get Tag Key Tag Value> - A list of tag values. Each element contains:
- Type string
- The type of the tag key.
- Id string
- The ID of the tag value.
- Microtenant
Id string - The ID of the microtenant.
- Name string
- The name of the tag value.
- Customer
Id string - The customer ID.
- Description string
- The description of the tag key.
- Enabled bool
- Whether the tag key is enabled.
- Microtenant
Name string - The name of the microtenant.
- Namespace
Id string - Origin string
- The origin of the tag key.
- Tag
Values []GetTag Key Tag Value - A list of tag values. Each element contains:
- Type string
- The type of the tag key.
- Id string
- The ID of the tag value.
- Microtenant
Id string - The ID of the microtenant.
- Name string
- The name of the tag value.
- customer_
id string - The customer ID.
- description string
- The description of the tag key.
- enabled bool
- Whether the tag key is enabled.
- microtenant_
name string - The name of the microtenant.
- namespace_
id string - origin string
- The origin of the tag key.
- tag_
values list(object) - A list of tag values. Each element contains:
- type string
- The type of the tag key.
- id string
- The ID of the tag value.
- microtenant_
id string - The ID of the microtenant.
- name string
- The name of the tag value.
- customer
Id String - The customer ID.
- description String
- The description of the tag key.
- enabled Boolean
- Whether the tag key is enabled.
- microtenant
Name String - The name of the microtenant.
- namespace
Id String - origin String
- The origin of the tag key.
- tag
Values List<GetTag Key Tag Value> - A list of tag values. Each element contains:
- type String
- The type of the tag key.
- id String
- The ID of the tag value.
- microtenant
Id String - The ID of the microtenant.
- name String
- The name of the tag value.
- customer
Id string - The customer ID.
- description string
- The description of the tag key.
- enabled boolean
- Whether the tag key is enabled.
- microtenant
Name string - The name of the microtenant.
- namespace
Id string - origin string
- The origin of the tag key.
- tag
Values GetTag Key Tag Value[] - A list of tag values. Each element contains:
- type string
- The type of the tag key.
- id string
- The ID of the tag value.
- microtenant
Id string - The ID of the microtenant.
- name string
- The name of the tag value.
- customer_
id str - The customer ID.
- description str
- The description of the tag key.
- enabled bool
- Whether the tag key is enabled.
- microtenant_
name str - The name of the microtenant.
- namespace_
id str - origin str
- The origin of the tag key.
- tag_
values Sequence[GetTag Key Tag Value] - A list of tag values. Each element contains:
- type str
- The type of the tag key.
- id str
- The ID of the tag value.
- microtenant_
id str - The ID of the microtenant.
- name str
- The name of the tag value.
- customer
Id String - The customer ID.
- description String
- The description of the tag key.
- enabled Boolean
- Whether the tag key is enabled.
- microtenant
Name String - The name of the microtenant.
- namespace
Id String - origin String
- The origin of the tag key.
- tag
Values List<Property Map> - A list of tag values. Each element contains:
- type String
- The type of the tag key.
- id String
- The ID of the tag value.
- microtenant
Id String - The ID of the microtenant.
- name String
- The name of the tag value.
Supporting Types
GetTagKeyTagValue
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