@pulumiverse/cockroach
Version:
A Pulumi package to create and managed Cockroach DB resources in Pulumi programs.
80 lines • 3.48 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.JwtIssuer = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Configuration to manage external JSON Web Token (JWT) Issuers for authentication to the CockroachDB Cloud API.
*
* ## Import
*
* JWT Issuer ID can be found by running a GET against the Cockroach Cloud API to
*
* list all existing JWT issuers.
*
* https://www.cockroachlabs.com/docs/api/cloud/v1#get-/api/v1/jwt-issuers
*
* format: <jwt issuer id>
*
* ```sh
* $ pulumi import cockroach:index/jwtIssuer:JwtIssuer my_issuer 1f69fdd2-600a-4cfc-a9ba-16995df0d77d
* ```
*/
class JwtIssuer extends pulumi.CustomResource {
/**
* Get an existing JwtIssuer 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 JwtIssuer(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of JwtIssuer. 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'] === JwtIssuer.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["audience"] = state ? state.audience : undefined;
resourceInputs["claim"] = state ? state.claim : undefined;
resourceInputs["identityMaps"] = state ? state.identityMaps : undefined;
resourceInputs["issuerUrl"] = state ? state.issuerUrl : undefined;
resourceInputs["jwks"] = state ? state.jwks : undefined;
}
else {
const args = argsOrState;
if ((!args || args.audience === undefined) && !opts.urn) {
throw new Error("Missing required property 'audience'");
}
if ((!args || args.issuerUrl === undefined) && !opts.urn) {
throw new Error("Missing required property 'issuerUrl'");
}
resourceInputs["audience"] = args ? args.audience : undefined;
resourceInputs["claim"] = args ? args.claim : undefined;
resourceInputs["identityMaps"] = args ? args.identityMaps : undefined;
resourceInputs["issuerUrl"] = args ? args.issuerUrl : undefined;
resourceInputs["jwks"] = args ? args.jwks : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(JwtIssuer.__pulumiType, name, resourceInputs, opts);
}
}
exports.JwtIssuer = JwtIssuer;
/** @internal */
JwtIssuer.__pulumiType = 'cockroach:index/jwtIssuer:JwtIssuer';
//# sourceMappingURL=jwtIssuer.js.map