published on Thursday, Apr 2, 2026 by jdamata
published on Thursday, Apr 2, 2026 by jdamata
Provides a Sonarqube Bitbucket Data Center binding resource. This can be used to create and manage the binding between a Bitbucket Data Center repository and a SonarQube project
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sonarqube from "@pulumi/sonarqube";
const bitbucket_alm = new sonarqube.AlmBitbucket("bitbucket-alm", {
key: "mybitbucket",
personalAccessToken: "my_personal_access_token",
url: "https://bitbucket.example.com",
});
const main = new sonarqube.Project("main", {
name: "SonarQube",
project: "my_project",
visibility: "public",
});
const bitbucket_binding = new sonarqube.BitbucketBinding("bitbucket-binding", {
almSetting: bitbucket_alm.key,
project: main.project,
repository: "MYREPO",
slug: "myrepo",
monorepo: "false",
});
import pulumi
import pulumi_sonarqube as sonarqube
bitbucket_alm = sonarqube.AlmBitbucket("bitbucket-alm",
key="mybitbucket",
personal_access_token="my_personal_access_token",
url="https://bitbucket.example.com")
main = sonarqube.Project("main",
name="SonarQube",
project="my_project",
visibility="public")
bitbucket_binding = sonarqube.BitbucketBinding("bitbucket-binding",
alm_setting=bitbucket_alm.key,
project=main.project,
repository="MYREPO",
slug="myrepo",
monorepo="false")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/sonarqube/sonarqube"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
bitbucket_alm, err := sonarqube.NewAlmBitbucket(ctx, "bitbucket-alm", &sonarqube.AlmBitbucketArgs{
Key: pulumi.String("mybitbucket"),
PersonalAccessToken: pulumi.String("my_personal_access_token"),
Url: pulumi.String("https://bitbucket.example.com"),
})
if err != nil {
return err
}
main, err := sonarqube.NewProject(ctx, "main", &sonarqube.ProjectArgs{
Name: pulumi.String("SonarQube"),
Project: pulumi.String("my_project"),
Visibility: pulumi.String("public"),
})
if err != nil {
return err
}
_, err = sonarqube.NewBitbucketBinding(ctx, "bitbucket-binding", &sonarqube.BitbucketBindingArgs{
AlmSetting: bitbucket_alm.Key,
Project: main.Project,
Repository: pulumi.String("MYREPO"),
Slug: pulumi.String("myrepo"),
Monorepo: pulumi.String("false"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sonarqube = Pulumi.Sonarqube;
return await Deployment.RunAsync(() =>
{
var bitbucket_alm = new Sonarqube.AlmBitbucket("bitbucket-alm", new()
{
Key = "mybitbucket",
PersonalAccessToken = "my_personal_access_token",
Url = "https://bitbucket.example.com",
});
var main = new Sonarqube.Project("main", new()
{
Name = "SonarQube",
Project = "my_project",
Visibility = "public",
});
var bitbucket_binding = new Sonarqube.BitbucketBinding("bitbucket-binding", new()
{
AlmSetting = bitbucket_alm.Key,
Project = main.Project,
Repository = "MYREPO",
Slug = "myrepo",
Monorepo = "false",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sonarqube.AlmBitbucket;
import com.pulumi.sonarqube.AlmBitbucketArgs;
import com.pulumi.sonarqube.Project;
import com.pulumi.sonarqube.ProjectArgs;
import com.pulumi.sonarqube.BitbucketBinding;
import com.pulumi.sonarqube.BitbucketBindingArgs;
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 bitbucket_alm = new AlmBitbucket("bitbucket-alm", AlmBitbucketArgs.builder()
.key("mybitbucket")
.personalAccessToken("my_personal_access_token")
.url("https://bitbucket.example.com")
.build());
var main = new Project("main", ProjectArgs.builder()
.name("SonarQube")
.project("my_project")
.visibility("public")
.build());
var bitbucket_binding = new BitbucketBinding("bitbucket-binding", BitbucketBindingArgs.builder()
.almSetting(bitbucket_alm.key())
.project(main.project())
.repository("MYREPO")
.slug("myrepo")
.monorepo("false")
.build());
}
}
resources:
bitbucket-alm:
type: sonarqube:AlmBitbucket
properties:
key: mybitbucket
personalAccessToken: my_personal_access_token
url: https://bitbucket.example.com
main:
type: sonarqube:Project
properties:
name: SonarQube
project: my_project
visibility: public
bitbucket-binding:
type: sonarqube:BitbucketBinding
properties:
almSetting: ${["bitbucket-alm"].key}
project: ${main.project}
repository: MYREPO
slug: myrepo
monorepo: 'false'
Create BitbucketBinding Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BitbucketBinding(name: string, args: BitbucketBindingArgs, opts?: CustomResourceOptions);@overload
def BitbucketBinding(resource_name: str,
args: BitbucketBindingArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BitbucketBinding(resource_name: str,
opts: Optional[ResourceOptions] = None,
alm_setting: Optional[str] = None,
project: Optional[str] = None,
repository: Optional[str] = None,
slug: Optional[str] = None,
bitbucket_binding_id: Optional[str] = None,
monorepo: Optional[str] = None)func NewBitbucketBinding(ctx *Context, name string, args BitbucketBindingArgs, opts ...ResourceOption) (*BitbucketBinding, error)public BitbucketBinding(string name, BitbucketBindingArgs args, CustomResourceOptions? opts = null)
public BitbucketBinding(String name, BitbucketBindingArgs args)
public BitbucketBinding(String name, BitbucketBindingArgs args, CustomResourceOptions options)
type: sonarqube:BitbucketBinding
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 BitbucketBindingArgs
- 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 BitbucketBindingArgs
- 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 BitbucketBindingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BitbucketBindingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BitbucketBindingArgs
- 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 bitbucketBindingResource = new Sonarqube.BitbucketBinding("bitbucketBindingResource", new()
{
AlmSetting = "string",
Project = "string",
Repository = "string",
Slug = "string",
BitbucketBindingId = "string",
Monorepo = "string",
});
example, err := sonarqube.NewBitbucketBinding(ctx, "bitbucketBindingResource", &sonarqube.BitbucketBindingArgs{
AlmSetting: pulumi.String("string"),
Project: pulumi.String("string"),
Repository: pulumi.String("string"),
Slug: pulumi.String("string"),
BitbucketBindingId: pulumi.String("string"),
Monorepo: pulumi.String("string"),
})
var bitbucketBindingResource = new BitbucketBinding("bitbucketBindingResource", BitbucketBindingArgs.builder()
.almSetting("string")
.project("string")
.repository("string")
.slug("string")
.bitbucketBindingId("string")
.monorepo("string")
.build());
bitbucket_binding_resource = sonarqube.BitbucketBinding("bitbucketBindingResource",
alm_setting="string",
project="string",
repository="string",
slug="string",
bitbucket_binding_id="string",
monorepo="string")
const bitbucketBindingResource = new sonarqube.BitbucketBinding("bitbucketBindingResource", {
almSetting: "string",
project: "string",
repository: "string",
slug: "string",
bitbucketBindingId: "string",
monorepo: "string",
});
type: sonarqube:BitbucketBinding
properties:
almSetting: string
bitbucketBindingId: string
monorepo: string
project: string
repository: string
slug: string
BitbucketBinding 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 BitbucketBinding resource accepts the following input properties:
- Alm
Setting string - Bitbucket Server ALM setting key
- Project string
- SonarQube project key. Changing this will force a new resource to be created
- Repository string
- Bitbucket Server repository key (Bitbucket Project Key)
- Slug string
- Bitbucket repository slug
- Bitbucket
Binding stringId - The ID of this resource.
- Monorepo string
- Is this project part of a monorepo. Default value: false
- Alm
Setting string - Bitbucket Server ALM setting key
- Project string
- SonarQube project key. Changing this will force a new resource to be created
- Repository string
- Bitbucket Server repository key (Bitbucket Project Key)
- Slug string
- Bitbucket repository slug
- Bitbucket
Binding stringId - The ID of this resource.
- Monorepo string
- Is this project part of a monorepo. Default value: false
- alm
Setting String - Bitbucket Server ALM setting key
- project String
- SonarQube project key. Changing this will force a new resource to be created
- repository String
- Bitbucket Server repository key (Bitbucket Project Key)
- slug String
- Bitbucket repository slug
- bitbucket
Binding StringId - The ID of this resource.
- monorepo String
- Is this project part of a monorepo. Default value: false
- alm
Setting string - Bitbucket Server ALM setting key
- project string
- SonarQube project key. Changing this will force a new resource to be created
- repository string
- Bitbucket Server repository key (Bitbucket Project Key)
- slug string
- Bitbucket repository slug
- bitbucket
Binding stringId - The ID of this resource.
- monorepo string
- Is this project part of a monorepo. Default value: false
- alm_
setting str - Bitbucket Server ALM setting key
- project str
- SonarQube project key. Changing this will force a new resource to be created
- repository str
- Bitbucket Server repository key (Bitbucket Project Key)
- slug str
- Bitbucket repository slug
- bitbucket_
binding_ strid - The ID of this resource.
- monorepo str
- Is this project part of a monorepo. Default value: false
- alm
Setting String - Bitbucket Server ALM setting key
- project String
- SonarQube project key. Changing this will force a new resource to be created
- repository String
- Bitbucket Server repository key (Bitbucket Project Key)
- slug String
- Bitbucket repository slug
- bitbucket
Binding StringId - The ID of this resource.
- monorepo String
- Is this project part of a monorepo. Default value: false
Outputs
All input properties are implicitly available as output properties. Additionally, the BitbucketBinding 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 BitbucketBinding Resource
Get an existing BitbucketBinding 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?: BitbucketBindingState, opts?: CustomResourceOptions): BitbucketBinding@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alm_setting: Optional[str] = None,
bitbucket_binding_id: Optional[str] = None,
monorepo: Optional[str] = None,
project: Optional[str] = None,
repository: Optional[str] = None,
slug: Optional[str] = None) -> BitbucketBindingfunc GetBitbucketBinding(ctx *Context, name string, id IDInput, state *BitbucketBindingState, opts ...ResourceOption) (*BitbucketBinding, error)public static BitbucketBinding Get(string name, Input<string> id, BitbucketBindingState? state, CustomResourceOptions? opts = null)public static BitbucketBinding get(String name, Output<String> id, BitbucketBindingState state, CustomResourceOptions options)resources: _: type: sonarqube:BitbucketBinding 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.
- Alm
Setting string - Bitbucket Server ALM setting key
- Bitbucket
Binding stringId - The ID of this resource.
- Monorepo string
- Is this project part of a monorepo. Default value: false
- Project string
- SonarQube project key. Changing this will force a new resource to be created
- Repository string
- Bitbucket Server repository key (Bitbucket Project Key)
- Slug string
- Bitbucket repository slug
- Alm
Setting string - Bitbucket Server ALM setting key
- Bitbucket
Binding stringId - The ID of this resource.
- Monorepo string
- Is this project part of a monorepo. Default value: false
- Project string
- SonarQube project key. Changing this will force a new resource to be created
- Repository string
- Bitbucket Server repository key (Bitbucket Project Key)
- Slug string
- Bitbucket repository slug
- alm
Setting String - Bitbucket Server ALM setting key
- bitbucket
Binding StringId - The ID of this resource.
- monorepo String
- Is this project part of a monorepo. Default value: false
- project String
- SonarQube project key. Changing this will force a new resource to be created
- repository String
- Bitbucket Server repository key (Bitbucket Project Key)
- slug String
- Bitbucket repository slug
- alm
Setting string - Bitbucket Server ALM setting key
- bitbucket
Binding stringId - The ID of this resource.
- monorepo string
- Is this project part of a monorepo. Default value: false
- project string
- SonarQube project key. Changing this will force a new resource to be created
- repository string
- Bitbucket Server repository key (Bitbucket Project Key)
- slug string
- Bitbucket repository slug
- alm_
setting str - Bitbucket Server ALM setting key
- bitbucket_
binding_ strid - The ID of this resource.
- monorepo str
- Is this project part of a monorepo. Default value: false
- project str
- SonarQube project key. Changing this will force a new resource to be created
- repository str
- Bitbucket Server repository key (Bitbucket Project Key)
- slug str
- Bitbucket repository slug
- alm
Setting String - Bitbucket Server ALM setting key
- bitbucket
Binding StringId - The ID of this resource.
- monorepo String
- Is this project part of a monorepo. Default value: false
- project String
- SonarQube project key. Changing this will force a new resource to be created
- repository String
- Bitbucket Server repository key (Bitbucket Project Key)
- slug String
- Bitbucket repository slug
Package Details
- Repository
- sonarqube jdamata/terraform-provider-sonarqube
- License
- Notes
- This Pulumi package is based on the
sonarqubeTerraform Provider.
published on Thursday, Apr 2, 2026 by jdamata
