UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

87 lines 5.95 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.Provider = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * The provider type for the openstack 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; let resourceInputs = {}; opts = opts || {}; { resourceInputs["allowReauth"] = pulumi.output((_a = (args ? args.allowReauth : undefined)) !== null && _a !== void 0 ? _a : utilities.getEnvBoolean("OS_ALLOW_REAUTH")).apply(JSON.stringify); resourceInputs["applicationCredentialId"] = args ? args.applicationCredentialId : undefined; resourceInputs["applicationCredentialName"] = args ? args.applicationCredentialName : undefined; resourceInputs["applicationCredentialSecret"] = args ? args.applicationCredentialSecret : undefined; resourceInputs["authUrl"] = args ? args.authUrl : undefined; resourceInputs["cacertFile"] = args ? args.cacertFile : undefined; resourceInputs["cert"] = args ? args.cert : undefined; resourceInputs["cloud"] = (_b = (args ? args.cloud : undefined)) !== null && _b !== void 0 ? _b : utilities.getEnv("OS_CLOUD"); resourceInputs["defaultDomain"] = args ? args.defaultDomain : undefined; resourceInputs["delayedAuth"] = pulumi.output((_c = (args ? args.delayedAuth : undefined)) !== null && _c !== void 0 ? _c : utilities.getEnvBoolean("OS_DELAYED_AUTH")).apply(JSON.stringify); resourceInputs["disableNoCacheHeader"] = pulumi.output(args ? args.disableNoCacheHeader : undefined).apply(JSON.stringify); resourceInputs["domainId"] = args ? args.domainId : undefined; resourceInputs["domainName"] = args ? args.domainName : undefined; resourceInputs["enableLogging"] = pulumi.output(args ? args.enableLogging : undefined).apply(JSON.stringify); resourceInputs["endpointOverrides"] = pulumi.output(args ? args.endpointOverrides : undefined).apply(JSON.stringify); resourceInputs["endpointType"] = (_d = (args ? args.endpointType : undefined)) !== null && _d !== void 0 ? _d : utilities.getEnv("OS_ENDPOINT_TYPE"); resourceInputs["insecure"] = pulumi.output((_e = (args ? args.insecure : undefined)) !== null && _e !== void 0 ? _e : utilities.getEnvBoolean("OS_INSECURE")).apply(JSON.stringify); resourceInputs["key"] = args ? args.key : undefined; resourceInputs["maxRetries"] = pulumi.output(args ? args.maxRetries : undefined).apply(JSON.stringify); resourceInputs["password"] = (args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined; resourceInputs["projectDomainId"] = args ? args.projectDomainId : undefined; resourceInputs["projectDomainName"] = args ? args.projectDomainName : undefined; resourceInputs["region"] = (_f = (args ? args.region : undefined)) !== null && _f !== void 0 ? _f : utilities.getEnv("OS_REGION_NAME"); resourceInputs["swauth"] = pulumi.output((_g = (args ? args.swauth : undefined)) !== null && _g !== void 0 ? _g : utilities.getEnvBoolean("OS_SWAUTH")).apply(JSON.stringify); resourceInputs["systemScope"] = pulumi.output(args ? args.systemScope : undefined).apply(JSON.stringify); resourceInputs["tenantId"] = args ? args.tenantId : undefined; resourceInputs["tenantName"] = args ? args.tenantName : undefined; resourceInputs["token"] = args ? args.token : undefined; resourceInputs["userDomainId"] = args ? args.userDomainId : undefined; resourceInputs["userDomainName"] = args ? args.userDomainName : undefined; resourceInputs["userId"] = args ? args.userId : undefined; resourceInputs["userName"] = args ? args.userName : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["password"] }; 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:openstack/terraformConfig", { "__self__": this, }, this); } } exports.Provider = Provider; /** @internal */ Provider.__pulumiType = 'openstack'; //# sourceMappingURL=provider.js.map