@pulumiverse/harbor
Version:
A Pulumi package for creating and managing Harbor resources.
115 lines • 7.22 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConfigAuth = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Example Usage
*
* ### OIDC
*
* ### LDAP
*/
class ConfigAuth extends pulumi.CustomResource {
/**
* Get an existing ConfigAuth 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 ConfigAuth(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ConfigAuth. 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'] === ConfigAuth.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["authMode"] = state ? state.authMode : undefined;
resourceInputs["ldapBaseDn"] = state ? state.ldapBaseDn : undefined;
resourceInputs["ldapFilter"] = state ? state.ldapFilter : undefined;
resourceInputs["ldapGroupAdminDn"] = state ? state.ldapGroupAdminDn : undefined;
resourceInputs["ldapGroupBaseDn"] = state ? state.ldapGroupBaseDn : undefined;
resourceInputs["ldapGroupFilter"] = state ? state.ldapGroupFilter : undefined;
resourceInputs["ldapGroupGid"] = state ? state.ldapGroupGid : undefined;
resourceInputs["ldapGroupMembership"] = state ? state.ldapGroupMembership : undefined;
resourceInputs["ldapGroupScope"] = state ? state.ldapGroupScope : undefined;
resourceInputs["ldapGroupUid"] = state ? state.ldapGroupUid : undefined;
resourceInputs["ldapScope"] = state ? state.ldapScope : undefined;
resourceInputs["ldapSearchDn"] = state ? state.ldapSearchDn : undefined;
resourceInputs["ldapSearchPassword"] = state ? state.ldapSearchPassword : undefined;
resourceInputs["ldapUid"] = state ? state.ldapUid : undefined;
resourceInputs["ldapUrl"] = state ? state.ldapUrl : undefined;
resourceInputs["ldapVerifyCert"] = state ? state.ldapVerifyCert : undefined;
resourceInputs["oidcAdminGroup"] = state ? state.oidcAdminGroup : undefined;
resourceInputs["oidcAutoOnboard"] = state ? state.oidcAutoOnboard : undefined;
resourceInputs["oidcClientId"] = state ? state.oidcClientId : undefined;
resourceInputs["oidcClientSecret"] = state ? state.oidcClientSecret : undefined;
resourceInputs["oidcEndpoint"] = state ? state.oidcEndpoint : undefined;
resourceInputs["oidcGroupFilter"] = state ? state.oidcGroupFilter : undefined;
resourceInputs["oidcGroupsClaim"] = state ? state.oidcGroupsClaim : undefined;
resourceInputs["oidcName"] = state ? state.oidcName : undefined;
resourceInputs["oidcScope"] = state ? state.oidcScope : undefined;
resourceInputs["oidcUserClaim"] = state ? state.oidcUserClaim : undefined;
resourceInputs["oidcVerifyCert"] = state ? state.oidcVerifyCert : undefined;
resourceInputs["primaryAuthMode"] = state ? state.primaryAuthMode : undefined;
}
else {
const args = argsOrState;
if ((!args || args.authMode === undefined) && !opts.urn) {
throw new Error("Missing required property 'authMode'");
}
resourceInputs["authMode"] = args ? args.authMode : undefined;
resourceInputs["ldapBaseDn"] = args ? args.ldapBaseDn : undefined;
resourceInputs["ldapFilter"] = args ? args.ldapFilter : undefined;
resourceInputs["ldapGroupAdminDn"] = args ? args.ldapGroupAdminDn : undefined;
resourceInputs["ldapGroupBaseDn"] = args ? args.ldapGroupBaseDn : undefined;
resourceInputs["ldapGroupFilter"] = args ? args.ldapGroupFilter : undefined;
resourceInputs["ldapGroupGid"] = args ? args.ldapGroupGid : undefined;
resourceInputs["ldapGroupMembership"] = args ? args.ldapGroupMembership : undefined;
resourceInputs["ldapGroupScope"] = args ? args.ldapGroupScope : undefined;
resourceInputs["ldapGroupUid"] = args ? args.ldapGroupUid : undefined;
resourceInputs["ldapScope"] = args ? args.ldapScope : undefined;
resourceInputs["ldapSearchDn"] = args ? args.ldapSearchDn : undefined;
resourceInputs["ldapSearchPassword"] = (args === null || args === void 0 ? void 0 : args.ldapSearchPassword) ? pulumi.secret(args.ldapSearchPassword) : undefined;
resourceInputs["ldapUid"] = args ? args.ldapUid : undefined;
resourceInputs["ldapUrl"] = args ? args.ldapUrl : undefined;
resourceInputs["ldapVerifyCert"] = args ? args.ldapVerifyCert : undefined;
resourceInputs["oidcAdminGroup"] = args ? args.oidcAdminGroup : undefined;
resourceInputs["oidcAutoOnboard"] = args ? args.oidcAutoOnboard : undefined;
resourceInputs["oidcClientId"] = args ? args.oidcClientId : undefined;
resourceInputs["oidcClientSecret"] = (args === null || args === void 0 ? void 0 : args.oidcClientSecret) ? pulumi.secret(args.oidcClientSecret) : undefined;
resourceInputs["oidcEndpoint"] = args ? args.oidcEndpoint : undefined;
resourceInputs["oidcGroupFilter"] = args ? args.oidcGroupFilter : undefined;
resourceInputs["oidcGroupsClaim"] = args ? args.oidcGroupsClaim : undefined;
resourceInputs["oidcName"] = args ? args.oidcName : undefined;
resourceInputs["oidcScope"] = args ? args.oidcScope : undefined;
resourceInputs["oidcUserClaim"] = args ? args.oidcUserClaim : undefined;
resourceInputs["oidcVerifyCert"] = args ? args.oidcVerifyCert : undefined;
resourceInputs["primaryAuthMode"] = args ? args.primaryAuthMode : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["ldapSearchPassword", "oidcClientSecret"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(ConfigAuth.__pulumiType, name, resourceInputs, opts);
}
}
exports.ConfigAuth = ConfigAuth;
/** @internal */
ConfigAuth.__pulumiType = 'harbor:index/configAuth:ConfigAuth';
//# sourceMappingURL=configAuth.js.map