@bdzscaler/pulumi-zia
Version:
A Pulumi package for creating and managing zia cloud resources.
71 lines • 5.45 kB
JavaScript
;
// *** 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.Provider = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* The provider type for the zia package. By default, resources use package-wide configuration
* settings, however an explicit `Provider` instance may be created and passed during resource
* construction to achieve fine-grained programmatic control over provider settings. See the
* [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
*/
class Provider extends pulumi.ProviderResource {
/**
* Returns true if the given object is an instance of Provider. 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'] === "pulumi:providers:" + Provider.__pulumiType;
}
/**
* Create a Provider resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name, args, opts) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
let resourceInputs = {};
opts = opts || {};
{
resourceInputs["apiKey"] = (_a = ((args === null || args === void 0 ? void 0 : args.apiKey) ? pulumi.secret(args.apiKey) : undefined)) !== null && _a !== void 0 ? _a : utilities.getEnv("ZIA_API_KEY");
resourceInputs["clientId"] = (_b = (args ? args.clientId : undefined)) !== null && _b !== void 0 ? _b : utilities.getEnv("ZSCALER_CLIENT_ID");
resourceInputs["clientSecret"] = (_c = ((args === null || args === void 0 ? void 0 : args.clientSecret) ? pulumi.secret(args.clientSecret) : undefined)) !== null && _c !== void 0 ? _c : utilities.getEnv("ZSCALER_CLIENT_SECRET");
resourceInputs["httpProxy"] = args ? args.httpProxy : undefined;
resourceInputs["maxRetries"] = pulumi.output(args ? args.maxRetries : undefined).apply(JSON.stringify);
resourceInputs["parallelism"] = pulumi.output(args ? args.parallelism : undefined).apply(JSON.stringify);
resourceInputs["password"] = (_d = ((args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined)) !== null && _d !== void 0 ? _d : utilities.getEnv("ZIA_PASSWORD");
resourceInputs["privateKey"] = (_e = ((args === null || args === void 0 ? void 0 : args.privateKey) ? pulumi.secret(args.privateKey) : undefined)) !== null && _e !== void 0 ? _e : utilities.getEnv("ZSCALER_PRIVATE_KEY");
resourceInputs["requestTimeout"] = pulumi.output(args ? args.requestTimeout : undefined).apply(JSON.stringify);
resourceInputs["sandboxCloud"] = (_f = ((args === null || args === void 0 ? void 0 : args.sandboxCloud) ? pulumi.secret(args.sandboxCloud) : undefined)) !== null && _f !== void 0 ? _f : utilities.getEnv("ZSCALER_SANDBOX_CLOUD");
resourceInputs["sandboxToken"] = (_g = ((args === null || args === void 0 ? void 0 : args.sandboxToken) ? pulumi.secret(args.sandboxToken) : undefined)) !== null && _g !== void 0 ? _g : utilities.getEnv("ZSCALER_SANDBOX_TOKEN");
resourceInputs["useLegacyClient"] = pulumi.output((_h = (args ? args.useLegacyClient : undefined)) !== null && _h !== void 0 ? _h : utilities.getEnvBoolean("ZSCALER_USE_LEGACY_CLIENT")).apply(JSON.stringify);
resourceInputs["username"] = (_j = (args ? args.username : undefined)) !== null && _j !== void 0 ? _j : utilities.getEnv("ZIA_USERNAME");
resourceInputs["vanityDomain"] = (_k = ((args === null || args === void 0 ? void 0 : args.vanityDomain) ? pulumi.secret(args.vanityDomain) : undefined)) !== null && _k !== void 0 ? _k : utilities.getEnv("ZSCALER_VANITY_DOMAIN");
resourceInputs["ziaCloud"] = (_l = (args ? args.ziaCloud : undefined)) !== null && _l !== void 0 ? _l : utilities.getEnv("ZIA_CLOUD");
resourceInputs["zscalerCloud"] = (_m = ((args === null || args === void 0 ? void 0 : args.zscalerCloud) ? pulumi.secret(args.zscalerCloud) : undefined)) !== null && _m !== void 0 ? _m : utilities.getEnv("ZSCALER_CLOUD");
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["apiKey", "clientSecret", "password", "privateKey", "sandboxCloud", "sandboxToken", "vanityDomain", "zscalerCloud"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Provider.__pulumiType, name, resourceInputs, opts);
}
/**
* This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider.
*/
terraformConfig() {
return pulumi.runtime.call("pulumi:providers:zia/terraformConfig", {
"__self__": this,
}, this);
}
}
exports.Provider = Provider;
/** @internal */
Provider.__pulumiType = 'zia';
//# sourceMappingURL=provider.js.map