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

authentik.SourcePlex

Explore with Pulumi AI

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 name = new authentik.SourcePlex("name", {
    slug: "plex",
    authenticationFlow: default_authorization_flow.then(default_authorization_flow => default_authorization_flow.id),
    enrollmentFlow: default_authorization_flow.then(default_authorization_flow => default_authorization_flow.id),
    clientId: "foo-bar-baz",
    plexToken: "foo",
});
Copy
import pulumi
import pulumi_authentik as authentik

default_authorization_flow = authentik.get_flow(slug="default-provider-authorization-implicit-consent")
name = authentik.SourcePlex("name",
    slug="plex",
    authentication_flow=default_authorization_flow.id,
    enrollment_flow=default_authorization_flow.id,
    client_id="foo-bar-baz",
    plex_token="foo")
Copy
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
		}
		_, err = authentik.NewSourcePlex(ctx, "name", &authentik.SourcePlexArgs{
			Slug:               pulumi.String("plex"),
			AuthenticationFlow: pulumi.String(default_authorization_flow.Id),
			EnrollmentFlow:     pulumi.String(default_authorization_flow.Id),
			ClientId:           pulumi.String("foo-bar-baz"),
			PlexToken:          pulumi.String("foo"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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 name = new Authentik.SourcePlex("name", new()
    {
        Slug = "plex",
        AuthenticationFlow = default_authorization_flow.Apply(default_authorization_flow => default_authorization_flow.Apply(getFlowResult => getFlowResult.Id)),
        EnrollmentFlow = default_authorization_flow.Apply(default_authorization_flow => default_authorization_flow.Apply(getFlowResult => getFlowResult.Id)),
        ClientId = "foo-bar-baz",
        PlexToken = "foo",
    });

});
Copy
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.SourcePlex;
import com.pulumi.authentik.SourcePlexArgs;
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 name = new SourcePlex("name", SourcePlexArgs.builder()
            .slug("plex")
            .authenticationFlow(default_authorization_flow.id())
            .enrollmentFlow(default_authorization_flow.id())
            .clientId("foo-bar-baz")
            .plexToken("foo")
            .build());

    }
}
Copy
resources:
  name:
    type: authentik:SourcePlex
    properties:
      slug: plex
      authenticationFlow: ${["default-authorization-flow"].id}
      enrollmentFlow: ${["default-authorization-flow"].id}
      clientId: foo-bar-baz
      plexToken: foo
variables:
  default-authorization-flow:
    fn::invoke:
      function: authentik:getFlow
      arguments:
        slug: default-provider-authorization-implicit-consent
Copy

Create SourcePlex Resource

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

Constructor syntax

new SourcePlex(name: string, args: SourcePlexArgs, opts?: CustomResourceOptions);
@overload
def SourcePlex(resource_name: str,
               args: SourcePlexArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def SourcePlex(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               client_id: Optional[str] = None,
               slug: Optional[str] = None,
               plex_token: Optional[str] = None,
               group_matching_mode: Optional[str] = None,
               enabled: Optional[bool] = None,
               enrollment_flow: Optional[str] = None,
               allow_friends: Optional[bool] = None,
               name: Optional[str] = None,
               authentication_flow: Optional[str] = None,
               policy_engine_mode: Optional[str] = None,
               allowed_servers: Optional[Sequence[str]] = None,
               source_plex_id: Optional[str] = None,
               user_matching_mode: Optional[str] = None,
               user_path_template: Optional[str] = None,
               uuid: Optional[str] = None)
func NewSourcePlex(ctx *Context, name string, args SourcePlexArgs, opts ...ResourceOption) (*SourcePlex, error)
public SourcePlex(string name, SourcePlexArgs args, CustomResourceOptions? opts = null)
public SourcePlex(String name, SourcePlexArgs args)
public SourcePlex(String name, SourcePlexArgs args, CustomResourceOptions options)
type: authentik:SourcePlex
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SourcePlexArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SourcePlexArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SourcePlexArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SourcePlexArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SourcePlexArgs
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 sourcePlexResource = new Authentik.SourcePlex("sourcePlexResource", new()
{
    ClientId = "string",
    Slug = "string",
    PlexToken = "string",
    GroupMatchingMode = "string",
    Enabled = false,
    EnrollmentFlow = "string",
    AllowFriends = false,
    Name = "string",
    AuthenticationFlow = "string",
    PolicyEngineMode = "string",
    AllowedServers = new[]
    {
        "string",
    },
    SourcePlexId = "string",
    UserMatchingMode = "string",
    UserPathTemplate = "string",
    Uuid = "string",
});
Copy
example, err := authentik.NewSourcePlex(ctx, "sourcePlexResource", &authentik.SourcePlexArgs{
	ClientId:           pulumi.String("string"),
	Slug:               pulumi.String("string"),
	PlexToken:          pulumi.String("string"),
	GroupMatchingMode:  pulumi.String("string"),
	Enabled:            pulumi.Bool(false),
	EnrollmentFlow:     pulumi.String("string"),
	AllowFriends:       pulumi.Bool(false),
	Name:               pulumi.String("string"),
	AuthenticationFlow: pulumi.String("string"),
	PolicyEngineMode:   pulumi.String("string"),
	AllowedServers: pulumi.StringArray{
		pulumi.String("string"),
	},
	SourcePlexId:     pulumi.String("string"),
	UserMatchingMode: pulumi.String("string"),
	UserPathTemplate: pulumi.String("string"),
	Uuid:             pulumi.String("string"),
})
Copy
var sourcePlexResource = new SourcePlex("sourcePlexResource", SourcePlexArgs.builder()
    .clientId("string")
    .slug("string")
    .plexToken("string")
    .groupMatchingMode("string")
    .enabled(false)
    .enrollmentFlow("string")
    .allowFriends(false)
    .name("string")
    .authenticationFlow("string")
    .policyEngineMode("string")
    .allowedServers("string")
    .sourcePlexId("string")
    .userMatchingMode("string")
    .userPathTemplate("string")
    .uuid("string")
    .build());
Copy
source_plex_resource = authentik.SourcePlex("sourcePlexResource",
    client_id="string",
    slug="string",
    plex_token="string",
    group_matching_mode="string",
    enabled=False,
    enrollment_flow="string",
    allow_friends=False,
    name="string",
    authentication_flow="string",
    policy_engine_mode="string",
    allowed_servers=["string"],
    source_plex_id="string",
    user_matching_mode="string",
    user_path_template="string",
    uuid="string")
Copy
const sourcePlexResource = new authentik.SourcePlex("sourcePlexResource", {
    clientId: "string",
    slug: "string",
    plexToken: "string",
    groupMatchingMode: "string",
    enabled: false,
    enrollmentFlow: "string",
    allowFriends: false,
    name: "string",
    authenticationFlow: "string",
    policyEngineMode: "string",
    allowedServers: ["string"],
    sourcePlexId: "string",
    userMatchingMode: "string",
    userPathTemplate: "string",
    uuid: "string",
});
Copy
type: authentik:SourcePlex
properties:
    allowFriends: false
    allowedServers:
        - string
    authenticationFlow: string
    clientId: string
    enabled: false
    enrollmentFlow: string
    groupMatchingMode: string
    name: string
    plexToken: string
    policyEngineMode: string
    slug: string
    sourcePlexId: string
    userMatchingMode: string
    userPathTemplate: string
    uuid: string
Copy

SourcePlex 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 SourcePlex resource accepts the following input properties:

ClientId This property is required. string
PlexToken This property is required. string
Slug This property is required. string
AllowFriends bool
Defaults to true.
AllowedServers List<string>
AuthenticationFlow string
Enabled bool
Defaults to true.
EnrollmentFlow string
GroupMatchingMode string
Allowed values: - identifier - name_link - name_deny Defaults to identifier.
Name string
PolicyEngineMode string
Allowed values: - all - any Defaults to any.
SourcePlexId string
UserMatchingMode string
Allowed values: - identifier - email_link - email_deny - username_link - username_deny Defaults to identifier.
UserPathTemplate string
Defaults to goauthentik.io/sources/%(slug)s.
Uuid string
Generated.
ClientId This property is required. string
PlexToken This property is required. string
Slug This property is required. string
AllowFriends bool
Defaults to true.
AllowedServers []string
AuthenticationFlow string
Enabled bool
Defaults to true.
EnrollmentFlow string
GroupMatchingMode string
Allowed values: - identifier - name_link - name_deny Defaults to identifier.
Name string
PolicyEngineMode string
Allowed values: - all - any Defaults to any.
SourcePlexId string
UserMatchingMode string
Allowed values: - identifier - email_link - email_deny - username_link - username_deny Defaults to identifier.
UserPathTemplate string
Defaults to goauthentik.io/sources/%(slug)s.
Uuid string
Generated.
clientId This property is required. String
plexToken This property is required. String
slug This property is required. String
allowFriends Boolean
Defaults to true.
allowedServers List<String>
authenticationFlow String
enabled Boolean
Defaults to true.
enrollmentFlow String
groupMatchingMode String
Allowed values: - identifier - name_link - name_deny Defaults to identifier.
name String
policyEngineMode String
Allowed values: - all - any Defaults to any.
sourcePlexId String
userMatchingMode String
Allowed values: - identifier - email_link - email_deny - username_link - username_deny Defaults to identifier.
userPathTemplate String
Defaults to goauthentik.io/sources/%(slug)s.
uuid String
Generated.
clientId This property is required. string
plexToken This property is required. string
slug This property is required. string
allowFriends boolean
Defaults to true.
allowedServers string[]
authenticationFlow string
enabled boolean
Defaults to true.
enrollmentFlow string
groupMatchingMode string
Allowed values: - identifier - name_link - name_deny Defaults to identifier.
name string
policyEngineMode string
Allowed values: - all - any Defaults to any.
sourcePlexId string
userMatchingMode string
Allowed values: - identifier - email_link - email_deny - username_link - username_deny Defaults to identifier.
userPathTemplate string
Defaults to goauthentik.io/sources/%(slug)s.
uuid string
Generated.
client_id This property is required. str
plex_token This property is required. str
slug This property is required. str
allow_friends bool
Defaults to true.
allowed_servers Sequence[str]
authentication_flow str
enabled bool
Defaults to true.
enrollment_flow str
group_matching_mode str
Allowed values: - identifier - name_link - name_deny Defaults to identifier.
name str
policy_engine_mode str
Allowed values: - all - any Defaults to any.
source_plex_id str
user_matching_mode str
Allowed values: - identifier - email_link - email_deny - username_link - username_deny Defaults to identifier.
user_path_template str
Defaults to goauthentik.io/sources/%(slug)s.
uuid str
Generated.
clientId This property is required. String
plexToken This property is required. String
slug This property is required. String
allowFriends Boolean
Defaults to true.
allowedServers List<String>
authenticationFlow String
enabled Boolean
Defaults to true.
enrollmentFlow String
groupMatchingMode String
Allowed values: - identifier - name_link - name_deny Defaults to identifier.
name String
policyEngineMode String
Allowed values: - all - any Defaults to any.
sourcePlexId String
userMatchingMode String
Allowed values: - identifier - email_link - email_deny - username_link - username_deny Defaults to identifier.
userPathTemplate String
Defaults to goauthentik.io/sources/%(slug)s.
uuid String
Generated.

Outputs

All input properties are implicitly available as output properties. Additionally, the SourcePlex 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 SourcePlex Resource

Get an existing SourcePlex 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?: SourcePlexState, opts?: CustomResourceOptions): SourcePlex
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allow_friends: Optional[bool] = None,
        allowed_servers: Optional[Sequence[str]] = None,
        authentication_flow: Optional[str] = None,
        client_id: Optional[str] = None,
        enabled: Optional[bool] = None,
        enrollment_flow: Optional[str] = None,
        group_matching_mode: Optional[str] = None,
        name: Optional[str] = None,
        plex_token: Optional[str] = None,
        policy_engine_mode: Optional[str] = None,
        slug: Optional[str] = None,
        source_plex_id: Optional[str] = None,
        user_matching_mode: Optional[str] = None,
        user_path_template: Optional[str] = None,
        uuid: Optional[str] = None) -> SourcePlex
func GetSourcePlex(ctx *Context, name string, id IDInput, state *SourcePlexState, opts ...ResourceOption) (*SourcePlex, error)
public static SourcePlex Get(string name, Input<string> id, SourcePlexState? state, CustomResourceOptions? opts = null)
public static SourcePlex get(String name, Output<String> id, SourcePlexState state, CustomResourceOptions options)
resources:  _:    type: authentik:SourcePlex    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AllowFriends bool
Defaults to true.
AllowedServers List<string>
AuthenticationFlow string
ClientId string
Enabled bool
Defaults to true.
EnrollmentFlow string
GroupMatchingMode string
Allowed values: - identifier - name_link - name_deny Defaults to identifier.
Name string
PlexToken string
PolicyEngineMode string
Allowed values: - all - any Defaults to any.
Slug string
SourcePlexId string
UserMatchingMode string
Allowed values: - identifier - email_link - email_deny - username_link - username_deny Defaults to identifier.
UserPathTemplate string
Defaults to goauthentik.io/sources/%(slug)s.
Uuid string
Generated.
AllowFriends bool
Defaults to true.
AllowedServers []string
AuthenticationFlow string
ClientId string
Enabled bool
Defaults to true.
EnrollmentFlow string
GroupMatchingMode string
Allowed values: - identifier - name_link - name_deny Defaults to identifier.
Name string
PlexToken string
PolicyEngineMode string
Allowed values: - all - any Defaults to any.
Slug string
SourcePlexId string
UserMatchingMode string
Allowed values: - identifier - email_link - email_deny - username_link - username_deny Defaults to identifier.
UserPathTemplate string
Defaults to goauthentik.io/sources/%(slug)s.
Uuid string
Generated.
allowFriends Boolean
Defaults to true.
allowedServers List<String>
authenticationFlow String
clientId String
enabled Boolean
Defaults to true.
enrollmentFlow String
groupMatchingMode String
Allowed values: - identifier - name_link - name_deny Defaults to identifier.
name String
plexToken String
policyEngineMode String
Allowed values: - all - any Defaults to any.
slug String
sourcePlexId String
userMatchingMode String
Allowed values: - identifier - email_link - email_deny - username_link - username_deny Defaults to identifier.
userPathTemplate String
Defaults to goauthentik.io/sources/%(slug)s.
uuid String
Generated.
allowFriends boolean
Defaults to true.
allowedServers string[]
authenticationFlow string
clientId string
enabled boolean
Defaults to true.
enrollmentFlow string
groupMatchingMode string
Allowed values: - identifier - name_link - name_deny Defaults to identifier.
name string
plexToken string
policyEngineMode string
Allowed values: - all - any Defaults to any.
slug string
sourcePlexId string
userMatchingMode string
Allowed values: - identifier - email_link - email_deny - username_link - username_deny Defaults to identifier.
userPathTemplate string
Defaults to goauthentik.io/sources/%(slug)s.
uuid string
Generated.
allow_friends bool
Defaults to true.
allowed_servers Sequence[str]
authentication_flow str
client_id str
enabled bool
Defaults to true.
enrollment_flow str
group_matching_mode str
Allowed values: - identifier - name_link - name_deny Defaults to identifier.
name str
plex_token str
policy_engine_mode str
Allowed values: - all - any Defaults to any.
slug str
source_plex_id str
user_matching_mode str
Allowed values: - identifier - email_link - email_deny - username_link - username_deny Defaults to identifier.
user_path_template str
Defaults to goauthentik.io/sources/%(slug)s.
uuid str
Generated.
allowFriends Boolean
Defaults to true.
allowedServers List<String>
authenticationFlow String
clientId String
enabled Boolean
Defaults to true.
enrollmentFlow String
groupMatchingMode String
Allowed values: - identifier - name_link - name_deny Defaults to identifier.
name String
plexToken String
policyEngineMode String
Allowed values: - all - any Defaults to any.
slug String
sourcePlexId String
userMatchingMode String
Allowed values: - identifier - email_link - email_deny - username_link - username_deny Defaults to identifier.
userPathTemplate String
Defaults to goauthentik.io/sources/%(slug)s.
uuid String
Generated.

Package Details

Repository
authentik goauthentik/terraform-provider-authentik
License
Notes
This Pulumi package is based on the authentik Terraform Provider.