1. Packages
  2. Aiven
  3. API Docs
  4. AccountTeamProject
Aiven v6.13.0 published on Monday, Mar 25, 2024 by Pulumi

aiven.AccountTeamProject

Explore with Pulumi AI

aiven logo
Aiven v6.13.0 published on Monday, Mar 25, 2024 by Pulumi

    Links an existing project to an existing team. Both the project and team should have the same account_id.

    Teams are becoming groups Groups are an easier way to control access to your organization’s projects and services for a group of users. Migrate your teams to groups.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const exampleProject = new aiven.Project("exampleProject", {
        project: "project-1",
        accountId: aiven_account_team.ACCOUNT_RESOURCE_NAME.account_id,
    });
    const exampleTeam = new aiven.AccountTeam("exampleTeam", {accountId: aiven_account.ACCOUNT_RESOURCE_NAME.account_id});
    const main = new aiven.AccountTeamProject("main", {
        accountId: aiven_account.ACCOUNT_RESOURCE_NAME.account_id,
        teamId: exampleTeam.teamId,
        projectName: exampleProject.project,
        teamType: "admin",
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    example_project = aiven.Project("exampleProject",
        project="project-1",
        account_id=aiven_account_team["ACCOUNT_RESOURCE_NAME"]["account_id"])
    example_team = aiven.AccountTeam("exampleTeam", account_id=aiven_account["ACCOUNT_RESOURCE_NAME"]["account_id"])
    main = aiven.AccountTeamProject("main",
        account_id=aiven_account["ACCOUNT_RESOURCE_NAME"]["account_id"],
        team_id=example_team.team_id,
        project_name=example_project.project,
        team_type="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 {
    		exampleProject, err := aiven.NewProject(ctx, "exampleProject", &aiven.ProjectArgs{
    			Project:   pulumi.String("project-1"),
    			AccountId: pulumi.Any(aiven_account_team.ACCOUNT_RESOURCE_NAME.Account_id),
    		})
    		if err != nil {
    			return err
    		}
    		exampleTeam, err := aiven.NewAccountTeam(ctx, "exampleTeam", &aiven.AccountTeamArgs{
    			AccountId: pulumi.Any(aiven_account.ACCOUNT_RESOURCE_NAME.Account_id),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = aiven.NewAccountTeamProject(ctx, "main", &aiven.AccountTeamProjectArgs{
    			AccountId:   pulumi.Any(aiven_account.ACCOUNT_RESOURCE_NAME.Account_id),
    			TeamId:      exampleTeam.TeamId,
    			ProjectName: exampleProject.Project,
    			TeamType:    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("exampleProject", new()
        {
            ProjectName = "project-1",
            AccountId = aiven_account_team.ACCOUNT_RESOURCE_NAME.Account_id,
        });
    
        var exampleTeam = new Aiven.AccountTeam("exampleTeam", new()
        {
            AccountId = aiven_account.ACCOUNT_RESOURCE_NAME.Account_id,
        });
    
        var main = new Aiven.AccountTeamProject("main", new()
        {
            AccountId = aiven_account.ACCOUNT_RESOURCE_NAME.Account_id,
            TeamId = exampleTeam.TeamId,
            ProjectName = exampleProject.ProjectName,
            TeamType = "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.AccountTeam;
    import com.pulumi.aiven.AccountTeamArgs;
    import com.pulumi.aiven.AccountTeamProject;
    import com.pulumi.aiven.AccountTeamProjectArgs;
    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("project-1")
                .accountId(aiven_account_team.ACCOUNT_RESOURCE_NAME().account_id())
                .build());
    
            var exampleTeam = new AccountTeam("exampleTeam", AccountTeamArgs.builder()        
                .accountId(aiven_account.ACCOUNT_RESOURCE_NAME().account_id())
                .build());
    
            var main = new AccountTeamProject("main", AccountTeamProjectArgs.builder()        
                .accountId(aiven_account.ACCOUNT_RESOURCE_NAME().account_id())
                .teamId(exampleTeam.teamId())
                .projectName(exampleProject.project())
                .teamType("admin")
                .build());
    
        }
    }
    
    resources:
      exampleProject:
        type: aiven:Project
        properties:
          project: project-1
          accountId: ${aiven_account_team.ACCOUNT_RESOURCE_NAME.account_id}
      exampleTeam:
        type: aiven:AccountTeam
        properties:
          accountId: ${aiven_account.ACCOUNT_RESOURCE_NAME.account_id}
      main:
        type: aiven:AccountTeamProject
        properties:
          accountId: ${aiven_account.ACCOUNT_RESOURCE_NAME.account_id}
          teamId: ${exampleTeam.teamId}
          projectName: ${exampleProject.project}
          teamType: admin
    

    Create AccountTeamProject Resource

    new AccountTeamProject(name: string, args: AccountTeamProjectArgs, opts?: CustomResourceOptions);
    @overload
    def AccountTeamProject(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           account_id: Optional[str] = None,
                           project_name: Optional[str] = None,
                           team_id: Optional[str] = None,
                           team_type: Optional[str] = None)
    @overload
    def AccountTeamProject(resource_name: str,
                           args: AccountTeamProjectArgs,
                           opts: Optional[ResourceOptions] = None)
    func NewAccountTeamProject(ctx *Context, name string, args AccountTeamProjectArgs, opts ...ResourceOption) (*AccountTeamProject, error)
    public AccountTeamProject(string name, AccountTeamProjectArgs args, CustomResourceOptions? opts = null)
    public AccountTeamProject(String name, AccountTeamProjectArgs args)
    public AccountTeamProject(String name, AccountTeamProjectArgs args, CustomResourceOptions options)
    
    type: aiven:AccountTeamProject
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args AccountTeamProjectArgs
    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 AccountTeamProjectArgs
    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 AccountTeamProjectArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccountTeamProjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccountTeamProjectArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    AccountId string
    The unique account id
    TeamId string
    An account team id
    ProjectName string
    The name of an already existing project
    TeamType string
    The Account team project type. The possible values are admin, developer, operator and read_only.
    AccountId string
    The unique account id
    TeamId string
    An account team id
    ProjectName string
    The name of an already existing project
    TeamType string
    The Account team project type. The possible values are admin, developer, operator and read_only.
    accountId String
    The unique account id
    teamId String
    An account team id
    projectName String
    The name of an already existing project
    teamType String
    The Account team project type. The possible values are admin, developer, operator and read_only.
    accountId string
    The unique account id
    teamId string
    An account team id
    projectName string
    The name of an already existing project
    teamType string
    The Account team project type. The possible values are admin, developer, operator and read_only.
    account_id str
    The unique account id
    team_id str
    An account team id
    project_name str
    The name of an already existing project
    team_type str
    The Account team project type. The possible values are admin, developer, operator and read_only.
    accountId String
    The unique account id
    teamId String
    An account team id
    projectName String
    The name of an already existing project
    teamType String
    The Account team project type. The possible values are admin, developer, operator and read_only.

    Outputs

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

    Get an existing AccountTeamProject 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?: AccountTeamProjectState, opts?: CustomResourceOptions): AccountTeamProject
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            project_name: Optional[str] = None,
            team_id: Optional[str] = None,
            team_type: Optional[str] = None) -> AccountTeamProject
    func GetAccountTeamProject(ctx *Context, name string, id IDInput, state *AccountTeamProjectState, opts ...ResourceOption) (*AccountTeamProject, error)
    public static AccountTeamProject Get(string name, Input<string> id, AccountTeamProjectState? state, CustomResourceOptions? opts = null)
    public static AccountTeamProject get(String name, Output<String> id, AccountTeamProjectState 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:
    AccountId string
    The unique account id
    ProjectName string
    The name of an already existing project
    TeamId string
    An account team id
    TeamType string
    The Account team project type. The possible values are admin, developer, operator and read_only.
    AccountId string
    The unique account id
    ProjectName string
    The name of an already existing project
    TeamId string
    An account team id
    TeamType string
    The Account team project type. The possible values are admin, developer, operator and read_only.
    accountId String
    The unique account id
    projectName String
    The name of an already existing project
    teamId String
    An account team id
    teamType String
    The Account team project type. The possible values are admin, developer, operator and read_only.
    accountId string
    The unique account id
    projectName string
    The name of an already existing project
    teamId string
    An account team id
    teamType string
    The Account team project type. The possible values are admin, developer, operator and read_only.
    account_id str
    The unique account id
    project_name str
    The name of an already existing project
    team_id str
    An account team id
    team_type str
    The Account team project type. The possible values are admin, developer, operator and read_only.
    accountId String
    The unique account id
    projectName String
    The name of an already existing project
    teamId String
    An account team id
    teamType String
    The Account team project type. The possible values are admin, developer, operator and read_only.

    Import

    $ pulumi import aiven:index/accountTeamProject:AccountTeamProject account_team_project1 account_id/team_id/project_name
    

    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.13.0 published on Monday, Mar 25, 2024 by Pulumi