FusionAuth

Community
Package contributed by a community member
v0.9.7 published on Thursday, Jul 28, 2022 by Theo Gravity

FusionAuthGroup

# Group Resource

A FusionAuth Group is a named object that optionally contains one to many Application Roles.

When a Group does not contain any Application Roles it can still be utilized to logically associate users. Assigning Application Roles to a group allow it to be used to dynamically manage Role assignment to registered Users. In this second scenario as long as a User is registered to an Application the Group membership will allow them to inherit the corresponding Roles from the Group.

Groups API

Example Usage

using Pulumi;
using Fusionauth = theogravity.Fusionauth;

class MyStack : Stack
{
    public MyStack()
    {
        var myGroup = new Fusionauth.FusionAuthGroup("myGroup", new Fusionauth.FusionAuthGroupArgs
        {
            TenantId = fusionauth_tenant.My_tenant.Id,
            RoleIds = 
            {
                fusionauth_application_role.Admins.Id,
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/theogravity/pulumi-fusionauth/sdk/go/fusionauth"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := fusionauth.NewFusionAuthGroup(ctx, "myGroup", &fusionauth.FusionAuthGroupArgs{
			TenantId: pulumi.Any(fusionauth_tenant.My_tenant.Id),
			RoleIds: pulumi.StringArray{
				pulumi.Any(fusionauth_application_role.Admins.Id),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var myGroup = new FusionAuthGroup("myGroup", FusionAuthGroupArgs.builder()        
            .tenantId(fusionauth_tenant.my_tenant().id())
            .roleIds(fusionauth_application_role.admins().id())
            .build());

    }
}
import pulumi
import theogravity_pulumi-fusionauth as fusionauth

my_group = fusionauth.FusionAuthGroup("myGroup",
    tenant_id=fusionauth_tenant["my_tenant"]["id"],
    role_ids=[fusionauth_application_role["admins"]["id"]])
import * as pulumi from "@pulumi/pulumi";
import * as pulumi_fusionauth from "pulumi-fusionauth";

const myGroup = new fusionauth.FusionAuthGroup("myGroup", {
    tenantId: fusionauth_tenant.my_tenant.id,
    roleIds: [fusionauth_application_role.admins.id],
});
resources:
  myGroup:
    type: fusionauth:FusionAuthGroup
    properties:
      tenantId: ${fusionauth_tenant.my_tenant.id}
      roleIds:
        - ${fusionauth_application_role.admins.id}

Create a FusionAuthGroup Resource

new FusionAuthGroup(name: string, args: FusionAuthGroupArgs, opts?: CustomResourceOptions);
@overload
def FusionAuthGroup(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    data: Optional[Mapping[str, Any]] = None,
                    group_id: Optional[str] = None,
                    name: Optional[str] = None,
                    role_ids: Optional[Sequence[str]] = None,
                    tenant_id: Optional[str] = None)
@overload
def FusionAuthGroup(resource_name: str,
                    args: FusionAuthGroupArgs,
                    opts: Optional[ResourceOptions] = None)
func NewFusionAuthGroup(ctx *Context, name string, args FusionAuthGroupArgs, opts ...ResourceOption) (*FusionAuthGroup, error)
public FusionAuthGroup(string name, FusionAuthGroupArgs args, CustomResourceOptions? opts = null)
public FusionAuthGroup(String name, FusionAuthGroupArgs args)
public FusionAuthGroup(String name, FusionAuthGroupArgs args, CustomResourceOptions options)
type: fusionauth:FusionAuthGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args FusionAuthGroupArgs
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 FusionAuthGroupArgs
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 FusionAuthGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args FusionAuthGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args FusionAuthGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

FusionAuthGroup Resource Properties

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

Inputs

The FusionAuthGroup resource accepts the following input properties:

TenantId string

The unique Id of the tenant used to scope this API request.

Data Dictionary<string, object>

An object that can hold any information about the Group that should be persisted.

GroupId string

The Id to use for the new Group. If not specified a secure random UUID will be generated.

Name string

The name of the Group.

RoleIds List<string>

The Application Roles to assign to this group.

TenantId string

The unique Id of the tenant used to scope this API request.

Data map[string]interface{}

An object that can hold any information about the Group that should be persisted.

GroupId string

The Id to use for the new Group. If not specified a secure random UUID will be generated.

Name string

The name of the Group.

RoleIds []string

The Application Roles to assign to this group.

tenantId String

The unique Id of the tenant used to scope this API request.

data Map<String,Object>

An object that can hold any information about the Group that should be persisted.

groupId String

The Id to use for the new Group. If not specified a secure random UUID will be generated.

name String

The name of the Group.

roleIds List<String>

The Application Roles to assign to this group.

tenantId string

The unique Id of the tenant used to scope this API request.

data {[key: string]: any}

An object that can hold any information about the Group that should be persisted.

groupId string

The Id to use for the new Group. If not specified a secure random UUID will be generated.

name string

The name of the Group.

roleIds string[]

The Application Roles to assign to this group.

tenant_id str

The unique Id of the tenant used to scope this API request.

data Mapping[str, Any]

An object that can hold any information about the Group that should be persisted.

group_id str

The Id to use for the new Group. If not specified a secure random UUID will be generated.

name str

The name of the Group.

role_ids Sequence[str]

The Application Roles to assign to this group.

tenantId String

The unique Id of the tenant used to scope this API request.

data Map<Any>

An object that can hold any information about the Group that should be persisted.

groupId String

The Id to use for the new Group. If not specified a secure random UUID will be generated.

name String

The name of the Group.

roleIds List<String>

The Application Roles to assign to this group.

Outputs

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

Get an existing FusionAuthGroup 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?: FusionAuthGroupState, opts?: CustomResourceOptions): FusionAuthGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        data: Optional[Mapping[str, Any]] = None,
        group_id: Optional[str] = None,
        name: Optional[str] = None,
        role_ids: Optional[Sequence[str]] = None,
        tenant_id: Optional[str] = None) -> FusionAuthGroup
func GetFusionAuthGroup(ctx *Context, name string, id IDInput, state *FusionAuthGroupState, opts ...ResourceOption) (*FusionAuthGroup, error)
public static FusionAuthGroup Get(string name, Input<string> id, FusionAuthGroupState? state, CustomResourceOptions? opts = null)
public static FusionAuthGroup get(String name, Output<String> id, FusionAuthGroupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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:
Data Dictionary<string, object>

An object that can hold any information about the Group that should be persisted.

GroupId string

The Id to use for the new Group. If not specified a secure random UUID will be generated.

Name string

The name of the Group.

RoleIds List<string>

The Application Roles to assign to this group.

TenantId string

The unique Id of the tenant used to scope this API request.

Data map[string]interface{}

An object that can hold any information about the Group that should be persisted.

GroupId string

The Id to use for the new Group. If not specified a secure random UUID will be generated.

Name string

The name of the Group.

RoleIds []string

The Application Roles to assign to this group.

TenantId string

The unique Id of the tenant used to scope this API request.

data Map<String,Object>

An object that can hold any information about the Group that should be persisted.

groupId String

The Id to use for the new Group. If not specified a secure random UUID will be generated.

name String

The name of the Group.

roleIds List<String>

The Application Roles to assign to this group.

tenantId String

The unique Id of the tenant used to scope this API request.

data {[key: string]: any}

An object that can hold any information about the Group that should be persisted.

groupId string

The Id to use for the new Group. If not specified a secure random UUID will be generated.

name string

The name of the Group.

roleIds string[]

The Application Roles to assign to this group.

tenantId string

The unique Id of the tenant used to scope this API request.

data Mapping[str, Any]

An object that can hold any information about the Group that should be persisted.

group_id str

The Id to use for the new Group. If not specified a secure random UUID will be generated.

name str

The name of the Group.

role_ids Sequence[str]

The Application Roles to assign to this group.

tenant_id str

The unique Id of the tenant used to scope this API request.

data Map<Any>

An object that can hold any information about the Group that should be persisted.

groupId String

The Id to use for the new Group. If not specified a secure random UUID will be generated.

name String

The name of the Group.

roleIds List<String>

The Application Roles to assign to this group.

tenantId String

The unique Id of the tenant used to scope this API request.

Package Details

Repository
https://github.com/theogravity/pulumi-fusionauth
License
MIT
Notes

This Pulumi package is based on the fusionauth Terraform Provider.