@osmit-gmbh/pulumi-authentik
Version:
A Pulumi package for creating and managing authentik cloud resources.
119 lines • 6.75 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.ProviderProxy = 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 proxy provider
* const default-authorization-flow = authentik.getFlow({
* slug: "default-provider-authorization-implicit-consent",
* });
* const name = new authentik.ProviderProxy("name", {
* name: "test-app",
* internalHost: "http://foo.bar.baz",
* externalHost: "http://internal.service",
* authorizationFlow: default_authorization_flow.then(default_authorization_flow => default_authorization_flow.id),
* });
* const nameApplication = new authentik.Application("name", {
* name: "test-app",
* slug: "test-app",
* protocolProvider: name.id,
* });
* ```
*/
class ProviderProxy extends pulumi.CustomResource {
/**
* Get an existing ProviderProxy 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 ProviderProxy(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ProviderProxy. 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'] === ProviderProxy.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accessTokenValidity"] = state ? state.accessTokenValidity : undefined;
resourceInputs["authenticationFlow"] = state ? state.authenticationFlow : undefined;
resourceInputs["authorizationFlow"] = state ? state.authorizationFlow : undefined;
resourceInputs["basicAuthEnabled"] = state ? state.basicAuthEnabled : undefined;
resourceInputs["basicAuthPasswordAttribute"] = state ? state.basicAuthPasswordAttribute : undefined;
resourceInputs["basicAuthUsernameAttribute"] = state ? state.basicAuthUsernameAttribute : undefined;
resourceInputs["clientId"] = state ? state.clientId : undefined;
resourceInputs["cookieDomain"] = state ? state.cookieDomain : undefined;
resourceInputs["externalHost"] = state ? state.externalHost : undefined;
resourceInputs["interceptHeaderAuth"] = state ? state.interceptHeaderAuth : undefined;
resourceInputs["internalHost"] = state ? state.internalHost : undefined;
resourceInputs["internalHostSslValidation"] = state ? state.internalHostSslValidation : undefined;
resourceInputs["invalidationFlow"] = state ? state.invalidationFlow : undefined;
resourceInputs["jwksSources"] = state ? state.jwksSources : undefined;
resourceInputs["mode"] = state ? state.mode : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["propertyMappings"] = state ? state.propertyMappings : undefined;
resourceInputs["refreshTokenValidity"] = state ? state.refreshTokenValidity : undefined;
resourceInputs["skipPathRegex"] = state ? state.skipPathRegex : undefined;
}
else {
const args = argsOrState;
if ((!args || args.authorizationFlow === undefined) && !opts.urn) {
throw new Error("Missing required property 'authorizationFlow'");
}
if ((!args || args.externalHost === undefined) && !opts.urn) {
throw new Error("Missing required property 'externalHost'");
}
if ((!args || args.invalidationFlow === undefined) && !opts.urn) {
throw new Error("Missing required property 'invalidationFlow'");
}
resourceInputs["accessTokenValidity"] = args ? args.accessTokenValidity : undefined;
resourceInputs["authenticationFlow"] = args ? args.authenticationFlow : undefined;
resourceInputs["authorizationFlow"] = args ? args.authorizationFlow : undefined;
resourceInputs["basicAuthEnabled"] = args ? args.basicAuthEnabled : undefined;
resourceInputs["basicAuthPasswordAttribute"] = args ? args.basicAuthPasswordAttribute : undefined;
resourceInputs["basicAuthUsernameAttribute"] = args ? args.basicAuthUsernameAttribute : undefined;
resourceInputs["cookieDomain"] = args ? args.cookieDomain : undefined;
resourceInputs["externalHost"] = args ? args.externalHost : undefined;
resourceInputs["interceptHeaderAuth"] = args ? args.interceptHeaderAuth : undefined;
resourceInputs["internalHost"] = args ? args.internalHost : undefined;
resourceInputs["internalHostSslValidation"] = args ? args.internalHostSslValidation : undefined;
resourceInputs["invalidationFlow"] = args ? args.invalidationFlow : undefined;
resourceInputs["jwksSources"] = args ? args.jwksSources : undefined;
resourceInputs["mode"] = args ? args.mode : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["propertyMappings"] = args ? args.propertyMappings : undefined;
resourceInputs["refreshTokenValidity"] = args ? args.refreshTokenValidity : undefined;
resourceInputs["skipPathRegex"] = args ? args.skipPathRegex : undefined;
resourceInputs["clientId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ProviderProxy.__pulumiType, name, resourceInputs, opts);
}
}
exports.ProviderProxy = ProviderProxy;
/** @internal */
ProviderProxy.__pulumiType = 'authentik:index/providerProxy:ProviderProxy';
//# sourceMappingURL=providerProxy.js.map