@osmit-gmbh/pulumi-authentik
Version:
A Pulumi package for creating and managing authentik cloud resources.
102 lines • 4.94 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.ProviderLdap = 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 an LDAP Provider
* const default-authentication-flow = authentik.getFlow({
* slug: "default-authentication-flow",
* });
* const name = new authentik.ProviderLdap("name", {
* name: "ldap-app",
* baseDn: "dc=ldap,dc=goauthentik,dc=io",
* bindFlow: default_authentication_flow.then(default_authentication_flow => default_authentication_flow.id),
* });
* const nameApplication = new authentik.Application("name", {
* name: "ldap-app",
* slug: "ldap-app",
* protocolProvider: name.id,
* });
* ```
*/
class ProviderLdap extends pulumi.CustomResource {
/**
* Get an existing ProviderLdap 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 ProviderLdap(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ProviderLdap. 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'] === ProviderLdap.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["baseDn"] = state ? state.baseDn : undefined;
resourceInputs["bindFlow"] = state ? state.bindFlow : undefined;
resourceInputs["bindMode"] = state ? state.bindMode : undefined;
resourceInputs["certificate"] = state ? state.certificate : undefined;
resourceInputs["gidStartNumber"] = state ? state.gidStartNumber : undefined;
resourceInputs["mfaSupport"] = state ? state.mfaSupport : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["searchMode"] = state ? state.searchMode : undefined;
resourceInputs["tlsServerName"] = state ? state.tlsServerName : undefined;
resourceInputs["uidStartNumber"] = state ? state.uidStartNumber : undefined;
resourceInputs["unbindFlow"] = state ? state.unbindFlow : undefined;
}
else {
const args = argsOrState;
if ((!args || args.baseDn === undefined) && !opts.urn) {
throw new Error("Missing required property 'baseDn'");
}
if ((!args || args.bindFlow === undefined) && !opts.urn) {
throw new Error("Missing required property 'bindFlow'");
}
if ((!args || args.unbindFlow === undefined) && !opts.urn) {
throw new Error("Missing required property 'unbindFlow'");
}
resourceInputs["baseDn"] = args ? args.baseDn : undefined;
resourceInputs["bindFlow"] = args ? args.bindFlow : undefined;
resourceInputs["bindMode"] = args ? args.bindMode : undefined;
resourceInputs["certificate"] = args ? args.certificate : undefined;
resourceInputs["gidStartNumber"] = args ? args.gidStartNumber : undefined;
resourceInputs["mfaSupport"] = args ? args.mfaSupport : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["searchMode"] = args ? args.searchMode : undefined;
resourceInputs["tlsServerName"] = args ? args.tlsServerName : undefined;
resourceInputs["uidStartNumber"] = args ? args.uidStartNumber : undefined;
resourceInputs["unbindFlow"] = args ? args.unbindFlow : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ProviderLdap.__pulumiType, name, resourceInputs, opts);
}
}
exports.ProviderLdap = ProviderLdap;
/** @internal */
ProviderLdap.__pulumiType = 'authentik:index/providerLdap:ProviderLdap';
//# sourceMappingURL=providerLdap.js.map