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

authentik.Group

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as authentik from "@pulumi/authentik";

// Create a super-user group with a user
const name = new authentik.User("name", {username: "user"});
const group = new authentik.Group("group", {
    users: [name.userId],
    isSuperuser: true,
});
Copy
import pulumi
import pulumi_authentik as authentik

# Create a super-user group with a user
name = authentik.User("name", username="user")
group = authentik.Group("group",
    users=[name.user_id],
    is_superuser=True)
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 {
		// Create a super-user group with a user
		name, err := authentik.NewUser(ctx, "name", &authentik.UserArgs{
			Username: pulumi.String("user"),
		})
		if err != nil {
			return err
		}
		_, err = authentik.NewGroup(ctx, "group", &authentik.GroupArgs{
			Users: pulumi.Float64Array{
				name.UserId,
			},
			IsSuperuser: pulumi.Bool(true),
		})
		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(() => 
{
    // Create a super-user group with a user
    var name = new Authentik.User("name", new()
    {
        Username = "user",
    });

    var @group = new Authentik.Group("group", new()
    {
        Users = new[]
        {
            name.UserId,
        },
        IsSuperuser = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.authentik.User;
import com.pulumi.authentik.UserArgs;
import com.pulumi.authentik.Group;
import com.pulumi.authentik.GroupArgs;
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) {
        // Create a super-user group with a user
        var name = new User("name", UserArgs.builder()
            .username("user")
            .build());

        var group = new Group("group", GroupArgs.builder()
            .users(name.userId())
            .isSuperuser(true)
            .build());

    }
}
Copy
resources:
  # Create a super-user group with a user
  name:
    type: authentik:User
    properties:
      username: user
  group:
    type: authentik:Group
    properties:
      users:
        - ${name.userId}
      isSuperuser: true
Copy

Create Group Resource

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

Constructor syntax

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

@overload
def Group(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          attributes: Optional[str] = None,
          group_id: Optional[str] = None,
          is_superuser: Optional[bool] = None,
          name: Optional[str] = None,
          parent: Optional[str] = None,
          roles: Optional[Sequence[str]] = None,
          users: Optional[Sequence[float]] = None)
func NewGroup(ctx *Context, name string, args *GroupArgs, opts ...ResourceOption) (*Group, error)
public Group(string name, GroupArgs? args = null, CustomResourceOptions? opts = null)
public Group(String name, GroupArgs args)
public Group(String name, GroupArgs args, CustomResourceOptions options)
type: authentik:Group
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 GroupArgs
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 GroupArgs
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 GroupArgs
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 GroupArgs
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. GroupArgs
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 groupResource = new Authentik.Group("groupResource", new()
{
    Attributes = "string",
    GroupId = "string",
    IsSuperuser = false,
    Name = "string",
    Parent = "string",
    Roles = new[]
    {
        "string",
    },
    Users = new[]
    {
        0,
    },
});
Copy
example, err := authentik.NewGroup(ctx, "groupResource", &authentik.GroupArgs{
	Attributes:  pulumi.String("string"),
	GroupId:     pulumi.String("string"),
	IsSuperuser: pulumi.Bool(false),
	Name:        pulumi.String("string"),
	Parent:      pulumi.String("string"),
	Roles: pulumi.StringArray{
		pulumi.String("string"),
	},
	Users: pulumi.Float64Array{
		pulumi.Float64(0),
	},
})
Copy
var groupResource = new Group("groupResource", GroupArgs.builder()
    .attributes("string")
    .groupId("string")
    .isSuperuser(false)
    .name("string")
    .parent("string")
    .roles("string")
    .users(0)
    .build());
Copy
group_resource = authentik.Group("groupResource",
    attributes="string",
    group_id="string",
    is_superuser=False,
    name="string",
    parent="string",
    roles=["string"],
    users=[0])
Copy
const groupResource = new authentik.Group("groupResource", {
    attributes: "string",
    groupId: "string",
    isSuperuser: false,
    name: "string",
    parent: "string",
    roles: ["string"],
    users: [0],
});
Copy
type: authentik:Group
properties:
    attributes: string
    groupId: string
    isSuperuser: false
    name: string
    parent: string
    roles:
        - string
    users:
        - 0
Copy

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

Attributes string
JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
GroupId string
The ID of this resource.
IsSuperuser bool
Defaults to false.
Name string
Parent string
Roles List<string>
Users List<double>
Generated.
Attributes string
JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
GroupId string
The ID of this resource.
IsSuperuser bool
Defaults to false.
Name string
Parent string
Roles []string
Users []float64
Generated.
attributes String
JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
groupId String
The ID of this resource.
isSuperuser Boolean
Defaults to false.
name String
parent String
roles List<String>
users List<Double>
Generated.
attributes string
JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
groupId string
The ID of this resource.
isSuperuser boolean
Defaults to false.
name string
parent string
roles string[]
users number[]
Generated.
attributes str
JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
group_id str
The ID of this resource.
is_superuser bool
Defaults to false.
name str
parent str
roles Sequence[str]
users Sequence[float]
Generated.
attributes String
JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
groupId String
The ID of this resource.
isSuperuser Boolean
Defaults to false.
name String
parent String
roles List<String>
users List<Number>
Generated.

Outputs

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

Get an existing Group 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?: GroupState, opts?: CustomResourceOptions): Group
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        attributes: Optional[str] = None,
        group_id: Optional[str] = None,
        is_superuser: Optional[bool] = None,
        name: Optional[str] = None,
        parent: Optional[str] = None,
        roles: Optional[Sequence[str]] = None,
        users: Optional[Sequence[float]] = None) -> Group
func GetGroup(ctx *Context, name string, id IDInput, state *GroupState, opts ...ResourceOption) (*Group, error)
public static Group Get(string name, Input<string> id, GroupState? state, CustomResourceOptions? opts = null)
public static Group get(String name, Output<String> id, GroupState state, CustomResourceOptions options)
resources:  _:    type: authentik:Group    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:
Attributes string
JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
GroupId string
The ID of this resource.
IsSuperuser bool
Defaults to false.
Name string
Parent string
Roles List<string>
Users List<double>
Generated.
Attributes string
JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
GroupId string
The ID of this resource.
IsSuperuser bool
Defaults to false.
Name string
Parent string
Roles []string
Users []float64
Generated.
attributes String
JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
groupId String
The ID of this resource.
isSuperuser Boolean
Defaults to false.
name String
parent String
roles List<String>
users List<Double>
Generated.
attributes string
JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
groupId string
The ID of this resource.
isSuperuser boolean
Defaults to false.
name string
parent string
roles string[]
users number[]
Generated.
attributes str
JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
group_id str
The ID of this resource.
is_superuser bool
Defaults to false.
name str
parent str
roles Sequence[str]
users Sequence[float]
Generated.
attributes String
JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
groupId String
The ID of this resource.
isSuperuser Boolean
Defaults to false.
name String
parent String
roles List<String>
users List<Number>
Generated.

Package Details

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