UNPKG

@osmit-gmbh/pulumi-authentik

Version:

A Pulumi package for creating and managing authentik cloud resources.

130 lines 7.45 kB
"use strict"; // *** 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.SourceLdap = 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"; * * // Create LDAP Source * const name = new authentik.SourceLdap("name", { * name: "ldap-test", * slug: "ldap-test", * serverUri: "ldaps://1.2.3.4", * bindCn: "foo", * bindPassword: "bar", * baseDn: "dn=foo", * }); * ``` */ class SourceLdap extends pulumi.CustomResource { /** * Get an existing SourceLdap 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 SourceLdap(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of SourceLdap. 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'] === SourceLdap.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["additionalGroupDn"] = state ? state.additionalGroupDn : undefined; resourceInputs["additionalUserDn"] = state ? state.additionalUserDn : undefined; resourceInputs["baseDn"] = state ? state.baseDn : undefined; resourceInputs["bindCn"] = state ? state.bindCn : undefined; resourceInputs["bindPassword"] = state ? state.bindPassword : undefined; resourceInputs["enabled"] = state ? state.enabled : undefined; resourceInputs["groupMembershipField"] = state ? state.groupMembershipField : undefined; resourceInputs["groupObjectFilter"] = state ? state.groupObjectFilter : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["objectUniquenessField"] = state ? state.objectUniquenessField : undefined; resourceInputs["passwordLoginUpdateInternalPassword"] = state ? state.passwordLoginUpdateInternalPassword : undefined; resourceInputs["propertyMappings"] = state ? state.propertyMappings : undefined; resourceInputs["propertyMappingsGroups"] = state ? state.propertyMappingsGroups : undefined; resourceInputs["serverUri"] = state ? state.serverUri : undefined; resourceInputs["slug"] = state ? state.slug : undefined; resourceInputs["sni"] = state ? state.sni : undefined; resourceInputs["startTls"] = state ? state.startTls : undefined; resourceInputs["syncGroups"] = state ? state.syncGroups : undefined; resourceInputs["syncParentGroup"] = state ? state.syncParentGroup : undefined; resourceInputs["syncUsers"] = state ? state.syncUsers : undefined; resourceInputs["syncUsersPassword"] = state ? state.syncUsersPassword : undefined; resourceInputs["userObjectFilter"] = state ? state.userObjectFilter : undefined; resourceInputs["userPathTemplate"] = state ? state.userPathTemplate : undefined; resourceInputs["uuid"] = state ? state.uuid : undefined; } else { const args = argsOrState; if ((!args || args.baseDn === undefined) && !opts.urn) { throw new Error("Missing required property 'baseDn'"); } if ((!args || args.bindCn === undefined) && !opts.urn) { throw new Error("Missing required property 'bindCn'"); } if ((!args || args.bindPassword === undefined) && !opts.urn) { throw new Error("Missing required property 'bindPassword'"); } if ((!args || args.serverUri === undefined) && !opts.urn) { throw new Error("Missing required property 'serverUri'"); } if ((!args || args.slug === undefined) && !opts.urn) { throw new Error("Missing required property 'slug'"); } resourceInputs["additionalGroupDn"] = args ? args.additionalGroupDn : undefined; resourceInputs["additionalUserDn"] = args ? args.additionalUserDn : undefined; resourceInputs["baseDn"] = args ? args.baseDn : undefined; resourceInputs["bindCn"] = args ? args.bindCn : undefined; resourceInputs["bindPassword"] = (args === null || args === void 0 ? void 0 : args.bindPassword) ? pulumi.secret(args.bindPassword) : undefined; resourceInputs["enabled"] = args ? args.enabled : undefined; resourceInputs["groupMembershipField"] = args ? args.groupMembershipField : undefined; resourceInputs["groupObjectFilter"] = args ? args.groupObjectFilter : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["objectUniquenessField"] = args ? args.objectUniquenessField : undefined; resourceInputs["passwordLoginUpdateInternalPassword"] = args ? args.passwordLoginUpdateInternalPassword : undefined; resourceInputs["propertyMappings"] = args ? args.propertyMappings : undefined; resourceInputs["propertyMappingsGroups"] = args ? args.propertyMappingsGroups : undefined; resourceInputs["serverUri"] = args ? args.serverUri : undefined; resourceInputs["slug"] = args ? args.slug : undefined; resourceInputs["sni"] = args ? args.sni : undefined; resourceInputs["startTls"] = args ? args.startTls : undefined; resourceInputs["syncGroups"] = args ? args.syncGroups : undefined; resourceInputs["syncParentGroup"] = args ? args.syncParentGroup : undefined; resourceInputs["syncUsers"] = args ? args.syncUsers : undefined; resourceInputs["syncUsersPassword"] = args ? args.syncUsersPassword : undefined; resourceInputs["userObjectFilter"] = args ? args.userObjectFilter : undefined; resourceInputs["userPathTemplate"] = args ? args.userPathTemplate : undefined; resourceInputs["uuid"] = args ? args.uuid : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["bindPassword"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(SourceLdap.__pulumiType, name, resourceInputs, opts); } } exports.SourceLdap = SourceLdap; /** @internal */ SourceLdap.__pulumiType = 'authentik:index/sourceLdap:SourceLdap'; //# sourceMappingURL=sourceLdap.js.map