UNPKG

@bdzscaler/pulumi-zpa

Version:

A Pulumi package for creating and managing Zscaler Private Access (ZPA) cloud resources.

112 lines 4.63 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.BrowserCertificate = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * * [Official documentation](https://help.zscaler.com/zpa/about-web-server-certificates) * * [API documentation](https://help.zscaler.com/zpa/configuring-certificates-using-api) * * 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 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as zpa from "@bdzscaler/pulumi-zpa"; * * const foo = zpa.getBaCertificate({ * name: "example.acme.com", * }); * ``` * * ######### PASSWORDS OR RELATED CREDENTIALS ATTRIBUTES IN THIS FILE #########\ * ######### ARE FOR EXAMPLE ONLY AND NOT USED IN PRODUCTION SYSTEMS ########## * ```typescript * 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", * }); * ``` * * ## Let's Encrypt Certbot * * This example demonstrates generatoring a domain certificate with letsencrypt * certbot https://letsencrypt.org/getting-started/ * * 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` * * ## Import * * This resource does not support importing. */ class BrowserCertificate extends pulumi.CustomResource { /** * Get an existing BrowserCertificate resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new BrowserCertificate(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of BrowserCertificate. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === BrowserCertificate.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["certBlob"] = state ? state.certBlob : undefined; resourceInputs["certificate"] = state ? state.certificate : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["microtenantId"] = state ? state.microtenantId : undefined; resourceInputs["name"] = state ? state.name : undefined; } else { const args = argsOrState; resourceInputs["certBlob"] = args ? args.certBlob : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["microtenantId"] = args ? args.microtenantId : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["certificate"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(BrowserCertificate.__pulumiType, name, resourceInputs, opts); } } exports.BrowserCertificate = BrowserCertificate; /** @internal */ BrowserCertificate.__pulumiType = 'zpa:index/browserCertificate:BrowserCertificate'; //# sourceMappingURL=browserCertificate.js.map