1. Packages
  2. dbt Cloud
  3. API Docs
  4. Group
dbt Cloud v0.1.8 published on Tuesday, Jun 11, 2024 by Pulumi

dbtcloud.Group

Explore with Pulumi AI

dbtcloud logo
dbt Cloud v0.1.8 published on Tuesday, Jun 11, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dbtcloud from "@pulumi/dbtcloud";
    
    const tfGroup1 = new dbtcloud.Group("tf_group_1", {
        name: "TF Group 1",
        groupPermissions: [
            {
                permissionSet: "member",
                allProjects: true,
            },
            {
                permissionSet: "developer",
                allProjects: false,
                projectId: dbtProject.id,
                writableEnvironmentCategories: [
                    "development",
                    "staging",
                ],
            },
        ],
    });
    
    import pulumi
    import pulumi_dbtcloud as dbtcloud
    
    tf_group1 = dbtcloud.Group("tf_group_1",
        name="TF Group 1",
        group_permissions=[
            dbtcloud.GroupGroupPermissionArgs(
                permission_set="member",
                all_projects=True,
            ),
            dbtcloud.GroupGroupPermissionArgs(
                permission_set="developer",
                all_projects=False,
                project_id=dbt_project["id"],
                writable_environment_categories=[
                    "development",
                    "staging",
                ],
            ),
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-dbtcloud/sdk/go/dbtcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dbtcloud.NewGroup(ctx, "tf_group_1", &dbtcloud.GroupArgs{
    			Name: pulumi.String("TF Group 1"),
    			GroupPermissions: dbtcloud.GroupGroupPermissionArray{
    				&dbtcloud.GroupGroupPermissionArgs{
    					PermissionSet: pulumi.String("member"),
    					AllProjects:   pulumi.Bool(true),
    				},
    				&dbtcloud.GroupGroupPermissionArgs{
    					PermissionSet: pulumi.String("developer"),
    					AllProjects:   pulumi.Bool(false),
    					ProjectId:     pulumi.Any(dbtProject.Id),
    					WritableEnvironmentCategories: pulumi.StringArray{
    						pulumi.String("development"),
    						pulumi.String("staging"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DbtCloud = Pulumi.DbtCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var tfGroup1 = new DbtCloud.Group("tf_group_1", new()
        {
            Name = "TF Group 1",
            GroupPermissions = new[]
            {
                new DbtCloud.Inputs.GroupGroupPermissionArgs
                {
                    PermissionSet = "member",
                    AllProjects = true,
                },
                new DbtCloud.Inputs.GroupGroupPermissionArgs
                {
                    PermissionSet = "developer",
                    AllProjects = false,
                    ProjectId = dbtProject.Id,
                    WritableEnvironmentCategories = new[]
                    {
                        "development",
                        "staging",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dbtcloud.Group;
    import com.pulumi.dbtcloud.GroupArgs;
    import com.pulumi.dbtcloud.inputs.GroupGroupPermissionArgs;
    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 tfGroup1 = new Group("tfGroup1", GroupArgs.builder()
                .name("TF Group 1")
                .groupPermissions(            
                    GroupGroupPermissionArgs.builder()
                        .permissionSet("member")
                        .allProjects(true)
                        .build(),
                    GroupGroupPermissionArgs.builder()
                        .permissionSet("developer")
                        .allProjects(false)
                        .projectId(dbtProject.id())
                        .writableEnvironmentCategories(                    
                            "development",
                            "staging")
                        .build())
                .build());
    
        }
    }
    
    resources:
      tfGroup1:
        type: dbtcloud:Group
        name: tf_group_1
        properties:
          name: TF Group 1
          groupPermissions:
            - permissionSet: member
              allProjects: true
            - permissionSet: developer
              allProjects: false
              projectId: ${dbtProject.id}
              writableEnvironmentCategories:
                - development
                - staging
    

    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,
              assign_by_default: Optional[bool] = None,
              group_permissions: Optional[Sequence[GroupGroupPermissionArgs]] = None,
              name: Optional[str] = None,
              sso_mapping_groups: Optional[Sequence[str]] = 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: dbtcloud:Group
    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 GroupArgs
    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 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 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 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 String
    The unique name of the resource.
    args 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 DbtCloud.Group("groupResource", new()
    {
        AssignByDefault = false,
        GroupPermissions = new[]
        {
            new DbtCloud.Inputs.GroupGroupPermissionArgs
            {
                AllProjects = false,
                PermissionSet = "string",
                ProjectId = 0,
                WritableEnvironmentCategories = new[]
                {
                    "string",
                },
            },
        },
        Name = "string",
        SsoMappingGroups = new[]
        {
            "string",
        },
    });
    
    example, err := dbtcloud.NewGroup(ctx, "groupResource", &dbtcloud.GroupArgs{
    	AssignByDefault: pulumi.Bool(false),
    	GroupPermissions: dbtcloud.GroupGroupPermissionArray{
    		&dbtcloud.GroupGroupPermissionArgs{
    			AllProjects:   pulumi.Bool(false),
    			PermissionSet: pulumi.String("string"),
    			ProjectId:     pulumi.Int(0),
    			WritableEnvironmentCategories: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	Name: pulumi.String("string"),
    	SsoMappingGroups: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var groupResource = new Group("groupResource", GroupArgs.builder()
        .assignByDefault(false)
        .groupPermissions(GroupGroupPermissionArgs.builder()
            .allProjects(false)
            .permissionSet("string")
            .projectId(0)
            .writableEnvironmentCategories("string")
            .build())
        .name("string")
        .ssoMappingGroups("string")
        .build());
    
    group_resource = dbtcloud.Group("groupResource",
        assign_by_default=False,
        group_permissions=[dbtcloud.GroupGroupPermissionArgs(
            all_projects=False,
            permission_set="string",
            project_id=0,
            writable_environment_categories=["string"],
        )],
        name="string",
        sso_mapping_groups=["string"])
    
    const groupResource = new dbtcloud.Group("groupResource", {
        assignByDefault: false,
        groupPermissions: [{
            allProjects: false,
            permissionSet: "string",
            projectId: 0,
            writableEnvironmentCategories: ["string"],
        }],
        name: "string",
        ssoMappingGroups: ["string"],
    });
    
    type: dbtcloud:Group
    properties:
        assignByDefault: false
        groupPermissions:
            - allProjects: false
              permissionSet: string
              projectId: 0
              writableEnvironmentCategories:
                - string
        name: string
        ssoMappingGroups:
            - string
    

    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

    The Group resource accepts the following input properties:

    AssignByDefault bool
    Whether the group will be assigned by default to users. The value needs to be the same for all partial permissions for the same group.
    GroupPermissions List<Pulumi.DbtCloud.Inputs.GroupGroupPermission>
    Partial permissions for the group. Those permissions will be added/removed when config is added/removed.
    Name string
    The name of the group. This is used to identify an existing group
    SsoMappingGroups List<string>
    Mapping groups from the IdP. At the moment the complete list needs to be provided in each partial permission for the same group.
    AssignByDefault bool
    Whether the group will be assigned by default to users. The value needs to be the same for all partial permissions for the same group.
    GroupPermissions []GroupGroupPermissionArgs
    Partial permissions for the group. Those permissions will be added/removed when config is added/removed.
    Name string
    The name of the group. This is used to identify an existing group
    SsoMappingGroups []string
    Mapping groups from the IdP. At the moment the complete list needs to be provided in each partial permission for the same group.
    assignByDefault Boolean
    Whether the group will be assigned by default to users. The value needs to be the same for all partial permissions for the same group.
    groupPermissions List<GroupGroupPermission>
    Partial permissions for the group. Those permissions will be added/removed when config is added/removed.
    name String
    The name of the group. This is used to identify an existing group
    ssoMappingGroups List<String>
    Mapping groups from the IdP. At the moment the complete list needs to be provided in each partial permission for the same group.
    assignByDefault boolean
    Whether the group will be assigned by default to users. The value needs to be the same for all partial permissions for the same group.
    groupPermissions GroupGroupPermission[]
    Partial permissions for the group. Those permissions will be added/removed when config is added/removed.
    name string
    The name of the group. This is used to identify an existing group
    ssoMappingGroups string[]
    Mapping groups from the IdP. At the moment the complete list needs to be provided in each partial permission for the same group.
    assign_by_default bool
    Whether the group will be assigned by default to users. The value needs to be the same for all partial permissions for the same group.
    group_permissions Sequence[GroupGroupPermissionArgs]
    Partial permissions for the group. Those permissions will be added/removed when config is added/removed.
    name str
    The name of the group. This is used to identify an existing group
    sso_mapping_groups Sequence[str]
    Mapping groups from the IdP. At the moment the complete list needs to be provided in each partial permission for the same group.
    assignByDefault Boolean
    Whether the group will be assigned by default to users. The value needs to be the same for all partial permissions for the same group.
    groupPermissions List<Property Map>
    Partial permissions for the group. Those permissions will be added/removed when config is added/removed.
    name String
    The name of the group. This is used to identify an existing group
    ssoMappingGroups List<String>
    Mapping groups from the IdP. At the moment the complete list needs to be provided in each partial permission for the same group.

    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,
            assign_by_default: Optional[bool] = None,
            group_permissions: Optional[Sequence[GroupGroupPermissionArgs]] = None,
            name: Optional[str] = None,
            sso_mapping_groups: Optional[Sequence[str]] = 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)
    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:
    AssignByDefault bool
    Whether the group will be assigned by default to users. The value needs to be the same for all partial permissions for the same group.
    GroupPermissions List<Pulumi.DbtCloud.Inputs.GroupGroupPermission>
    Partial permissions for the group. Those permissions will be added/removed when config is added/removed.
    Name string
    The name of the group. This is used to identify an existing group
    SsoMappingGroups List<string>
    Mapping groups from the IdP. At the moment the complete list needs to be provided in each partial permission for the same group.
    AssignByDefault bool
    Whether the group will be assigned by default to users. The value needs to be the same for all partial permissions for the same group.
    GroupPermissions []GroupGroupPermissionArgs
    Partial permissions for the group. Those permissions will be added/removed when config is added/removed.
    Name string
    The name of the group. This is used to identify an existing group
    SsoMappingGroups []string
    Mapping groups from the IdP. At the moment the complete list needs to be provided in each partial permission for the same group.
    assignByDefault Boolean
    Whether the group will be assigned by default to users. The value needs to be the same for all partial permissions for the same group.
    groupPermissions List<GroupGroupPermission>
    Partial permissions for the group. Those permissions will be added/removed when config is added/removed.
    name String
    The name of the group. This is used to identify an existing group
    ssoMappingGroups List<String>
    Mapping groups from the IdP. At the moment the complete list needs to be provided in each partial permission for the same group.
    assignByDefault boolean
    Whether the group will be assigned by default to users. The value needs to be the same for all partial permissions for the same group.
    groupPermissions GroupGroupPermission[]
    Partial permissions for the group. Those permissions will be added/removed when config is added/removed.
    name string
    The name of the group. This is used to identify an existing group
    ssoMappingGroups string[]
    Mapping groups from the IdP. At the moment the complete list needs to be provided in each partial permission for the same group.
    assign_by_default bool
    Whether the group will be assigned by default to users. The value needs to be the same for all partial permissions for the same group.
    group_permissions Sequence[GroupGroupPermissionArgs]
    Partial permissions for the group. Those permissions will be added/removed when config is added/removed.
    name str
    The name of the group. This is used to identify an existing group
    sso_mapping_groups Sequence[str]
    Mapping groups from the IdP. At the moment the complete list needs to be provided in each partial permission for the same group.
    assignByDefault Boolean
    Whether the group will be assigned by default to users. The value needs to be the same for all partial permissions for the same group.
    groupPermissions List<Property Map>
    Partial permissions for the group. Those permissions will be added/removed when config is added/removed.
    name String
    The name of the group. This is used to identify an existing group
    ssoMappingGroups List<String>
    Mapping groups from the IdP. At the moment the complete list needs to be provided in each partial permission for the same group.

    Supporting Types

    GroupGroupPermission, GroupGroupPermissionArgs

    AllProjects bool
    Whether access should be provided for all projects or not.
    PermissionSet string
    Set of permissions to apply. The permissions allowed are the same as the ones for the dbtcloud.Group resource.
    ProjectId int
    Project ID to apply this permission to for this group.
    WritableEnvironmentCategories List<string>
    What types of environments to apply Write permissions to. Even if Write access is restricted to some environment types, the permission set will have Read access to all environments. The values allowed are all, development, staging, production and other. Not setting a value is the same as selecting all. Not all permission sets support environment level write settings, only analyst, database_admin, developer, git_admin and team_admin.
    AllProjects bool
    Whether access should be provided for all projects or not.
    PermissionSet string
    Set of permissions to apply. The permissions allowed are the same as the ones for the dbtcloud.Group resource.
    ProjectId int
    Project ID to apply this permission to for this group.
    WritableEnvironmentCategories []string
    What types of environments to apply Write permissions to. Even if Write access is restricted to some environment types, the permission set will have Read access to all environments. The values allowed are all, development, staging, production and other. Not setting a value is the same as selecting all. Not all permission sets support environment level write settings, only analyst, database_admin, developer, git_admin and team_admin.
    allProjects Boolean
    Whether access should be provided for all projects or not.
    permissionSet String
    Set of permissions to apply. The permissions allowed are the same as the ones for the dbtcloud.Group resource.
    projectId Integer
    Project ID to apply this permission to for this group.
    writableEnvironmentCategories List<String>
    What types of environments to apply Write permissions to. Even if Write access is restricted to some environment types, the permission set will have Read access to all environments. The values allowed are all, development, staging, production and other. Not setting a value is the same as selecting all. Not all permission sets support environment level write settings, only analyst, database_admin, developer, git_admin and team_admin.
    allProjects boolean
    Whether access should be provided for all projects or not.
    permissionSet string
    Set of permissions to apply. The permissions allowed are the same as the ones for the dbtcloud.Group resource.
    projectId number
    Project ID to apply this permission to for this group.
    writableEnvironmentCategories string[]
    What types of environments to apply Write permissions to. Even if Write access is restricted to some environment types, the permission set will have Read access to all environments. The values allowed are all, development, staging, production and other. Not setting a value is the same as selecting all. Not all permission sets support environment level write settings, only analyst, database_admin, developer, git_admin and team_admin.
    all_projects bool
    Whether access should be provided for all projects or not.
    permission_set str
    Set of permissions to apply. The permissions allowed are the same as the ones for the dbtcloud.Group resource.
    project_id int
    Project ID to apply this permission to for this group.
    writable_environment_categories Sequence[str]
    What types of environments to apply Write permissions to. Even if Write access is restricted to some environment types, the permission set will have Read access to all environments. The values allowed are all, development, staging, production and other. Not setting a value is the same as selecting all. Not all permission sets support environment level write settings, only analyst, database_admin, developer, git_admin and team_admin.
    allProjects Boolean
    Whether access should be provided for all projects or not.
    permissionSet String
    Set of permissions to apply. The permissions allowed are the same as the ones for the dbtcloud.Group resource.
    projectId Number
    Project ID to apply this permission to for this group.
    writableEnvironmentCategories List<String>
    What types of environments to apply Write permissions to. Even if Write access is restricted to some environment types, the permission set will have Read access to all environments. The values allowed are all, development, staging, production and other. Not setting a value is the same as selecting all. Not all permission sets support environment level write settings, only analyst, database_admin, developer, git_admin and team_admin.

    Import

    using import blocks (requires Terraform >= 1.5)

    import {

    to = dbtcloud_group.my_group

    id = “group_id”

    }

    import {

    to = dbtcloud_group.my_group

    id = “12345”

    }

    using the older import command

    $ pulumi import dbtcloud:index/group:Group my_group "group_id"
    
    $ pulumi import dbtcloud:index/group:Group my_group 12345
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    dbtcloud pulumi/pulumi-dbtcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dbtcloud Terraform Provider.
    dbtcloud logo
    dbt Cloud v0.1.8 published on Tuesday, Jun 11, 2024 by Pulumi