1. Packages
  2. FusionAuth
  3. API Docs
  4. FusionAuthGroup
FusionAuth v5.0.4 published on Tuesday, Jul 9, 2024 by Theo Gravity

fusionauth.FusionAuthGroup

Explore with Pulumi AI

fusionauth logo
FusionAuth v5.0.4 published on Tuesday, Jul 9, 2024 by Theo Gravity

    # 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

    import * as pulumi from "@pulumi/pulumi";
    import * as fusionauth from "pulumi-fusionauth";
    
    const myGroup = new fusionauth.FusionAuthGroup("myGroup", {
        tenantId: fusionauth_tenant.my_tenant.id,
        roleIds: [fusionauth_application_role.admins.id],
    });
    
    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"]])
    
    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{
    				fusionauth_application_role.Admins.Id,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Fusionauth = theogravity.Fusionauth;
    
    return await Deployment.RunAsync(() => 
    {
        var myGroup = new Fusionauth.FusionAuthGroup("myGroup", new()
        {
            TenantId = fusionauth_tenant.My_tenant.Id,
            RoleIds = new[]
            {
                fusionauth_application_role.Admins.Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.fusionauth.FusionAuthGroup;
    import com.pulumi.fusionauth.FusionAuthGroupArgs;
    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) {
            var myGroup = new FusionAuthGroup("myGroup", FusionAuthGroupArgs.builder()
                .tenantId(fusionauth_tenant.my_tenant().id())
                .roleIds(fusionauth_application_role.admins().id())
                .build());
    
        }
    }
    
    resources:
      myGroup:
        type: fusionauth:FusionAuthGroup
        properties:
          tenantId: ${fusionauth_tenant.my_tenant.id}
          roleIds:
            - ${fusionauth_application_role.admins.id}
    

    Create FusionAuthGroup Resource

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

    Constructor syntax

    new FusionAuthGroup(name: string, args: FusionAuthGroupArgs, opts?: CustomResourceOptions);
    @overload
    def FusionAuthGroup(resource_name: str,
                        args: FusionAuthGroupArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def FusionAuthGroup(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        tenant_id: Optional[str] = None,
                        data: Optional[Mapping[str, Any]] = None,
                        group_id: Optional[str] = None,
                        name: Optional[str] = None,
                        role_ids: Optional[Sequence[str]] = 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.
    
    

    Parameters

    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.

    Constructor example

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

    var fusionAuthGroupResource = new Fusionauth.FusionAuthGroup("fusionAuthGroupResource", new()
    {
        TenantId = "string",
        Data = 
        {
            { "string", "any" },
        },
        GroupId = "string",
        Name = "string",
        RoleIds = new[]
        {
            "string",
        },
    });
    
    example, err := fusionauth.NewFusionAuthGroup(ctx, "fusionAuthGroupResource", &fusionauth.FusionAuthGroupArgs{
    	TenantId: pulumi.String("string"),
    	Data: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	GroupId: pulumi.String("string"),
    	Name:    pulumi.String("string"),
    	RoleIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var fusionAuthGroupResource = new FusionAuthGroup("fusionAuthGroupResource", FusionAuthGroupArgs.builder()
        .tenantId("string")
        .data(Map.of("string", "any"))
        .groupId("string")
        .name("string")
        .roleIds("string")
        .build());
    
    fusion_auth_group_resource = fusionauth.FusionAuthGroup("fusionAuthGroupResource",
        tenant_id="string",
        data={
            "string": "any",
        },
        group_id="string",
        name="string",
        role_ids=["string"])
    
    const fusionAuthGroupResource = new fusionauth.FusionAuthGroup("fusionAuthGroupResource", {
        tenantId: "string",
        data: {
            string: "any",
        },
        groupId: "string",
        name: "string",
        roleIds: ["string"],
    });
    
    type: fusionauth:FusionAuthGroup
    properties:
        data:
            string: any
        groupId: string
        name: string
        roleIds:
            - string
        tenantId: string
    

    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 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
    fusionauth theogravity/pulumi-fusionauth
    License
    MIT
    Notes
    This Pulumi package is based on the fusionauth Terraform Provider.
    fusionauth logo
    FusionAuth v5.0.4 published on Tuesday, Jul 9, 2024 by Theo Gravity