1. Packages
  2. Aiven
  3. API Docs
  4. OrganizationGroupProject
Aiven v6.18.0 published on Thursday, Jun 27, 2024 by Pulumi

aiven.OrganizationGroupProject

Explore with Pulumi AI

aiven logo
Aiven v6.18.0 published on Thursday, Jun 27, 2024 by Pulumi

    Adds and manages a group of users as members of a project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const exampleProject = new aiven.Project("example_project", {
        project: "example-project",
        parentId: main.id,
    });
    const example = new aiven.OrganizationUserGroup("example", {
        description: "Example group of users.",
        organizationId: main.id,
        name: "Example group",
    });
    const projectAdmin = new aiven.OrganizationUserGroupMember("project_admin", {
        groupId: example.groupId,
        organizationId: main.id,
        userId: "u123a456b7890c",
    });
    const exampleOrganizationGroupProject = new aiven.OrganizationGroupProject("example", {
        groupId: example.groupId,
        project: exampleProjectAivenProject.project,
        role: "admin",
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    example_project = aiven.Project("example_project",
        project="example-project",
        parent_id=main["id"])
    example = aiven.OrganizationUserGroup("example",
        description="Example group of users.",
        organization_id=main["id"],
        name="Example group")
    project_admin = aiven.OrganizationUserGroupMember("project_admin",
        group_id=example.group_id,
        organization_id=main["id"],
        user_id="u123a456b7890c")
    example_organization_group_project = aiven.OrganizationGroupProject("example",
        group_id=example.group_id,
        project=example_project_aiven_project["project"],
        role="admin")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aiven.NewProject(ctx, "example_project", &aiven.ProjectArgs{
    			Project:  pulumi.String("example-project"),
    			ParentId: pulumi.Any(main.Id),
    		})
    		if err != nil {
    			return err
    		}
    		example, err := aiven.NewOrganizationUserGroup(ctx, "example", &aiven.OrganizationUserGroupArgs{
    			Description:    pulumi.String("Example group of users."),
    			OrganizationId: pulumi.Any(main.Id),
    			Name:           pulumi.String("Example group"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = aiven.NewOrganizationUserGroupMember(ctx, "project_admin", &aiven.OrganizationUserGroupMemberArgs{
    			GroupId:        example.GroupId,
    			OrganizationId: pulumi.Any(main.Id),
    			UserId:         pulumi.String("u123a456b7890c"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = aiven.NewOrganizationGroupProject(ctx, "example", &aiven.OrganizationGroupProjectArgs{
    			GroupId: example.GroupId,
    			Project: pulumi.Any(exampleProjectAivenProject.Project),
    			Role:    pulumi.String("admin"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aiven = Pulumi.Aiven;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleProject = new Aiven.Project("example_project", new()
        {
            ProjectName = "example-project",
            ParentId = main.Id,
        });
    
        var example = new Aiven.OrganizationUserGroup("example", new()
        {
            Description = "Example group of users.",
            OrganizationId = main.Id,
            Name = "Example group",
        });
    
        var projectAdmin = new Aiven.OrganizationUserGroupMember("project_admin", new()
        {
            GroupId = example.GroupId,
            OrganizationId = main.Id,
            UserId = "u123a456b7890c",
        });
    
        var exampleOrganizationGroupProject = new Aiven.OrganizationGroupProject("example", new()
        {
            GroupId = example.GroupId,
            Project = exampleProjectAivenProject.Project,
            Role = "admin",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aiven.Project;
    import com.pulumi.aiven.ProjectArgs;
    import com.pulumi.aiven.OrganizationUserGroup;
    import com.pulumi.aiven.OrganizationUserGroupArgs;
    import com.pulumi.aiven.OrganizationUserGroupMember;
    import com.pulumi.aiven.OrganizationUserGroupMemberArgs;
    import com.pulumi.aiven.OrganizationGroupProject;
    import com.pulumi.aiven.OrganizationGroupProjectArgs;
    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 exampleProject = new Project("exampleProject", ProjectArgs.builder()
                .project("example-project")
                .parentId(main.id())
                .build());
    
            var example = new OrganizationUserGroup("example", OrganizationUserGroupArgs.builder()
                .description("Example group of users.")
                .organizationId(main.id())
                .name("Example group")
                .build());
    
            var projectAdmin = new OrganizationUserGroupMember("projectAdmin", OrganizationUserGroupMemberArgs.builder()
                .groupId(example.groupId())
                .organizationId(main.id())
                .userId("u123a456b7890c")
                .build());
    
            var exampleOrganizationGroupProject = new OrganizationGroupProject("exampleOrganizationGroupProject", OrganizationGroupProjectArgs.builder()
                .groupId(example.groupId())
                .project(exampleProjectAivenProject.project())
                .role("admin")
                .build());
    
        }
    }
    
    resources:
      exampleProject:
        type: aiven:Project
        name: example_project
        properties:
          project: example-project
          parentId: ${main.id}
      example:
        type: aiven:OrganizationUserGroup
        properties:
          description: Example group of users.
          organizationId: ${main.id}
          name: Example group
      projectAdmin:
        type: aiven:OrganizationUserGroupMember
        name: project_admin
        properties:
          groupId: ${example.groupId}
          organizationId: ${main.id}
          userId: u123a456b7890c
      exampleOrganizationGroupProject:
        type: aiven:OrganizationGroupProject
        name: example
        properties:
          groupId: ${example.groupId}
          project: ${exampleProjectAivenProject.project}
          role: admin
    

    Create OrganizationGroupProject Resource

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

    Constructor syntax

    new OrganizationGroupProject(name: string, args: OrganizationGroupProjectArgs, opts?: CustomResourceOptions);
    @overload
    def OrganizationGroupProject(resource_name: str,
                                 args: OrganizationGroupProjectArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def OrganizationGroupProject(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 group_id: Optional[str] = None,
                                 project: Optional[str] = None,
                                 role: Optional[str] = None,
                                 timeouts: Optional[OrganizationGroupProjectTimeoutsArgs] = None)
    func NewOrganizationGroupProject(ctx *Context, name string, args OrganizationGroupProjectArgs, opts ...ResourceOption) (*OrganizationGroupProject, error)
    public OrganizationGroupProject(string name, OrganizationGroupProjectArgs args, CustomResourceOptions? opts = null)
    public OrganizationGroupProject(String name, OrganizationGroupProjectArgs args)
    public OrganizationGroupProject(String name, OrganizationGroupProjectArgs args, CustomResourceOptions options)
    
    type: aiven:OrganizationGroupProject
    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 OrganizationGroupProjectArgs
    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 OrganizationGroupProjectArgs
    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 OrganizationGroupProjectArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OrganizationGroupProjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OrganizationGroupProjectArgs
    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 organizationGroupProjectResource = new Aiven.OrganizationGroupProject("organizationGroupProjectResource", new()
    {
        GroupId = "string",
        Project = "string",
        Role = "string",
        Timeouts = new Aiven.Inputs.OrganizationGroupProjectTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Read = "string",
            Update = "string",
        },
    });
    
    example, err := aiven.NewOrganizationGroupProject(ctx, "organizationGroupProjectResource", &aiven.OrganizationGroupProjectArgs{
    	GroupId: pulumi.String("string"),
    	Project: pulumi.String("string"),
    	Role:    pulumi.String("string"),
    	Timeouts: &aiven.OrganizationGroupProjectTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Read:   pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var organizationGroupProjectResource = new OrganizationGroupProject("organizationGroupProjectResource", OrganizationGroupProjectArgs.builder()
        .groupId("string")
        .project("string")
        .role("string")
        .timeouts(OrganizationGroupProjectTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .read("string")
            .update("string")
            .build())
        .build());
    
    organization_group_project_resource = aiven.OrganizationGroupProject("organizationGroupProjectResource",
        group_id="string",
        project="string",
        role="string",
        timeouts=aiven.OrganizationGroupProjectTimeoutsArgs(
            create="string",
            delete="string",
            read="string",
            update="string",
        ))
    
    const organizationGroupProjectResource = new aiven.OrganizationGroupProject("organizationGroupProjectResource", {
        groupId: "string",
        project: "string",
        role: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            read: "string",
            update: "string",
        },
    });
    
    type: aiven:OrganizationGroupProject
    properties:
        groupId: string
        project: string
        role: string
        timeouts:
            create: string
            delete: string
            read: string
            update: string
    

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

    GroupId string
    The ID of the user group.
    Project string
    The project that the users in the group are members of.
    Role string
    Role assigned to all users in the group for the project.
    Timeouts OrganizationGroupProjectTimeouts
    GroupId string
    The ID of the user group.
    Project string
    The project that the users in the group are members of.
    Role string
    Role assigned to all users in the group for the project.
    Timeouts OrganizationGroupProjectTimeoutsArgs
    groupId String
    The ID of the user group.
    project String
    The project that the users in the group are members of.
    role String
    Role assigned to all users in the group for the project.
    timeouts OrganizationGroupProjectTimeouts
    groupId string
    The ID of the user group.
    project string
    The project that the users in the group are members of.
    role string
    Role assigned to all users in the group for the project.
    timeouts OrganizationGroupProjectTimeouts
    group_id str
    The ID of the user group.
    project str
    The project that the users in the group are members of.
    role str
    Role assigned to all users in the group for the project.
    timeouts OrganizationGroupProjectTimeoutsArgs
    groupId String
    The ID of the user group.
    project String
    The project that the users in the group are members of.
    role String
    Role assigned to all users in the group for the project.
    timeouts Property Map

    Outputs

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

    Get an existing OrganizationGroupProject 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?: OrganizationGroupProjectState, opts?: CustomResourceOptions): OrganizationGroupProject
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            group_id: Optional[str] = None,
            project: Optional[str] = None,
            role: Optional[str] = None,
            timeouts: Optional[OrganizationGroupProjectTimeoutsArgs] = None) -> OrganizationGroupProject
    func GetOrganizationGroupProject(ctx *Context, name string, id IDInput, state *OrganizationGroupProjectState, opts ...ResourceOption) (*OrganizationGroupProject, error)
    public static OrganizationGroupProject Get(string name, Input<string> id, OrganizationGroupProjectState? state, CustomResourceOptions? opts = null)
    public static OrganizationGroupProject get(String name, Output<String> id, OrganizationGroupProjectState 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:
    GroupId string
    The ID of the user group.
    Project string
    The project that the users in the group are members of.
    Role string
    Role assigned to all users in the group for the project.
    Timeouts OrganizationGroupProjectTimeouts
    GroupId string
    The ID of the user group.
    Project string
    The project that the users in the group are members of.
    Role string
    Role assigned to all users in the group for the project.
    Timeouts OrganizationGroupProjectTimeoutsArgs
    groupId String
    The ID of the user group.
    project String
    The project that the users in the group are members of.
    role String
    Role assigned to all users in the group for the project.
    timeouts OrganizationGroupProjectTimeouts
    groupId string
    The ID of the user group.
    project string
    The project that the users in the group are members of.
    role string
    Role assigned to all users in the group for the project.
    timeouts OrganizationGroupProjectTimeouts
    group_id str
    The ID of the user group.
    project str
    The project that the users in the group are members of.
    role str
    Role assigned to all users in the group for the project.
    timeouts OrganizationGroupProjectTimeoutsArgs
    groupId String
    The ID of the user group.
    project String
    The project that the users in the group are members of.
    role String
    Role assigned to all users in the group for the project.
    timeouts Property Map

    Supporting Types

    OrganizationGroupProjectTimeouts, OrganizationGroupProjectTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

    Import

    $ pulumi import aiven:index/organizationGroupProject:OrganizationGroupProject example PROJECT/USER_GROUP_ID
    

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

    Package Details

    Repository
    Aiven pulumi/pulumi-aiven
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aiven Terraform Provider.
    aiven logo
    Aiven v6.18.0 published on Thursday, Jun 27, 2024 by Pulumi