pulumi-fusionauth
Version:
A Pulumi package for managing FusionAuth instances.
87 lines • 4.33 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.FusionAuthImportedKey = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## # Imported Key Resource
*
* Cryptographic keys are used in signing and verifying JWTs and verifying responses for third party identity providers. It is more likely you will interact with keys using the FusionAuth UI in the Key Master menu.
*
* [Keys API](https://fusionauth.io/docs/v1/tech/apis/keys)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as fs from "fs";
* import * as fusionauth from "pulumi-fusionauth";
*
* const name = new fusionauth.FusionAuthImportedKey("name", {
* kid: "8675309",
* privateKey: fs.readFileSync("./AuthKey_8675309.p8", "utf8"),
* });
* ```
*/
class FusionAuthImportedKey extends pulumi.CustomResource {
/**
* Get an existing FusionAuthImportedKey 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 FusionAuthImportedKey(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of FusionAuthImportedKey. 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'] === FusionAuthImportedKey.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["algorithm"] = state ? state.algorithm : undefined;
resourceInputs["certificate"] = state ? state.certificate : undefined;
resourceInputs["keyId"] = state ? state.keyId : undefined;
resourceInputs["kid"] = state ? state.kid : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["privateKey"] = state ? state.privateKey : undefined;
resourceInputs["publicKey"] = state ? state.publicKey : undefined;
resourceInputs["secret"] = state ? state.secret : undefined;
resourceInputs["type"] = state ? state.type : undefined;
}
else {
const args = argsOrState;
resourceInputs["algorithm"] = args ? args.algorithm : undefined;
resourceInputs["certificate"] = args ? args.certificate : undefined;
resourceInputs["keyId"] = args ? args.keyId : undefined;
resourceInputs["kid"] = args ? args.kid : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["privateKey"] = (args === null || args === void 0 ? void 0 : args.privateKey) ? pulumi.secret(args.privateKey) : undefined;
resourceInputs["publicKey"] = args ? args.publicKey : undefined;
resourceInputs["secret"] = (args === null || args === void 0 ? void 0 : args.secret) ? pulumi.secret(args.secret) : undefined;
resourceInputs["type"] = args ? args.type : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["privateKey", "secret"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(FusionAuthImportedKey.__pulumiType, name, resourceInputs, opts);
}
}
exports.FusionAuthImportedKey = FusionAuthImportedKey;
/** @internal */
FusionAuthImportedKey.__pulumiType = 'fusionauth:index/fusionAuthImportedKey:FusionAuthImportedKey';
//# sourceMappingURL=fusionAuthImportedKey.js.map