zpa.BrowserCertificate
Explore with Pulumi AI
Use the zpa_ba_certificate creates a browser access certificate with a private key in the Zscaler Private Access cloud. This resource is required when creating a browser access application segment resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as zpa from "@pulumi/zpa";
const foo = zpa.getBaCertificate({
name: "example.acme.com",
});
import pulumi
import pulumi_zpa as zpa
foo = zpa.get_ba_certificate(name="example.acme.com")
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.GetBaCertificate(ctx, &zpa.GetBaCertificateArgs{
Name: pulumi.StringRef("example.acme.com"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zpa = Pulumi.Zpa;
return await Deployment.RunAsync(() =>
{
var foo = Zpa.GetBaCertificate.Invoke(new()
{
Name = "example.acme.com",
});
});
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.GetBaCertificateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var foo = ZpaFunctions.getBaCertificate(GetBaCertificateArgs.builder()
.name("example.acme.com")
.build());
}
}
variables:
foo:
fn::invoke:
Function: zpa:getBaCertificate
Arguments:
name: example.acme.com
######### PASSWORDS OR RELATED CREDENTIALS ATTRIBUTES IN THIS FILE #########
######### ARE FOR EXAMPLE ONLY AND NOT USED IN PRODUCTION SYSTEMS ##########
import * as pulumi from "@pulumi/pulumi";
import * as zpa from "@bdzscaler/pulumi-zpa";
// ZPA Browser Access resource
const _this = new zpa.BrowserCertificate("this", {
certBlob: `-----BEGIN PRIVATE KEY-----
MIIDyzCCArOgA
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIDyzCCArOgAwIBAgIUekBD+iu64583B3u5ew7Bqj2O5cQwDQYJKoZIhvcNAQEL
-----END CERTIFICATE-----
`,
description: "server.example.com",
});
import pulumi
import zscaler_pulumi_zpa as zpa
# ZPA Browser Access resource
this = zpa.BrowserCertificate("this",
cert_blob="""-----BEGIN PRIVATE KEY-----
MIIDyzCCArOgA
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIDyzCCArOgAwIBAgIUekBD+iu64583B3u5ew7Bqj2O5cQwDQYJKoZIhvcNAQEL
-----END CERTIFICATE-----
""",
description="server.example.com")
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 {
// ZPA Browser Access resource
_, err := zpa.NewBrowserCertificate(ctx, "this", &zpa.BrowserCertificateArgs{
CertBlob: pulumi.String(`-----BEGIN PRIVATE KEY-----
MIIDyzCCArOgA
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIDyzCCArOgAwIBAgIUekBD+iu64583B3u5ew7Bqj2O5cQwDQYJKoZIhvcNAQEL
-----END CERTIFICATE-----
`),
Description: pulumi.String("server.example.com"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zpa = Zscaler.Zpa;
return await Deployment.RunAsync(() =>
{
// ZPA Browser Access resource
var @this = new Zpa.BrowserCertificate("this", new()
{
CertBlob = @"-----BEGIN PRIVATE KEY-----
MIIDyzCCArOgA
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIDyzCCArOgAwIBAgIUekBD+iu64583B3u5ew7Bqj2O5cQwDQYJKoZIhvcNAQEL
-----END CERTIFICATE-----
",
Description = "server.example.com",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zpa.BrowserCertificate;
import com.pulumi.zpa.BrowserCertificateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// ZPA Browser Access resource
var this_ = new BrowserCertificate("this", BrowserCertificateArgs.builder()
.certBlob("""
-----BEGIN PRIVATE KEY-----
MIIDyzCCArOgA
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIDyzCCArOgAwIBAgIUekBD+iu64583B3u5ew7Bqj2O5cQwDQYJKoZIhvcNAQEL
-----END CERTIFICATE-----
""")
.description("server.example.com")
.build());
}
}
resources:
# ZPA Browser Access resource
this:
type: zpa:BrowserCertificate
properties:
certBlob: |+
-----BEGIN PRIVATE KEY-----
MIIDyzCCArOgA
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIDyzCCArOgAwIBAgIUekBD+iu64583B3u5ew7Bqj2O5cQwDQYJKoZIhvcNAQEL
-----END CERTIFICATE-----
description: server.example.com
Let’s Encrypt Certbot
This example demonstrates generatoring a domain certificate with letsencrypt certbot https://letsencrypt.org/getting-started/
$ certbot certonly --manual --preferred-challenges dns --key-type rsa -d [DOMAIN]
Use letsencrypt’s certbot to generate domain certificates in RSA output mode.
The generator’s output corresponds to zpa.BrowserCertificate
fields in the
following manner.
Zscaler Field | Certbot file |
---|---|
certblob | cert.pem |
certblob | privkey.pem |
Create BrowserCertificate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BrowserCertificate(name: string, args?: BrowserCertificateArgs, opts?: CustomResourceOptions);
@overload
def BrowserCertificate(resource_name: str,
args: Optional[BrowserCertificateArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def BrowserCertificate(resource_name: str,
opts: Optional[ResourceOptions] = None,
cert_blob: Optional[str] = None,
description: Optional[str] = None,
microtenant_id: Optional[str] = None,
name: Optional[str] = None)
func NewBrowserCertificate(ctx *Context, name string, args *BrowserCertificateArgs, opts ...ResourceOption) (*BrowserCertificate, error)
public BrowserCertificate(string name, BrowserCertificateArgs? args = null, CustomResourceOptions? opts = null)
public BrowserCertificate(String name, BrowserCertificateArgs args)
public BrowserCertificate(String name, BrowserCertificateArgs args, CustomResourceOptions options)
type: zpa:BrowserCertificate
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 BrowserCertificateArgs
- 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 BrowserCertificateArgs
- 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 BrowserCertificateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BrowserCertificateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BrowserCertificateArgs
- 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 browserCertificateResource = new Zpa.BrowserCertificate("browserCertificateResource", new()
{
CertBlob = "string",
Description = "string",
MicrotenantId = "string",
Name = "string",
});
example, err := zpa.NewBrowserCertificate(ctx, "browserCertificateResource", &zpa.BrowserCertificateArgs{
CertBlob: pulumi.String("string"),
Description: pulumi.String("string"),
MicrotenantId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var browserCertificateResource = new BrowserCertificate("browserCertificateResource", BrowserCertificateArgs.builder()
.certBlob("string")
.description("string")
.microtenantId("string")
.name("string")
.build());
browser_certificate_resource = zpa.BrowserCertificate("browserCertificateResource",
cert_blob="string",
description="string",
microtenant_id="string",
name="string")
const browserCertificateResource = new zpa.BrowserCertificate("browserCertificateResource", {
certBlob: "string",
description: "string",
microtenantId: "string",
name: "string",
});
type: zpa:BrowserCertificate
properties:
certBlob: string
description: string
microtenantId: string
name: string
BrowserCertificate 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 BrowserCertificate resource accepts the following input properties:
- Cert
Blob string - The description of the certificate
- Description string
- The description of the certificate
- Microtenant
Id string - The unique identifier of the Microtenant
- Name string
- The name of the certificate.
- Cert
Blob string - The description of the certificate
- Description string
- The description of the certificate
- Microtenant
Id string - The unique identifier of the Microtenant
- Name string
- The name of the certificate.
- cert
Blob String - The description of the certificate
- description String
- The description of the certificate
- microtenant
Id String - The unique identifier of the Microtenant
- name String
- The name of the certificate.
- cert
Blob string - The description of the certificate
- description string
- The description of the certificate
- microtenant
Id string - The unique identifier of the Microtenant
- name string
- The name of the certificate.
- cert_
blob str - The description of the certificate
- description str
- The description of the certificate
- microtenant_
id str - The unique identifier of the Microtenant
- name str
- The name of the certificate.
- cert
Blob String - The description of the certificate
- description String
- The description of the certificate
- microtenant
Id String - The unique identifier of the Microtenant
- name String
- The name of the certificate.
Outputs
All input properties are implicitly available as output properties. Additionally, the BrowserCertificate resource produces the following output properties:
- Certificate string
- The certificate text in PEM format
- Id string
- The provider-assigned unique ID for this managed resource.
- Certificate string
- The certificate text in PEM format
- Id string
- The provider-assigned unique ID for this managed resource.
- certificate String
- The certificate text in PEM format
- id String
- The provider-assigned unique ID for this managed resource.
- certificate string
- The certificate text in PEM format
- id string
- The provider-assigned unique ID for this managed resource.
- certificate str
- The certificate text in PEM format
- id str
- The provider-assigned unique ID for this managed resource.
- certificate String
- The certificate text in PEM format
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing BrowserCertificate Resource
Get an existing BrowserCertificate 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?: BrowserCertificateState, opts?: CustomResourceOptions): BrowserCertificate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cert_blob: Optional[str] = None,
certificate: Optional[str] = None,
description: Optional[str] = None,
microtenant_id: Optional[str] = None,
name: Optional[str] = None) -> BrowserCertificate
func GetBrowserCertificate(ctx *Context, name string, id IDInput, state *BrowserCertificateState, opts ...ResourceOption) (*BrowserCertificate, error)
public static BrowserCertificate Get(string name, Input<string> id, BrowserCertificateState? state, CustomResourceOptions? opts = null)
public static BrowserCertificate get(String name, Output<String> id, BrowserCertificateState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Cert
Blob string - The description of the certificate
- Certificate string
- The certificate text in PEM format
- Description string
- The description of the certificate
- Microtenant
Id string - The unique identifier of the Microtenant
- Name string
- The name of the certificate.
- Cert
Blob string - The description of the certificate
- Certificate string
- The certificate text in PEM format
- Description string
- The description of the certificate
- Microtenant
Id string - The unique identifier of the Microtenant
- Name string
- The name of the certificate.
- cert
Blob String - The description of the certificate
- certificate String
- The certificate text in PEM format
- description String
- The description of the certificate
- microtenant
Id String - The unique identifier of the Microtenant
- name String
- The name of the certificate.
- cert
Blob string - The description of the certificate
- certificate string
- The certificate text in PEM format
- description string
- The description of the certificate
- microtenant
Id string - The unique identifier of the Microtenant
- name string
- The name of the certificate.
- cert_
blob str - The description of the certificate
- certificate str
- The certificate text in PEM format
- description str
- The description of the certificate
- microtenant_
id str - The unique identifier of the Microtenant
- name str
- The name of the certificate.
- cert
Blob String - The description of the certificate
- certificate String
- The certificate text in PEM format
- description String
- The description of the certificate
- microtenant
Id String - The unique identifier of the Microtenant
- name String
- The name of the certificate.
Import
This resource does not support importing.
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
zpa
Terraform Provider.