1. Packages
  2. Authentik Provider
  3. API Docs
  4. Application
authentik 2025.2.0 published on Monday, Mar 24, 2025 by goauthentik

authentik.Application

Explore with Pulumi AI

authentik logo
authentik 2025.2.0 published on Monday, Mar 24, 2025 by goauthentik

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as authentik from "@pulumi/authentik";
    
    const default_authorization_flow = authentik.getFlow({
        slug: "default-provider-authorization-implicit-consent",
    });
    const nameProviderOauth2 = new authentik.ProviderOauth2("nameProviderOauth2", {
        clientId: "example-app",
        clientSecret: "test",
        authorizationFlow: default_authorization_flow.then(default_authorization_flow => default_authorization_flow.id),
    });
    const policy = new authentik.PolicyExpression("policy", {expression: "return True"});
    const nameApplication = new authentik.Application("nameApplication", {
        slug: "example-app",
        protocolProvider: nameProviderOauth2.providerOauth2Id,
    });
    const app_access = new authentik.PolicyBinding("app-access", {
        target: nameApplication.uuid,
        policy: policy.policyExpressionId,
        order: 0,
    });
    
    import pulumi
    import pulumi_authentik as authentik
    
    default_authorization_flow = authentik.get_flow(slug="default-provider-authorization-implicit-consent")
    name_provider_oauth2 = authentik.ProviderOauth2("nameProviderOauth2",
        client_id="example-app",
        client_secret="test",
        authorization_flow=default_authorization_flow.id)
    policy = authentik.PolicyExpression("policy", expression="return True")
    name_application = authentik.Application("nameApplication",
        slug="example-app",
        protocol_provider=name_provider_oauth2.provider_oauth2_id)
    app_access = authentik.PolicyBinding("app-access",
        target=name_application.uuid,
        policy=policy.policy_expression_id,
        order=0)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/authentik/v2025/authentik"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		default_authorization_flow, err := authentik.LookupFlow(ctx, &authentik.LookupFlowArgs{
    			Slug: pulumi.StringRef("default-provider-authorization-implicit-consent"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		nameProviderOauth2, err := authentik.NewProviderOauth2(ctx, "nameProviderOauth2", &authentik.ProviderOauth2Args{
    			ClientId:          pulumi.String("example-app"),
    			ClientSecret:      pulumi.String("test"),
    			AuthorizationFlow: pulumi.String(default_authorization_flow.Id),
    		})
    		if err != nil {
    			return err
    		}
    		policy, err := authentik.NewPolicyExpression(ctx, "policy", &authentik.PolicyExpressionArgs{
    			Expression: pulumi.String("return True"),
    		})
    		if err != nil {
    			return err
    		}
    		nameApplication, err := authentik.NewApplication(ctx, "nameApplication", &authentik.ApplicationArgs{
    			Slug:             pulumi.String("example-app"),
    			ProtocolProvider: nameProviderOauth2.ProviderOauth2Id,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = authentik.NewPolicyBinding(ctx, "app-access", &authentik.PolicyBindingArgs{
    			Target: nameApplication.Uuid,
    			Policy: policy.PolicyExpressionId,
    			Order:  pulumi.Float64(0),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Authentik = Pulumi.Authentik;
    
    return await Deployment.RunAsync(() => 
    {
        var default_authorization_flow = Authentik.GetFlow.Invoke(new()
        {
            Slug = "default-provider-authorization-implicit-consent",
        });
    
        var nameProviderOauth2 = new Authentik.ProviderOauth2("nameProviderOauth2", new()
        {
            ClientId = "example-app",
            ClientSecret = "test",
            AuthorizationFlow = default_authorization_flow.Apply(default_authorization_flow => default_authorization_flow.Apply(getFlowResult => getFlowResult.Id)),
        });
    
        var policy = new Authentik.PolicyExpression("policy", new()
        {
            Expression = "return True",
        });
    
        var nameApplication = new Authentik.Application("nameApplication", new()
        {
            Slug = "example-app",
            ProtocolProvider = nameProviderOauth2.ProviderOauth2Id,
        });
    
        var app_access = new Authentik.PolicyBinding("app-access", new()
        {
            Target = nameApplication.Uuid,
            Policy = policy.PolicyExpressionId,
            Order = 0,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.authentik.AuthentikFunctions;
    import com.pulumi.authentik.inputs.GetFlowArgs;
    import com.pulumi.authentik.ProviderOauth2;
    import com.pulumi.authentik.ProviderOauth2Args;
    import com.pulumi.authentik.PolicyExpression;
    import com.pulumi.authentik.PolicyExpressionArgs;
    import com.pulumi.authentik.Application;
    import com.pulumi.authentik.ApplicationArgs;
    import com.pulumi.authentik.PolicyBinding;
    import com.pulumi.authentik.PolicyBindingArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var default-authorization-flow = AuthentikFunctions.getFlow(GetFlowArgs.builder()
                .slug("default-provider-authorization-implicit-consent")
                .build());
    
            var nameProviderOauth2 = new ProviderOauth2("nameProviderOauth2", ProviderOauth2Args.builder()
                .clientId("example-app")
                .clientSecret("test")
                .authorizationFlow(default_authorization_flow.id())
                .build());
    
            var policy = new PolicyExpression("policy", PolicyExpressionArgs.builder()
                .expression("return True")
                .build());
    
            var nameApplication = new Application("nameApplication", ApplicationArgs.builder()
                .slug("example-app")
                .protocolProvider(nameProviderOauth2.providerOauth2Id())
                .build());
    
            var app_access = new PolicyBinding("app-access", PolicyBindingArgs.builder()
                .target(nameApplication.uuid())
                .policy(policy.policyExpressionId())
                .order(0)
                .build());
    
        }
    }
    
    resources:
      nameProviderOauth2:
        type: authentik:ProviderOauth2
        properties:
          clientId: example-app
          clientSecret: test
          authorizationFlow: ${["default-authorization-flow"].id}
      policy:
        type: authentik:PolicyExpression
        properties:
          expression: return True
      app-access:
        type: authentik:PolicyBinding
        properties:
          target: ${nameApplication.uuid}
          policy: ${policy.policyExpressionId}
          order: 0
      nameApplication:
        type: authentik:Application
        properties:
          slug: example-app
          protocolProvider: ${nameProviderOauth2.providerOauth2Id}
    variables:
      default-authorization-flow:
        fn::invoke:
          function: authentik:getFlow
          arguments:
            slug: default-provider-authorization-implicit-consent
    

    Create Application Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Application(name: string, args: ApplicationArgs, opts?: CustomResourceOptions);
    @overload
    def Application(resource_name: str,
                    args: ApplicationArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Application(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    slug: Optional[str] = None,
                    meta_publisher: Optional[str] = None,
                    group: Optional[str] = None,
                    meta_description: Optional[str] = None,
                    meta_icon: Optional[str] = None,
                    meta_launch_url: Optional[str] = None,
                    application_id: Optional[str] = None,
                    name: Optional[str] = None,
                    open_in_new_tab: Optional[bool] = None,
                    policy_engine_mode: Optional[str] = None,
                    protocol_provider: Optional[float] = None,
                    backchannel_providers: Optional[Sequence[float]] = None,
                    uuid: Optional[str] = None)
    func NewApplication(ctx *Context, name string, args ApplicationArgs, opts ...ResourceOption) (*Application, error)
    public Application(string name, ApplicationArgs args, CustomResourceOptions? opts = null)
    public Application(String name, ApplicationArgs args)
    public Application(String name, ApplicationArgs args, CustomResourceOptions options)
    
    type: authentik:Application
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ApplicationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ApplicationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ApplicationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApplicationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApplicationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var applicationResource = new Authentik.Application("applicationResource", new()
    {
        Slug = "string",
        MetaPublisher = "string",
        Group = "string",
        MetaDescription = "string",
        MetaIcon = "string",
        MetaLaunchUrl = "string",
        ApplicationId = "string",
        Name = "string",
        OpenInNewTab = false,
        PolicyEngineMode = "string",
        ProtocolProvider = 0,
        BackchannelProviders = new[]
        {
            0,
        },
        Uuid = "string",
    });
    
    example, err := authentik.NewApplication(ctx, "applicationResource", &authentik.ApplicationArgs{
    	Slug:             pulumi.String("string"),
    	MetaPublisher:    pulumi.String("string"),
    	Group:            pulumi.String("string"),
    	MetaDescription:  pulumi.String("string"),
    	MetaIcon:         pulumi.String("string"),
    	MetaLaunchUrl:    pulumi.String("string"),
    	ApplicationId:    pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	OpenInNewTab:     pulumi.Bool(false),
    	PolicyEngineMode: pulumi.String("string"),
    	ProtocolProvider: pulumi.Float64(0),
    	BackchannelProviders: pulumi.Float64Array{
    		pulumi.Float64(0),
    	},
    	Uuid: pulumi.String("string"),
    })
    
    var applicationResource = new Application("applicationResource", ApplicationArgs.builder()
        .slug("string")
        .metaPublisher("string")
        .group("string")
        .metaDescription("string")
        .metaIcon("string")
        .metaLaunchUrl("string")
        .applicationId("string")
        .name("string")
        .openInNewTab(false)
        .policyEngineMode("string")
        .protocolProvider(0)
        .backchannelProviders(0)
        .uuid("string")
        .build());
    
    application_resource = authentik.Application("applicationResource",
        slug="string",
        meta_publisher="string",
        group="string",
        meta_description="string",
        meta_icon="string",
        meta_launch_url="string",
        application_id="string",
        name="string",
        open_in_new_tab=False,
        policy_engine_mode="string",
        protocol_provider=0,
        backchannel_providers=[0],
        uuid="string")
    
    const applicationResource = new authentik.Application("applicationResource", {
        slug: "string",
        metaPublisher: "string",
        group: "string",
        metaDescription: "string",
        metaIcon: "string",
        metaLaunchUrl: "string",
        applicationId: "string",
        name: "string",
        openInNewTab: false,
        policyEngineMode: "string",
        protocolProvider: 0,
        backchannelProviders: [0],
        uuid: "string",
    });
    
    type: authentik:Application
    properties:
        applicationId: string
        backchannelProviders:
            - 0
        group: string
        metaDescription: string
        metaIcon: string
        metaLaunchUrl: string
        metaPublisher: string
        name: string
        openInNewTab: false
        policyEngineMode: string
        protocolProvider: 0
        slug: string
        uuid: string
    

    Application Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Application resource accepts the following input properties:

    Slug string
    ApplicationId string
    BackchannelProviders List<double>
    Group string
    MetaDescription string
    MetaIcon string
    MetaLaunchUrl string
    MetaPublisher string
    Name string
    OpenInNewTab bool
    Defaults to false.
    PolicyEngineMode string
    Allowed values: - all - any Defaults to any.
    ProtocolProvider double
    Uuid string
    Generated.
    Slug string
    ApplicationId string
    BackchannelProviders []float64
    Group string
    MetaDescription string
    MetaIcon string
    MetaLaunchUrl string
    MetaPublisher string
    Name string
    OpenInNewTab bool
    Defaults to false.
    PolicyEngineMode string
    Allowed values: - all - any Defaults to any.
    ProtocolProvider float64
    Uuid string
    Generated.
    slug String
    applicationId String
    backchannelProviders List<Double>
    group String
    metaDescription String
    metaIcon String
    metaLaunchUrl String
    metaPublisher String
    name String
    openInNewTab Boolean
    Defaults to false.
    policyEngineMode String
    Allowed values: - all - any Defaults to any.
    protocolProvider Double
    uuid String
    Generated.
    slug string
    applicationId string
    backchannelProviders number[]
    group string
    metaDescription string
    metaIcon string
    metaLaunchUrl string
    metaPublisher string
    name string
    openInNewTab boolean
    Defaults to false.
    policyEngineMode string
    Allowed values: - all - any Defaults to any.
    protocolProvider number
    uuid string
    Generated.
    slug str
    application_id str
    backchannel_providers Sequence[float]
    group str
    meta_description str
    meta_icon str
    meta_launch_url str
    meta_publisher str
    name str
    open_in_new_tab bool
    Defaults to false.
    policy_engine_mode str
    Allowed values: - all - any Defaults to any.
    protocol_provider float
    uuid str
    Generated.
    slug String
    applicationId String
    backchannelProviders List<Number>
    group String
    metaDescription String
    metaIcon String
    metaLaunchUrl String
    metaPublisher String
    name String
    openInNewTab Boolean
    Defaults to false.
    policyEngineMode String
    Allowed values: - all - any Defaults to any.
    protocolProvider Number
    uuid String
    Generated.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Application resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Application Resource

    Get an existing Application resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ApplicationState, opts?: CustomResourceOptions): Application
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            application_id: Optional[str] = None,
            backchannel_providers: Optional[Sequence[float]] = None,
            group: Optional[str] = None,
            meta_description: Optional[str] = None,
            meta_icon: Optional[str] = None,
            meta_launch_url: Optional[str] = None,
            meta_publisher: Optional[str] = None,
            name: Optional[str] = None,
            open_in_new_tab: Optional[bool] = None,
            policy_engine_mode: Optional[str] = None,
            protocol_provider: Optional[float] = None,
            slug: Optional[str] = None,
            uuid: Optional[str] = None) -> Application
    func GetApplication(ctx *Context, name string, id IDInput, state *ApplicationState, opts ...ResourceOption) (*Application, error)
    public static Application Get(string name, Input<string> id, ApplicationState? state, CustomResourceOptions? opts = null)
    public static Application get(String name, Output<String> id, ApplicationState state, CustomResourceOptions options)
    resources:  _:    type: authentik:Application    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ApplicationId string
    BackchannelProviders List<double>
    Group string
    MetaDescription string
    MetaIcon string
    MetaLaunchUrl string
    MetaPublisher string
    Name string
    OpenInNewTab bool
    Defaults to false.
    PolicyEngineMode string
    Allowed values: - all - any Defaults to any.
    ProtocolProvider double
    Slug string
    Uuid string
    Generated.
    ApplicationId string
    BackchannelProviders []float64
    Group string
    MetaDescription string
    MetaIcon string
    MetaLaunchUrl string
    MetaPublisher string
    Name string
    OpenInNewTab bool
    Defaults to false.
    PolicyEngineMode string
    Allowed values: - all - any Defaults to any.
    ProtocolProvider float64
    Slug string
    Uuid string
    Generated.
    applicationId String
    backchannelProviders List<Double>
    group String
    metaDescription String
    metaIcon String
    metaLaunchUrl String
    metaPublisher String
    name String
    openInNewTab Boolean
    Defaults to false.
    policyEngineMode String
    Allowed values: - all - any Defaults to any.
    protocolProvider Double
    slug String
    uuid String
    Generated.
    applicationId string
    backchannelProviders number[]
    group string
    metaDescription string
    metaIcon string
    metaLaunchUrl string
    metaPublisher string
    name string
    openInNewTab boolean
    Defaults to false.
    policyEngineMode string
    Allowed values: - all - any Defaults to any.
    protocolProvider number
    slug string
    uuid string
    Generated.
    application_id str
    backchannel_providers Sequence[float]
    group str
    meta_description str
    meta_icon str
    meta_launch_url str
    meta_publisher str
    name str
    open_in_new_tab bool
    Defaults to false.
    policy_engine_mode str
    Allowed values: - all - any Defaults to any.
    protocol_provider float
    slug str
    uuid str
    Generated.
    applicationId String
    backchannelProviders List<Number>
    group String
    metaDescription String
    metaIcon String
    metaLaunchUrl String
    metaPublisher String
    name String
    openInNewTab Boolean
    Defaults to false.
    policyEngineMode String
    Allowed values: - all - any Defaults to any.
    protocolProvider Number
    slug String
    uuid String
    Generated.

    Package Details

    Repository
    authentik goauthentik/terraform-provider-authentik
    License
    Notes
    This Pulumi package is based on the authentik Terraform Provider.
    authentik logo
    authentik 2025.2.0 published on Monday, Mar 24, 2025 by goauthentik