published on Monday, Jun 29, 2026 by Zscaler
published on Monday, Jun 29, 2026 by Zscaler
The zpa_provisioning_key resource provides creates a provisioning key in the Zscaler Private Access portal. This resource can then be referenced in the following ZPA resources:
- App Connector Groups
- Service Edge Groups
Zenith Community - ZPA Provisioning Keys
Service Edge Provisioning Key Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as zpa from "@bdzscaler/pulumi-zpa";
// Retrieve the Service Edge Enrollment Certificate
const serviceEdge = zpa.getEnrollmentCert({
name: "Service Edge",
});
// Create a Service Edge Group
const serviceEdgeGroupNyc = new zpa.ServiceEdgeGroup("service_edge_group_nyc", {
name: "Service Edge Group New York",
description: "Service Edge Group New York",
upgradeDay: "SUNDAY",
upgradeTimeInSecs: "66600",
latitude: "40.7128",
longitude: "-73.935242",
location: "New York, NY, USA",
versionProfileId: "0",
});
// Create Provisioning Key for Service Edge Group
const testProvisioningKey = new zpa.ProvisioningKey("test_provisioning_key", {
name: "test-provisioning-key",
associationType: "SERVICE_EDGE_GRP",
maxUsage: "10",
enrollmentCertId: serviceEdge.then(serviceEdge => serviceEdge.id),
zcomponentId: serviceEdgeGroupNyc.id,
});
import pulumi
import pulumi_zpa as zpa
import zscaler_pulumi_zpa as zpa
# Retrieve the Service Edge Enrollment Certificate
service_edge = zpa.get_enrollment_cert(name="Service Edge")
# Create a Service Edge Group
service_edge_group_nyc = zpa.ServiceEdgeGroup("service_edge_group_nyc",
name="Service Edge Group New York",
description="Service Edge Group New York",
upgrade_day="SUNDAY",
upgrade_time_in_secs="66600",
latitude="40.7128",
longitude="-73.935242",
location="New York, NY, USA",
version_profile_id="0")
# Create Provisioning Key for Service Edge Group
test_provisioning_key = zpa.ProvisioningKey("test_provisioning_key",
name="test-provisioning-key",
association_type="SERVICE_EDGE_GRP",
max_usage="10",
enrollment_cert_id=service_edge.id,
zcomponent_id=service_edge_group_nyc.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 {
// Retrieve the Service Edge Enrollment Certificate
serviceEdge, err := zpa.GetEnrollmentCert(ctx, &zpa.GetEnrollmentCertArgs{
Name: pulumi.StringRef("Service Edge"),
}, nil)
if err != nil {
return err
}
// Create a Service Edge Group
serviceEdgeGroupNyc, err := zpa.NewServiceEdgeGroup(ctx, "service_edge_group_nyc", &zpa.ServiceEdgeGroupArgs{
Name: pulumi.String("Service Edge Group New York"),
Description: pulumi.String("Service Edge Group New York"),
UpgradeDay: pulumi.String("SUNDAY"),
UpgradeTimeInSecs: pulumi.String("66600"),
Latitude: pulumi.String("40.7128"),
Longitude: pulumi.String("-73.935242"),
Location: pulumi.String("New York, NY, USA"),
VersionProfileId: pulumi.String("0"),
})
if err != nil {
return err
}
// Create Provisioning Key for Service Edge Group
_, err = zpa.NewProvisioningKey(ctx, "test_provisioning_key", &zpa.ProvisioningKeyArgs{
Name: pulumi.String("test-provisioning-key"),
AssociationType: pulumi.String("SERVICE_EDGE_GRP"),
MaxUsage: pulumi.String("10"),
EnrollmentCertId: pulumi.String(serviceEdge.Id),
ZcomponentId: serviceEdgeGroupNyc.ID(),
})
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(() =>
{
// Retrieve the Service Edge Enrollment Certificate
var serviceEdge = Zpa.GetEnrollmentCert.Invoke(new()
{
Name = "Service Edge",
});
// Create a Service Edge Group
var serviceEdgeGroupNyc = new Zpa.ServiceEdgeGroup("service_edge_group_nyc", new()
{
Name = "Service Edge Group New York",
Description = "Service Edge Group New York",
UpgradeDay = "SUNDAY",
UpgradeTimeInSecs = "66600",
Latitude = "40.7128",
Longitude = "-73.935242",
Location = "New York, NY, USA",
VersionProfileId = "0",
});
// Create Provisioning Key for Service Edge Group
var testProvisioningKey = new Zpa.ProvisioningKey("test_provisioning_key", new()
{
Name = "test-provisioning-key",
AssociationType = "SERVICE_EDGE_GRP",
MaxUsage = "10",
EnrollmentCertId = serviceEdge.Apply(getEnrollmentCertResult => getEnrollmentCertResult.Id),
ZcomponentId = serviceEdgeGroupNyc.Id,
});
});
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.GetEnrollmentCertArgs;
import com.pulumi.zpa.ServiceEdgeGroup;
import com.pulumi.zpa.ServiceEdgeGroupArgs;
import com.pulumi.zpa.ProvisioningKey;
import com.pulumi.zpa.ProvisioningKeyArgs;
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) {
// Retrieve the Service Edge Enrollment Certificate
final var serviceEdge = ZpaFunctions.getEnrollmentCert(GetEnrollmentCertArgs.builder()
.name("Service Edge")
.build());
// Create a Service Edge Group
var serviceEdgeGroupNyc = new ServiceEdgeGroup("serviceEdgeGroupNyc", ServiceEdgeGroupArgs.builder()
.name("Service Edge Group New York")
.description("Service Edge Group New York")
.upgradeDay("SUNDAY")
.upgradeTimeInSecs("66600")
.latitude("40.7128")
.longitude("-73.935242")
.location("New York, NY, USA")
.versionProfileId("0")
.build());
// Create Provisioning Key for Service Edge Group
var testProvisioningKey = new ProvisioningKey("testProvisioningKey", ProvisioningKeyArgs.builder()
.name("test-provisioning-key")
.associationType("SERVICE_EDGE_GRP")
.maxUsage("10")
.enrollmentCertId(serviceEdge.id())
.zcomponentId(serviceEdgeGroupNyc.id())
.build());
}
}
resources:
# Create Provisioning Key for Service Edge Group
testProvisioningKey:
type: zpa:ProvisioningKey
name: test_provisioning_key
properties:
name: test-provisioning-key
associationType: SERVICE_EDGE_GRP
maxUsage: '10'
enrollmentCertId: ${serviceEdge.id}
zcomponentId: ${serviceEdgeGroupNyc.id}
# Create a Service Edge Group
serviceEdgeGroupNyc:
type: zpa:ServiceEdgeGroup
name: service_edge_group_nyc
properties:
name: Service Edge Group New York
description: Service Edge Group New York
upgradeDay: SUNDAY
upgradeTimeInSecs: '66600'
latitude: '40.7128'
longitude: '-73.935242'
location: New York, NY, USA
versionProfileId: '0'
variables:
# Retrieve the Service Edge Enrollment Certificate
serviceEdge:
fn::invoke:
function: zpa:getEnrollmentCert
arguments:
name: Service Edge
pulumi {
required_providers {
zpa = {
source = "pulumi/zpa"
}
}
}
data "zpa_getenrollmentcert" "serviceEdge" {
name = "Service Edge"
}
# Create Provisioning Key for Service Edge Group
resource "zpa_provisioningkey" "test_provisioning_key" {
name = "test-provisioning-key"
association_type = "SERVICE_EDGE_GRP"
max_usage = "10"
enrollment_cert_id = data.zpa_getenrollmentcert.serviceEdge.id
zcomponent_id = zpa_serviceedgegroup.service_edge_group_nyc.id
}
# Create a Service Edge Group
resource "zpa_serviceedgegroup" "service_edge_group_nyc" {
name = "Service Edge Group New York"
description = "Service Edge Group New York"
upgrade_day = "SUNDAY"
upgrade_time_in_secs = "66600"
latitude = "40.7128"
longitude = "-73.935242"
location = "New York, NY, USA"
version_profile_id = "0"
}
# Retrieve the Service Edge Enrollment Certificate
Accessing the Provisioning Key
The provisioning key value is required to onboard App Connector or Service Edge devices. The attribute is marked as sensitive to prevent accidental exposure in logs and console output, but it remains accessible through Terraform outputs and resource references.
Method 1: Using Terraform Output (Recommended)
import * as pulumi from "@pulumi/pulumi";
import * as zpa from "@bdzscaler/pulumi-zpa";
// Create provisioning key
const connectorKey = new zpa.ProvisioningKey("connector_key", {
name: "connector-provisioning-key",
associationType: "CONNECTOR_GRP",
maxUsage: "10",
enrollmentCertId: connector.id,
zcomponentId: example.id,
});
export const connectorProvisioningKey = connectorKey.ProvisioningKeyValue;
import pulumi
import zscaler_pulumi_zpa as zpa
# Create provisioning key
connector_key = zpa.ProvisioningKey("connector_key",
name="connector-provisioning-key",
association_type="CONNECTOR_GRP",
max_usage="10",
enrollment_cert_id=connector["id"],
zcomponent_id=example["id"])
pulumi.export("connectorProvisioningKey", connector_key.provisioning_key_value)
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 {
// Create provisioning key
connectorKey, err := zpa.NewProvisioningKey(ctx, "connector_key", &zpa.ProvisioningKeyArgs{
Name: pulumi.String("connector-provisioning-key"),
AssociationType: pulumi.String("CONNECTOR_GRP"),
MaxUsage: pulumi.String("10"),
EnrollmentCertId: pulumi.Any(connector.Id),
ZcomponentId: pulumi.Any(example.Id),
})
if err != nil {
return err
}
ctx.Export("connectorProvisioningKey", connectorKey.ProvisioningKeyValue)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zpa = zscaler.PulumiPackage.Zpa;
return await Deployment.RunAsync(() =>
{
// Create provisioning key
var connectorKey = new Zpa.ProvisioningKey("connector_key", new()
{
Name = "connector-provisioning-key",
AssociationType = "CONNECTOR_GRP",
MaxUsage = "10",
EnrollmentCertId = connector.Id,
ZcomponentId = example.Id,
});
return new Dictionary<string, object?>
{
["connectorProvisioningKey"] = connectorKey.ProvisioningKeyValue,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zpa.ProvisioningKey;
import com.pulumi.zpa.ProvisioningKeyArgs;
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) {
// Create provisioning key
var connectorKey = new ProvisioningKey("connectorKey", ProvisioningKeyArgs.builder()
.name("connector-provisioning-key")
.associationType("CONNECTOR_GRP")
.maxUsage("10")
.enrollmentCertId(connector.id())
.zcomponentId(example.id())
.build());
ctx.export("connectorProvisioningKey", connectorKey.ProvisioningKeyValue());
}
}
resources:
# Create provisioning key
connectorKey:
type: zpa:ProvisioningKey
name: connector_key
properties:
name: connector-provisioning-key
associationType: CONNECTOR_GRP
maxUsage: '10'
enrollmentCertId: ${connector.id}
zcomponentId: ${example.id}
outputs:
# Output the provisioning key (will be hidden in console output)
connectorProvisioningKey: ${connectorKey.ProvisioningKeyValue}
pulumi {
required_providers {
zpa = {
source = "pulumi/zpa"
}
}
}
# Create provisioning key
resource "zpa_provisioningkey" "connector_key" {
name = "connector-provisioning-key"
association_type = "CONNECTOR_GRP"
max_usage = "10"
enrollment_cert_id = connector.id
zcomponent_id = example.id
}
# Output the provisioning key (will be hidden in console output)
output "connectorProvisioningKey" {
value = zpa_provisioningkey.connector_key.provisioning_key_value
}
To retrieve the key value, use:
# View the provisioning key (will prompt for confirmation)
terraform output connector_provisioning_key
# Or retrieve programmatically
terraform output -json connector_provisioning_key | jq -r .
Method 2: Reference in Other Resources
import * as pulumi from "@pulumi/pulumi";
import * as _null from "@pulumi/null";
import * as command from "@pulumi/command";
// Use the provisioning key in automation scripts or other resources
const appConnectorDeployment = new _null.Resource("app_connector_deployment", {});
const appConnectorDeploymentProvisioner0 = new command.local.Command("appConnectorDeploymentProvisioner0", {create: `deploy-app-connector.sh ${connectorKey.provisioningKey}`}, {
dependsOn: [appConnectorDeployment],
});
import pulumi
import pulumi_command as command
import pulumi_null as null
# Use the provisioning key in automation scripts or other resources
app_connector_deployment = null.Resource("app_connector_deployment")
app_connector_deployment_provisioner0 = command.local.Command("appConnectorDeploymentProvisioner0", create=f"deploy-app-connector.sh {connector_key['provisioningKey']}",
opts = pulumi.ResourceOptions(depends_on=[app_connector_deployment]))
package main
import (
"github.com/pulumi/pulumi-command/sdk/go/command/local"
"github.com/pulumi/pulumi-null/sdk/go/null"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Use the provisioning key in automation scripts or other resources
appConnectorDeployment, err := null.NewResource(ctx, "app_connector_deployment", nil)
if err != nil {
return err
}
_, err = local.NewCommand(ctx, "appConnectorDeploymentProvisioner0", &local.CommandArgs{
Create: pulumi.Sprintf("deploy-app-connector.sh %v", connectorKey.ProvisioningKey),
}, pulumi.DependsOn([]pulumi.Resource{
appConnectorDeployment,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Command = Pulumi.Command;
using Null = Pulumi.Null;
return await Deployment.RunAsync(() =>
{
// Use the provisioning key in automation scripts or other resources
var appConnectorDeployment = new Null.Resource("app_connector_deployment");
var appConnectorDeploymentProvisioner0 = new Command.Local.Command("appConnectorDeploymentProvisioner0", new()
{
Create = $"deploy-app-connector.sh {connectorKey.ProvisioningKey}",
}, new CustomResourceOptions
{
DependsOn =
{
appConnectorDeployment,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.null.Resource;
import com.pulumi.command.local.Command;
import com.pulumi.command.local.CommandArgs;
import com.pulumi.resources.CustomResourceOptions;
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) {
// Use the provisioning key in automation scripts or other resources
var appConnectorDeployment = new Resource("appConnectorDeployment");
var appConnectorDeploymentProvisioner0 = new Command("appConnectorDeploymentProvisioner0", CommandArgs.builder()
.create(String.format("deploy-app-connector.sh %s", connectorKey.provisioningKey()))
.build(), CustomResourceOptions.builder()
.dependsOn(appConnectorDeployment)
.build());
}
}
resources:
# Use the provisioning key in automation scripts or other resources
appConnectorDeployment:
type: null:Resource
name: app_connector_deployment
appConnectorDeploymentProvisioner0:
type: command:local:Command
properties:
create: deploy-app-connector.sh ${connectorKey.provisioningKey}
options:
dependsOn:
- ${appConnectorDeployment}
pulumi {
required_providers {
command = {
source = "pulumi/command"
}
null = {
source = "pulumi/null"
}
}
}
# Use the provisioning key in automation scripts or other resources
resource "null_resource" "app_connector_deployment" {
}
resource "command_local_command" "appConnectorDeploymentProvisioner0" {
replace_on_changes = ["triggers[*]"]
depends_on = [null_resource.app_connector_deployment]
create ="deploy-app-connector.sh ${connectorKey.provisioningKey}"
}
Method 3: Using Data Source (For Existing Keys)
import * as pulumi from "@pulumi/pulumi";
import * as zpa from "@bdzscaler/pulumi-zpa";
// If the provisioning key already exists, use the data source
const existingKey = zpa.getProvisioningKey({
name: "existing-connector-key",
associationType: "CONNECTOR_GRP",
});
export const existingProvisioningKey = existingKey.then(existingKey => existingKey.provisioningKey);
import pulumi
import pulumi_zpa as zpa
# If the provisioning key already exists, use the data source
existing_key = zpa.get_provisioning_key(name="existing-connector-key",
association_type="CONNECTOR_GRP")
pulumi.export("existingProvisioningKey", existing_key.provisioning_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 {
// If the provisioning key already exists, use the data source
existingKey, err := zpa.GetProvisioningKey(ctx, &zpa.LookupProvisioningKeyArgs{
Name: pulumi.StringRef("existing-connector-key"),
AssociationType: "CONNECTOR_GRP",
}, nil)
if err != nil {
return err
}
ctx.Export("existingProvisioningKey", existingKey.ProvisioningKey)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zpa = zscaler.PulumiPackage.Zpa;
return await Deployment.RunAsync(() =>
{
// If the provisioning key already exists, use the data source
var existingKey = Zpa.GetProvisioningKey.Invoke(new()
{
Name = "existing-connector-key",
AssociationType = "CONNECTOR_GRP",
});
return new Dictionary<string, object?>
{
["existingProvisioningKey"] = existingKey.Apply(getProvisioningKeyResult => getProvisioningKeyResult.ProvisioningKey),
};
});
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.GetProvisioningKeyArgs;
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) {
// If the provisioning key already exists, use the data source
final var existingKey = ZpaFunctions.getProvisioningKey(GetProvisioningKeyArgs.builder()
.name("existing-connector-key")
.associationType("CONNECTOR_GRP")
.build());
ctx.export("existingProvisioningKey", existingKey.provisioningKey());
}
}
variables:
# If the provisioning key already exists, use the data source
existingKey:
fn::invoke:
function: zpa:getProvisioningKey
arguments:
name: existing-connector-key
associationType: CONNECTOR_GRP
outputs:
existingProvisioningKey: ${existingKey.provisioningKey}
pulumi {
required_providers {
zpa = {
source = "pulumi/zpa"
}
}
}
data "zpa_getprovisioningkey" "existingKey" {
name = "existing-connector-key"
association_type = "CONNECTOR_GRP"
}
# If the provisioning key already exists, use the data source
output "existingProvisioningKey" {
value = data.zpa_getprovisioningkey.existingKey.provisioning_key
}
Security Considerations
⚠️ Important Notes on Provisioning Key Security:
State File Storage: The provisioning key is stored in the Terraform state file. This is standard Terraform behavior for all resource attributes, including sensitive ones. The state file should be:
- Stored in a secure backend (e.g., Terraform Cloud, AWS S3 with encryption, Azure Blob Storage)
- Access-controlled using appropriate IAM policies
- Never committed to version control
Why the Key is in State: The provisioning key must be stored in state because:
- It’s returned by the ZPA API and is required for App Connector/Service Edge onboarding
- Terraform needs to track the value to detect drift and manage the resource lifecycle
- Users need programmatic access to deploy connectors
API Behavior: The ZPA API returns the provisioning key in clear text because it’s a necessary operational value, not a secret like passwords or API tokens. It’s used for device enrollment, similar to a registration token.
Best Practices:
- Use remote state backends with encryption at rest
- Implement state locking to prevent concurrent modifications
- Rotate provisioning keys periodically by creating new keys and updating deployments
- Use
maxUsagelimits to control key reuse - Monitor
usageCountto detect unauthorized usage - Enable
ipAclto restrict where the key can be used from
Create ProvisioningKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProvisioningKey(name: string, args: ProvisioningKeyArgs, opts?: CustomResourceOptions);@overload
def ProvisioningKey(resource_name: str,
args: ProvisioningKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProvisioningKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
max_usage: Optional[str] = None,
association_type: Optional[str] = None,
zcomponent_id: Optional[str] = None,
enrollment_cert_id: Optional[str] = None,
microtenant_id: Optional[str] = None,
ip_acls: Optional[Sequence[str]] = None,
app_connector_group_id: Optional[str] = None,
name: Optional[str] = None,
provisioning_key_id: Optional[str] = None,
ui_config: Optional[str] = None,
usage_count: Optional[str] = None,
enabled: Optional[bool] = None,
zcomponent_name: Optional[str] = None)func NewProvisioningKey(ctx *Context, name string, args ProvisioningKeyArgs, opts ...ResourceOption) (*ProvisioningKey, error)public ProvisioningKey(string name, ProvisioningKeyArgs args, CustomResourceOptions? opts = null)
public ProvisioningKey(String name, ProvisioningKeyArgs args)
public ProvisioningKey(String name, ProvisioningKeyArgs args, CustomResourceOptions options)
type: zpa:ProvisioningKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "zpa_provisioningkey" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ProvisioningKeyArgs
- 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 ProvisioningKeyArgs
- 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 ProvisioningKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProvisioningKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProvisioningKeyArgs
- 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 provisioningKeyResource = new Zpa.ProvisioningKey("provisioningKeyResource", new()
{
MaxUsage = "string",
AssociationType = "string",
ZcomponentId = "string",
EnrollmentCertId = "string",
MicrotenantId = "string",
IpAcls = new[]
{
"string",
},
AppConnectorGroupId = "string",
Name = "string",
ProvisioningKeyId = "string",
UiConfig = "string",
UsageCount = "string",
Enabled = false,
ZcomponentName = "string",
});
example, err := zpa.NewProvisioningKey(ctx, "provisioningKeyResource", &zpa.ProvisioningKeyArgs{
MaxUsage: pulumi.String("string"),
AssociationType: pulumi.String("string"),
ZcomponentId: pulumi.String("string"),
EnrollmentCertId: pulumi.String("string"),
MicrotenantId: pulumi.String("string"),
IpAcls: pulumi.StringArray{
pulumi.String("string"),
},
AppConnectorGroupId: pulumi.String("string"),
Name: pulumi.String("string"),
ProvisioningKeyId: pulumi.String("string"),
UiConfig: pulumi.String("string"),
UsageCount: pulumi.String("string"),
Enabled: pulumi.Bool(false),
ZcomponentName: pulumi.String("string"),
})
resource "zpa_provisioningkey" "provisioningKeyResource" {
max_usage = "string"
association_type = "string"
zcomponent_id = "string"
enrollment_cert_id = "string"
microtenant_id = "string"
ip_acls = ["string"]
app_connector_group_id = "string"
name = "string"
provisioning_key_id = "string"
ui_config = "string"
usage_count = "string"
enabled = false
zcomponent_name = "string"
}
var provisioningKeyResource = new ProvisioningKey("provisioningKeyResource", ProvisioningKeyArgs.builder()
.maxUsage("string")
.associationType("string")
.zcomponentId("string")
.enrollmentCertId("string")
.microtenantId("string")
.ipAcls("string")
.appConnectorGroupId("string")
.name("string")
.provisioningKeyId("string")
.uiConfig("string")
.usageCount("string")
.enabled(false)
.zcomponentName("string")
.build());
provisioning_key_resource = zpa.ProvisioningKey("provisioningKeyResource",
max_usage="string",
association_type="string",
zcomponent_id="string",
enrollment_cert_id="string",
microtenant_id="string",
ip_acls=["string"],
app_connector_group_id="string",
name="string",
provisioning_key_id="string",
ui_config="string",
usage_count="string",
enabled=False,
zcomponent_name="string")
const provisioningKeyResource = new zpa.ProvisioningKey("provisioningKeyResource", {
maxUsage: "string",
associationType: "string",
zcomponentId: "string",
enrollmentCertId: "string",
microtenantId: "string",
ipAcls: ["string"],
appConnectorGroupId: "string",
name: "string",
provisioningKeyId: "string",
uiConfig: "string",
usageCount: "string",
enabled: false,
zcomponentName: "string",
});
type: zpa:ProvisioningKey
properties:
appConnectorGroupId: string
associationType: string
enabled: false
enrollmentCertId: string
ipAcls:
- string
maxUsage: string
microtenantId: string
name: string
provisioningKeyId: string
uiConfig: string
usageCount: string
zcomponentId: string
zcomponentName: string
ProvisioningKey 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 ProvisioningKey resource accepts the following input properties:
- Association
Type string - Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are CONNECTOR_GRP and SERVICE_EDGE_GRP.
- Enrollment
Cert stringId - ID of the enrollment certificate that can be used for this provisioning key.
- Max
Usage string - The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
- Zcomponent
Id string - ID of the existing App Connector or Service Edge Group.
- App
Connector stringGroup Id - Enabled bool
- Whether the provisioning key is enabled or not. Supported values: true, false
- Ip
Acls List<string> - Microtenant
Id string - Name string
- Name of the provisioning key.
- Provisioning
Key stringId - Ui
Config string - Usage
Count string - The provisioning key utilization count.
- Zcomponent
Name string - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- Association
Type string - Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are CONNECTOR_GRP and SERVICE_EDGE_GRP.
- Enrollment
Cert stringId - ID of the enrollment certificate that can be used for this provisioning key.
- Max
Usage string - The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
- Zcomponent
Id string - ID of the existing App Connector or Service Edge Group.
- App
Connector stringGroup Id - Enabled bool
- Whether the provisioning key is enabled or not. Supported values: true, false
- Ip
Acls []string - Microtenant
Id string - Name string
- Name of the provisioning key.
- Provisioning
Key stringId - Ui
Config string - Usage
Count string - The provisioning key utilization count.
- Zcomponent
Name string - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- association_
type string - Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are CONNECTOR_GRP and SERVICE_EDGE_GRP.
- enrollment_
cert_ stringid - ID of the enrollment certificate that can be used for this provisioning key.
- max_
usage string - The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
- zcomponent_
id string - ID of the existing App Connector or Service Edge Group.
- app_
connector_ stringgroup_ id - enabled bool
- Whether the provisioning key is enabled or not. Supported values: true, false
- ip_
acls list(string) - microtenant_
id string - name string
- Name of the provisioning key.
- provisioning_
key_ stringid - ui_
config string - usage_
count string - The provisioning key utilization count.
- zcomponent_
name string - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- association
Type String - Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are CONNECTOR_GRP and SERVICE_EDGE_GRP.
- enrollment
Cert StringId - ID of the enrollment certificate that can be used for this provisioning key.
- max
Usage String - The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
- zcomponent
Id String - ID of the existing App Connector or Service Edge Group.
- app
Connector StringGroup Id - enabled Boolean
- Whether the provisioning key is enabled or not. Supported values: true, false
- ip
Acls List<String> - microtenant
Id String - name String
- Name of the provisioning key.
- provisioning
Key StringId - ui
Config String - usage
Count String - The provisioning key utilization count.
- zcomponent
Name String - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- association
Type string - Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are CONNECTOR_GRP and SERVICE_EDGE_GRP.
- enrollment
Cert stringId - ID of the enrollment certificate that can be used for this provisioning key.
- max
Usage string - The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
- zcomponent
Id string - ID of the existing App Connector or Service Edge Group.
- app
Connector stringGroup Id - enabled boolean
- Whether the provisioning key is enabled or not. Supported values: true, false
- ip
Acls string[] - microtenant
Id string - name string
- Name of the provisioning key.
- provisioning
Key stringId - ui
Config string - usage
Count string - The provisioning key utilization count.
- zcomponent
Name string - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- association_
type str - Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are CONNECTOR_GRP and SERVICE_EDGE_GRP.
- enrollment_
cert_ strid - ID of the enrollment certificate that can be used for this provisioning key.
- max_
usage str - The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
- zcomponent_
id str - ID of the existing App Connector or Service Edge Group.
- app_
connector_ strgroup_ id - enabled bool
- Whether the provisioning key is enabled or not. Supported values: true, false
- ip_
acls Sequence[str] - microtenant_
id str - name str
- Name of the provisioning key.
- provisioning_
key_ strid - ui_
config str - usage_
count str - The provisioning key utilization count.
- zcomponent_
name str - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- association
Type String - Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are CONNECTOR_GRP and SERVICE_EDGE_GRP.
- enrollment
Cert StringId - ID of the enrollment certificate that can be used for this provisioning key.
- max
Usage String - The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
- zcomponent
Id String - ID of the existing App Connector or Service Edge Group.
- app
Connector StringGroup Id - enabled Boolean
- Whether the provisioning key is enabled or not. Supported values: true, false
- ip
Acls List<String> - microtenant
Id String - name String
- Name of the provisioning key.
- provisioning
Key StringId - ui
Config String - usage
Count String - The provisioning key utilization count.
- zcomponent
Name String - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProvisioningKey resource produces the following output properties:
- App
Connector stringGroup Name - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- Id string
- The provider-assigned unique ID for this managed resource.
- Provisioning
Key stringValue - The provisioning key returned by the API. This value is required to onboard App Connector or Service Edge devices. Although marked as sensitive to prevent exposure in logs and console output, the value is stored in the Terraform state file and can be retrieved using 'terraform output' or by referencing the attribute in other resources.
- App
Connector stringGroup Name - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- Id string
- The provider-assigned unique ID for this managed resource.
- Provisioning
Key stringValue - The provisioning key returned by the API. This value is required to onboard App Connector or Service Edge devices. Although marked as sensitive to prevent exposure in logs and console output, the value is stored in the Terraform state file and can be retrieved using 'terraform output' or by referencing the attribute in other resources.
- app_
connector_ stringgroup_ name - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- id string
- The provider-assigned unique ID for this managed resource.
- provisioning_
key_ stringvalue - The provisioning key returned by the API. This value is required to onboard App Connector or Service Edge devices. Although marked as sensitive to prevent exposure in logs and console output, the value is stored in the Terraform state file and can be retrieved using 'terraform output' or by referencing the attribute in other resources.
- Provisioning
Key StringValue - The provisioning key returned by the API. This value is required to onboard App Connector or Service Edge devices. Although marked as sensitive to prevent exposure in logs and console output, the value is stored in the Terraform state file and can be retrieved using 'terraform output' or by referencing the attribute in other resources.
- app
Connector StringGroup Name - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- id String
- The provider-assigned unique ID for this managed resource.
- Provisioning
Key stringValue - The provisioning key returned by the API. This value is required to onboard App Connector or Service Edge devices. Although marked as sensitive to prevent exposure in logs and console output, the value is stored in the Terraform state file and can be retrieved using 'terraform output' or by referencing the attribute in other resources.
- app
Connector stringGroup Name - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- id string
- The provider-assigned unique ID for this managed resource.
- app_
connector_ strgroup_ name - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- id str
- The provider-assigned unique ID for this managed resource.
- provisioning_
key_ strvalue - The provisioning key returned by the API. This value is required to onboard App Connector or Service Edge devices. Although marked as sensitive to prevent exposure in logs and console output, the value is stored in the Terraform state file and can be retrieved using 'terraform output' or by referencing the attribute in other resources.
- Provisioning
Key StringValue - The provisioning key returned by the API. This value is required to onboard App Connector or Service Edge devices. Although marked as sensitive to prevent exposure in logs and console output, the value is stored in the Terraform state file and can be retrieved using 'terraform output' or by referencing the attribute in other resources.
- app
Connector StringGroup Name - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ProvisioningKey Resource
Get an existing ProvisioningKey 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?: ProvisioningKeyState, opts?: CustomResourceOptions): ProvisioningKey@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
provisioning_key_value: Optional[str] = None,
app_connector_group_id: Optional[str] = None,
app_connector_group_name: Optional[str] = None,
association_type: Optional[str] = None,
enabled: Optional[bool] = None,
enrollment_cert_id: Optional[str] = None,
ip_acls: Optional[Sequence[str]] = None,
max_usage: Optional[str] = None,
microtenant_id: Optional[str] = None,
name: Optional[str] = None,
provisioning_key_id: Optional[str] = None,
ui_config: Optional[str] = None,
usage_count: Optional[str] = None,
zcomponent_id: Optional[str] = None,
zcomponent_name: Optional[str] = None) -> ProvisioningKeyfunc GetProvisioningKey(ctx *Context, name string, id IDInput, state *ProvisioningKeyState, opts ...ResourceOption) (*ProvisioningKey, error)public static ProvisioningKey Get(string name, Input<string> id, ProvisioningKeyState? state, CustomResourceOptions? opts = null)public static ProvisioningKey get(String name, Output<String> id, ProvisioningKeyState state, CustomResourceOptions options)resources: _: type: zpa:ProvisioningKey get: id: ${id}import {
to = zpa_provisioningkey.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.
- App
Connector stringGroup Id - App
Connector stringGroup Name - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- Association
Type string - Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are CONNECTOR_GRP and SERVICE_EDGE_GRP.
- Enabled bool
- Whether the provisioning key is enabled or not. Supported values: true, false
- Enrollment
Cert stringId - ID of the enrollment certificate that can be used for this provisioning key.
- Ip
Acls List<string> - Max
Usage string - The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
- Microtenant
Id string - Name string
- Name of the provisioning key.
- Provisioning
Key stringId - Provisioning
Key stringValue - The provisioning key returned by the API. This value is required to onboard App Connector or Service Edge devices. Although marked as sensitive to prevent exposure in logs and console output, the value is stored in the Terraform state file and can be retrieved using 'terraform output' or by referencing the attribute in other resources.
- Ui
Config string - Usage
Count string - The provisioning key utilization count.
- Zcomponent
Id string - ID of the existing App Connector or Service Edge Group.
- Zcomponent
Name string - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- App
Connector stringGroup Id - App
Connector stringGroup Name - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- Association
Type string - Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are CONNECTOR_GRP and SERVICE_EDGE_GRP.
- Enabled bool
- Whether the provisioning key is enabled or not. Supported values: true, false
- Enrollment
Cert stringId - ID of the enrollment certificate that can be used for this provisioning key.
- Ip
Acls []string - Max
Usage string - The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
- Microtenant
Id string - Name string
- Name of the provisioning key.
- Provisioning
Key stringId - Provisioning
Key stringValue - The provisioning key returned by the API. This value is required to onboard App Connector or Service Edge devices. Although marked as sensitive to prevent exposure in logs and console output, the value is stored in the Terraform state file and can be retrieved using 'terraform output' or by referencing the attribute in other resources.
- Ui
Config string - Usage
Count string - The provisioning key utilization count.
- Zcomponent
Id string - ID of the existing App Connector or Service Edge Group.
- Zcomponent
Name string - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- app_
connector_ stringgroup_ id - app_
connector_ stringgroup_ name - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- association_
type string - Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are CONNECTOR_GRP and SERVICE_EDGE_GRP.
- enabled bool
- Whether the provisioning key is enabled or not. Supported values: true, false
- enrollment_
cert_ stringid - ID of the enrollment certificate that can be used for this provisioning key.
- ip_
acls list(string) - max_
usage string - The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
- microtenant_
id string - name string
- Name of the provisioning key.
- provisioning_
key_ stringid - provisioning_
key_ stringvalue - The provisioning key returned by the API. This value is required to onboard App Connector or Service Edge devices. Although marked as sensitive to prevent exposure in logs and console output, the value is stored in the Terraform state file and can be retrieved using 'terraform output' or by referencing the attribute in other resources.
- ui_
config string - usage_
count string - The provisioning key utilization count.
- zcomponent_
id string - ID of the existing App Connector or Service Edge Group.
- zcomponent_
name string - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- Provisioning
Key StringValue - The provisioning key returned by the API. This value is required to onboard App Connector or Service Edge devices. Although marked as sensitive to prevent exposure in logs and console output, the value is stored in the Terraform state file and can be retrieved using 'terraform output' or by referencing the attribute in other resources.
- app
Connector StringGroup Id - app
Connector StringGroup Name - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- association
Type String - Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are CONNECTOR_GRP and SERVICE_EDGE_GRP.
- enabled Boolean
- Whether the provisioning key is enabled or not. Supported values: true, false
- enrollment
Cert StringId - ID of the enrollment certificate that can be used for this provisioning key.
- ip
Acls List<String> - max
Usage String - The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
- microtenant
Id String - name String
- Name of the provisioning key.
- provisioning
Key StringId - ui
Config String - usage
Count String - The provisioning key utilization count.
- zcomponent
Id String - ID of the existing App Connector or Service Edge Group.
- zcomponent
Name String - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- Provisioning
Key stringValue - The provisioning key returned by the API. This value is required to onboard App Connector or Service Edge devices. Although marked as sensitive to prevent exposure in logs and console output, the value is stored in the Terraform state file and can be retrieved using 'terraform output' or by referencing the attribute in other resources.
- app
Connector stringGroup Id - app
Connector stringGroup Name - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- association
Type string - Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are CONNECTOR_GRP and SERVICE_EDGE_GRP.
- enabled boolean
- Whether the provisioning key is enabled or not. Supported values: true, false
- enrollment
Cert stringId - ID of the enrollment certificate that can be used for this provisioning key.
- ip
Acls string[] - max
Usage string - The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
- microtenant
Id string - name string
- Name of the provisioning key.
- provisioning
Key stringId - ui
Config string - usage
Count string - The provisioning key utilization count.
- zcomponent
Id string - ID of the existing App Connector or Service Edge Group.
- zcomponent
Name string - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- app_
connector_ strgroup_ id - app_
connector_ strgroup_ name - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- association_
type str - Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are CONNECTOR_GRP and SERVICE_EDGE_GRP.
- enabled bool
- Whether the provisioning key is enabled or not. Supported values: true, false
- enrollment_
cert_ strid - ID of the enrollment certificate that can be used for this provisioning key.
- ip_
acls Sequence[str] - max_
usage str - The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
- microtenant_
id str - name str
- Name of the provisioning key.
- provisioning_
key_ strid - provisioning_
key_ strvalue - The provisioning key returned by the API. This value is required to onboard App Connector or Service Edge devices. Although marked as sensitive to prevent exposure in logs and console output, the value is stored in the Terraform state file and can be retrieved using 'terraform output' or by referencing the attribute in other resources.
- ui_
config str - usage_
count str - The provisioning key utilization count.
- zcomponent_
id str - ID of the existing App Connector or Service Edge Group.
- zcomponent_
name str - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- Provisioning
Key StringValue - The provisioning key returned by the API. This value is required to onboard App Connector or Service Edge devices. Although marked as sensitive to prevent exposure in logs and console output, the value is stored in the Terraform state file and can be retrieved using 'terraform output' or by referencing the attribute in other resources.
- app
Connector StringGroup Id - app
Connector StringGroup Name - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
- association
Type String - Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are CONNECTOR_GRP and SERVICE_EDGE_GRP.
- enabled Boolean
- Whether the provisioning key is enabled or not. Supported values: true, false
- enrollment
Cert StringId - ID of the enrollment certificate that can be used for this provisioning key.
- ip
Acls List<String> - max
Usage String - The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge.
- microtenant
Id String - name String
- Name of the provisioning key.
- provisioning
Key StringId - ui
Config String - usage
Count String - The provisioning key utilization count.
- zcomponent
Id String - ID of the existing App Connector or Service Edge Group.
- zcomponent
Name String - Read only property. Applicable only for GET calls, ignored in PUT/POST calls.
Import
Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZPA configurations into Terraform-compliant HashiCorp Configuration Language. Visit
Provisioning key can be imported by using <PROVISIONING KEY ID> or <PROVISIONING KEY NAME> as the import ID.
For example:
$ pulumi import zpa:index/provisioningKey:ProvisioningKey example <provisioning_key_id>
or
$ pulumi import zpa:index/provisioningKey:ProvisioningKey example <provisioning_key_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