@osmit-gmbh/pulumi-authentik
Version:
A Pulumi package for creating and managing authentik cloud resources.
108 lines • 5.68 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.SourcePlex = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as authentik from "@osmit-gmbh/pulumi-authentik";
* import * as authentik from "@pulumi/authentik";
*
* // Create a plex source
* const default-authorization-flow = authentik.getFlow({
* slug: "default-provider-authorization-implicit-consent",
* });
* const name = new authentik.SourcePlex("name", {
* name: "plex",
* slug: "plex",
* authenticationFlow: default_authorization_flow.then(default_authorization_flow => default_authorization_flow.id),
* enrollmentFlow: default_authorization_flow.then(default_authorization_flow => default_authorization_flow.id),
* clientId: "foo-bar-baz",
* plexToken: "foo",
* });
* ```
*/
class SourcePlex extends pulumi.CustomResource {
/**
* Get an existing SourcePlex 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 SourcePlex(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SourcePlex. 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'] === SourcePlex.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["allowFriends"] = state ? state.allowFriends : undefined;
resourceInputs["allowedServers"] = state ? state.allowedServers : undefined;
resourceInputs["authenticationFlow"] = state ? state.authenticationFlow : undefined;
resourceInputs["clientId"] = state ? state.clientId : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["enrollmentFlow"] = state ? state.enrollmentFlow : undefined;
resourceInputs["groupMatchingMode"] = state ? state.groupMatchingMode : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["plexToken"] = state ? state.plexToken : undefined;
resourceInputs["policyEngineMode"] = state ? state.policyEngineMode : undefined;
resourceInputs["slug"] = state ? state.slug : undefined;
resourceInputs["userMatchingMode"] = state ? state.userMatchingMode : undefined;
resourceInputs["userPathTemplate"] = state ? state.userPathTemplate : undefined;
resourceInputs["uuid"] = state ? state.uuid : undefined;
}
else {
const args = argsOrState;
if ((!args || args.clientId === undefined) && !opts.urn) {
throw new Error("Missing required property 'clientId'");
}
if ((!args || args.plexToken === undefined) && !opts.urn) {
throw new Error("Missing required property 'plexToken'");
}
if ((!args || args.slug === undefined) && !opts.urn) {
throw new Error("Missing required property 'slug'");
}
resourceInputs["allowFriends"] = args ? args.allowFriends : undefined;
resourceInputs["allowedServers"] = args ? args.allowedServers : undefined;
resourceInputs["authenticationFlow"] = args ? args.authenticationFlow : undefined;
resourceInputs["clientId"] = args ? args.clientId : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["enrollmentFlow"] = args ? args.enrollmentFlow : undefined;
resourceInputs["groupMatchingMode"] = args ? args.groupMatchingMode : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["plexToken"] = (args === null || args === void 0 ? void 0 : args.plexToken) ? pulumi.secret(args.plexToken) : undefined;
resourceInputs["policyEngineMode"] = args ? args.policyEngineMode : undefined;
resourceInputs["slug"] = args ? args.slug : undefined;
resourceInputs["userMatchingMode"] = args ? args.userMatchingMode : undefined;
resourceInputs["userPathTemplate"] = args ? args.userPathTemplate : undefined;
resourceInputs["uuid"] = args ? args.uuid : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["plexToken"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(SourcePlex.__pulumiType, name, resourceInputs, opts);
}
}
exports.SourcePlex = SourcePlex;
/** @internal */
SourcePlex.__pulumiType = 'authentik:index/sourcePlex:SourcePlex';
//# sourceMappingURL=sourcePlex.js.map