1. Packages
  2. Bitbucket Provider
  3. API Docs
  4. Project
bitbucket 2.46.0 published on Monday, Apr 14, 2025 by drfaust92

bitbucket.Project

Explore with Pulumi AI

bitbucket logo
bitbucket 2.46.0 published on Monday, Apr 14, 2025 by drfaust92

    This resource allows you to manage your projects in your bitbucket team.

    OAuth2 Scopes: project and project:admin

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bitbucket from "@pulumi/bitbucket";
    
    const devops = new bitbucket.Project("devops", {
        key: "DEVOPS",
        owner: "my-team",
    });
    
    import pulumi
    import pulumi_bitbucket as bitbucket
    
    devops = bitbucket.Project("devops",
        key="DEVOPS",
        owner="my-team")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/bitbucket/v2/bitbucket"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bitbucket.NewProject(ctx, "devops", &bitbucket.ProjectArgs{
    			Key:   pulumi.String("DEVOPS"),
    			Owner: pulumi.String("my-team"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Bitbucket = Pulumi.Bitbucket;
    
    return await Deployment.RunAsync(() => 
    {
        var devops = new Bitbucket.Project("devops", new()
        {
            Key = "DEVOPS",
            Owner = "my-team",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.bitbucket.Project;
    import com.pulumi.bitbucket.ProjectArgs;
    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 devops = new Project("devops", ProjectArgs.builder()
                .key("DEVOPS")
                .owner("my-team")
                .build());
    
        }
    }
    
    resources:
      devops:
        type: bitbucket:Project
        properties:
          key: DEVOPS
          owner: my-team
    

    Create Project Resource

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

    Constructor syntax

    new Project(name: string, args: ProjectArgs, opts?: CustomResourceOptions);
    @overload
    def Project(resource_name: str,
                args: ProjectArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Project(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                key: Optional[str] = None,
                owner: Optional[str] = None,
                description: Optional[str] = None,
                is_private: Optional[bool] = None,
                link: Optional[ProjectLinkArgs] = None,
                name: Optional[str] = None,
                project_id: Optional[str] = None)
    func NewProject(ctx *Context, name string, args ProjectArgs, opts ...ResourceOption) (*Project, error)
    public Project(string name, ProjectArgs args, CustomResourceOptions? opts = null)
    public Project(String name, ProjectArgs args)
    public Project(String name, ProjectArgs args, CustomResourceOptions options)
    
    type: bitbucket:Project
    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 ProjectArgs
    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 ProjectArgs
    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 ProjectArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectArgs
    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 projectResource = new Bitbucket.Project("projectResource", new()
    {
        Key = "string",
        Owner = "string",
        Description = "string",
        IsPrivate = false,
        Link = new Bitbucket.Inputs.ProjectLinkArgs
        {
            Avatar = new Bitbucket.Inputs.ProjectLinkAvatarArgs
            {
                Href = "string",
            },
        },
        Name = "string",
        ProjectId = "string",
    });
    
    example, err := bitbucket.NewProject(ctx, "projectResource", &bitbucket.ProjectArgs{
    	Key:         pulumi.String("string"),
    	Owner:       pulumi.String("string"),
    	Description: pulumi.String("string"),
    	IsPrivate:   pulumi.Bool(false),
    	Link: &bitbucket.ProjectLinkArgs{
    		Avatar: &bitbucket.ProjectLinkAvatarArgs{
    			Href: pulumi.String("string"),
    		},
    	},
    	Name:      pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    })
    
    var projectResource = new Project("projectResource", ProjectArgs.builder()
        .key("string")
        .owner("string")
        .description("string")
        .isPrivate(false)
        .link(ProjectLinkArgs.builder()
            .avatar(ProjectLinkAvatarArgs.builder()
                .href("string")
                .build())
            .build())
        .name("string")
        .projectId("string")
        .build());
    
    project_resource = bitbucket.Project("projectResource",
        key="string",
        owner="string",
        description="string",
        is_private=False,
        link={
            "avatar": {
                "href": "string",
            },
        },
        name="string",
        project_id="string")
    
    const projectResource = new bitbucket.Project("projectResource", {
        key: "string",
        owner: "string",
        description: "string",
        isPrivate: false,
        link: {
            avatar: {
                href: "string",
            },
        },
        name: "string",
        projectId: "string",
    });
    
    type: bitbucket:Project
    properties:
        description: string
        isPrivate: false
        key: string
        link:
            avatar:
                href: string
        name: string
        owner: string
        projectId: string
    

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

    Key string
    The key used for this project
    Owner string
    The owner of this project. Can be you or any team you have write access to.
    Description string
    The description of the project
    IsPrivate bool
    If you want to keep the project private - defaults to true
    Link ProjectLink
    A set of links to a resource related to this object. See Link Below.
    Name string
    The name of the project
    ProjectId string
    Key string
    The key used for this project
    Owner string
    The owner of this project. Can be you or any team you have write access to.
    Description string
    The description of the project
    IsPrivate bool
    If you want to keep the project private - defaults to true
    Link ProjectLinkArgs
    A set of links to a resource related to this object. See Link Below.
    Name string
    The name of the project
    ProjectId string
    key String
    The key used for this project
    owner String
    The owner of this project. Can be you or any team you have write access to.
    description String
    The description of the project
    isPrivate Boolean
    If you want to keep the project private - defaults to true
    link ProjectLink
    A set of links to a resource related to this object. See Link Below.
    name String
    The name of the project
    projectId String
    key string
    The key used for this project
    owner string
    The owner of this project. Can be you or any team you have write access to.
    description string
    The description of the project
    isPrivate boolean
    If you want to keep the project private - defaults to true
    link ProjectLink
    A set of links to a resource related to this object. See Link Below.
    name string
    The name of the project
    projectId string
    key str
    The key used for this project
    owner str
    The owner of this project. Can be you or any team you have write access to.
    description str
    The description of the project
    is_private bool
    If you want to keep the project private - defaults to true
    link ProjectLinkArgs
    A set of links to a resource related to this object. See Link Below.
    name str
    The name of the project
    project_id str
    key String
    The key used for this project
    owner String
    The owner of this project. Can be you or any team you have write access to.
    description String
    The description of the project
    isPrivate Boolean
    If you want to keep the project private - defaults to true
    link Property Map
    A set of links to a resource related to this object. See Link Below.
    name String
    The name of the project
    projectId String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Project resource produces the following output properties:

    HasPubliclyVisibleRepos bool
    Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
    Id string
    The provider-assigned unique ID for this managed resource.
    Uuid string
    The project's immutable id.
    HasPubliclyVisibleRepos bool
    Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
    Id string
    The provider-assigned unique ID for this managed resource.
    Uuid string
    The project's immutable id.
    hasPubliclyVisibleRepos Boolean
    Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
    id String
    The provider-assigned unique ID for this managed resource.
    uuid String
    The project's immutable id.
    hasPubliclyVisibleRepos boolean
    Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
    id string
    The provider-assigned unique ID for this managed resource.
    uuid string
    The project's immutable id.
    has_publicly_visible_repos bool
    Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
    id str
    The provider-assigned unique ID for this managed resource.
    uuid str
    The project's immutable id.
    hasPubliclyVisibleRepos Boolean
    Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
    id String
    The provider-assigned unique ID for this managed resource.
    uuid String
    The project's immutable id.

    Look up Existing Project Resource

    Get an existing Project 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?: ProjectState, opts?: CustomResourceOptions): Project
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            has_publicly_visible_repos: Optional[bool] = None,
            is_private: Optional[bool] = None,
            key: Optional[str] = None,
            link: Optional[ProjectLinkArgs] = None,
            name: Optional[str] = None,
            owner: Optional[str] = None,
            project_id: Optional[str] = None,
            uuid: Optional[str] = None) -> Project
    func GetProject(ctx *Context, name string, id IDInput, state *ProjectState, opts ...ResourceOption) (*Project, error)
    public static Project Get(string name, Input<string> id, ProjectState? state, CustomResourceOptions? opts = null)
    public static Project get(String name, Output<String> id, ProjectState state, CustomResourceOptions options)
    resources:  _:    type: bitbucket:Project    get:      id: ${id}
    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:
    Description string
    The description of the project
    HasPubliclyVisibleRepos bool
    Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
    IsPrivate bool
    If you want to keep the project private - defaults to true
    Key string
    The key used for this project
    Link ProjectLink
    A set of links to a resource related to this object. See Link Below.
    Name string
    The name of the project
    Owner string
    The owner of this project. Can be you or any team you have write access to.
    ProjectId string
    Uuid string
    The project's immutable id.
    Description string
    The description of the project
    HasPubliclyVisibleRepos bool
    Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
    IsPrivate bool
    If you want to keep the project private - defaults to true
    Key string
    The key used for this project
    Link ProjectLinkArgs
    A set of links to a resource related to this object. See Link Below.
    Name string
    The name of the project
    Owner string
    The owner of this project. Can be you or any team you have write access to.
    ProjectId string
    Uuid string
    The project's immutable id.
    description String
    The description of the project
    hasPubliclyVisibleRepos Boolean
    Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
    isPrivate Boolean
    If you want to keep the project private - defaults to true
    key String
    The key used for this project
    link ProjectLink
    A set of links to a resource related to this object. See Link Below.
    name String
    The name of the project
    owner String
    The owner of this project. Can be you or any team you have write access to.
    projectId String
    uuid String
    The project's immutable id.
    description string
    The description of the project
    hasPubliclyVisibleRepos boolean
    Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
    isPrivate boolean
    If you want to keep the project private - defaults to true
    key string
    The key used for this project
    link ProjectLink
    A set of links to a resource related to this object. See Link Below.
    name string
    The name of the project
    owner string
    The owner of this project. Can be you or any team you have write access to.
    projectId string
    uuid string
    The project's immutable id.
    description str
    The description of the project
    has_publicly_visible_repos bool
    Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
    is_private bool
    If you want to keep the project private - defaults to true
    key str
    The key used for this project
    link ProjectLinkArgs
    A set of links to a resource related to this object. See Link Below.
    name str
    The name of the project
    owner str
    The owner of this project. Can be you or any team you have write access to.
    project_id str
    uuid str
    The project's immutable id.
    description String
    The description of the project
    hasPubliclyVisibleRepos Boolean
    Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.
    isPrivate Boolean
    If you want to keep the project private - defaults to true
    key String
    The key used for this project
    link Property Map
    A set of links to a resource related to this object. See Link Below.
    name String
    The name of the project
    owner String
    The owner of this project. Can be you or any team you have write access to.
    projectId String
    uuid String
    The project's immutable id.

    Supporting Types

    Avatar ProjectLinkAvatar
    An avatar link to a resource related to this object. See Avatar Below.
    Avatar ProjectLinkAvatar
    An avatar link to a resource related to this object. See Avatar Below.
    avatar ProjectLinkAvatar
    An avatar link to a resource related to this object. See Avatar Below.
    avatar ProjectLinkAvatar
    An avatar link to a resource related to this object. See Avatar Below.
    avatar ProjectLinkAvatar
    An avatar link to a resource related to this object. See Avatar Below.
    avatar Property Map
    An avatar link to a resource related to this object. See Avatar Below.

    ProjectLinkAvatar, ProjectLinkAvatarArgs

    Href string
    href of the avatar.
    Href string
    href of the avatar.
    href String
    href of the avatar.
    href string
    href of the avatar.
    href str
    href of the avatar.
    href String
    href of the avatar.

    Import

    Repositories can be imported using their owner/key ID, e.g.

    $ pulumi import bitbucket:index/project:Project my_project my-account/project_key
    

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

    Package Details

    Repository
    bitbucket drfaust92/terraform-provider-bitbucket
    License
    Notes
    This Pulumi package is based on the bitbucket Terraform Provider.
    bitbucket logo
    bitbucket 2.46.0 published on Monday, Apr 14, 2025 by drfaust92