dbtcloud.Group
Explore with Pulumi AI
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=[
{
"permission_set": "member",
"all_projects": True,
},
{
"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)
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=[{
"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
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:
- Assign
By boolDefault - 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 List<Pulumi.Dbt Cloud. Inputs. Group Group Permission> - 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
- Sso
Mapping List<string>Groups - 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 boolDefault - 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 []GroupGroup Permission Args - 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
- Sso
Mapping []stringGroups - 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 BooleanDefault - 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 List<GroupGroup Permission> - 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
- sso
Mapping List<String>Groups - 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 booleanDefault - 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 GroupGroup Permission[] - 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
- sso
Mapping string[]Groups - 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_ booldefault - 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[GroupGroup Permission Args] - 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_ Sequence[str]groups - 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 BooleanDefault - 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 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
- sso
Mapping List<String>Groups - 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.
- Assign
By boolDefault - 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 List<Pulumi.Dbt Cloud. Inputs. Group Group Permission> - 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
- Sso
Mapping List<string>Groups - 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 boolDefault - 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 []GroupGroup Permission Args - 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
- Sso
Mapping []stringGroups - 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 BooleanDefault - 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 List<GroupGroup Permission> - 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
- sso
Mapping List<String>Groups - 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 booleanDefault - 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 GroupGroup Permission[] - 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
- sso
Mapping string[]Groups - 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_ booldefault - 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[GroupGroup Permission Args] - 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_ Sequence[str]groups - 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 BooleanDefault - 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 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
- sso
Mapping List<String>Groups - 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
- All
Projects bool - Whether access should be provided for all projects or not.
- Permission
Set string - 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 List<string>Categories - 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
andother
. Not setting a value is the same as selectingall
. Not all permission sets support environment level write settings, onlyanalyst
,database_admin
,developer
,git_admin
andteam_admin
.
- All
Projects bool - Whether access should be provided for all projects or not.
- Permission
Set string - 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 []stringCategories - 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
andother
. Not setting a value is the same as selectingall
. Not all permission sets support environment level write settings, onlyanalyst
,database_admin
,developer
,git_admin
andteam_admin
.
- all
Projects Boolean - Whether access should be provided for all projects or not.
- permission
Set String - Set of permissions to apply. The permissions allowed are the same as the ones for the
dbtcloud.Group
resource. - project
Id Integer - Project ID to apply this permission to for this group.
- writable
Environment List<String>Categories - 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
andother
. Not setting a value is the same as selectingall
. Not all permission sets support environment level write settings, onlyanalyst
,database_admin
,developer
,git_admin
andteam_admin
.
- all
Projects boolean - Whether access should be provided for all projects or not.
- permission
Set string - Set of permissions to apply. The permissions allowed are the same as the ones for the
dbtcloud.Group
resource. - project
Id number - Project ID to apply this permission to for this group.
- writable
Environment string[]Categories - 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
andother
. Not setting a value is the same as selectingall
. Not all permission sets support environment level write settings, onlyanalyst
,database_admin
,developer
,git_admin
andteam_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_ Sequence[str]categories - 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
andother
. Not setting a value is the same as selectingall
. Not all permission sets support environment level write settings, onlyanalyst
,database_admin
,developer
,git_admin
andteam_admin
.
- all
Projects Boolean - Whether access should be provided for all projects or not.
- permission
Set String - Set of permissions to apply. The permissions allowed are the same as the ones for the
dbtcloud.Group
resource. - project
Id Number - Project ID to apply this permission to for this group.
- writable
Environment List<String>Categories - 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
andother
. Not setting a value is the same as selectingall
. Not all permission sets support environment level write settings, onlyanalyst
,database_admin
,developer
,git_admin
andteam_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.