1. Packages
  2. Sonarqube Provider
  3. API Docs
  4. AzureBinding
sonarqube 0.16.14 published on Monday, Apr 14, 2025 by jdamata

sonarqube.AzureBinding

Explore with Pulumi AI

sonarqube logo
sonarqube 0.16.14 published on Monday, Apr 14, 2025 by jdamata

    Provides a Sonarqube Azure Devops binding resource. This can be used to create and manage the binding between an Azure Devops repository and a SonarQube project

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sonarqube from "@pulumi/sonarqube";
    
    const az1 = new sonarqube.AlmAzure("az1", {
        key: "az1",
        personalAccessToken: "my_pat",
        url: "https://dev.azure.com/my-org",
    });
    const mainProject = new sonarqube.Project("mainProject", {
        project: "main",
        visibility: "public",
    });
    const mainAzureBinding = new sonarqube.AzureBinding("mainAzureBinding", {
        almSetting: az1.key,
        project: mainProject.project,
        projectName: "my_azure_project",
        repositoryName: "my_repo",
    });
    
    import pulumi
    import pulumi_sonarqube as sonarqube
    
    az1 = sonarqube.AlmAzure("az1",
        key="az1",
        personal_access_token="my_pat",
        url="https://dev.azure.com/my-org")
    main_project = sonarqube.Project("mainProject",
        project="main",
        visibility="public")
    main_azure_binding = sonarqube.AzureBinding("mainAzureBinding",
        alm_setting=az1.key,
        project=main_project.project,
        project_name="my_azure_project",
        repository_name="my_repo")
    
    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 {
    		az1, err := sonarqube.NewAlmAzure(ctx, "az1", &sonarqube.AlmAzureArgs{
    			Key:                 pulumi.String("az1"),
    			PersonalAccessToken: pulumi.String("my_pat"),
    			Url:                 pulumi.String("https://dev.azure.com/my-org"),
    		})
    		if err != nil {
    			return err
    		}
    		mainProject, err := sonarqube.NewProject(ctx, "mainProject", &sonarqube.ProjectArgs{
    			Project:    pulumi.String("main"),
    			Visibility: pulumi.String("public"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = sonarqube.NewAzureBinding(ctx, "mainAzureBinding", &sonarqube.AzureBindingArgs{
    			AlmSetting:     az1.Key,
    			Project:        mainProject.Project,
    			ProjectName:    pulumi.String("my_azure_project"),
    			RepositoryName: pulumi.String("my_repo"),
    		})
    		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 az1 = new Sonarqube.AlmAzure("az1", new()
        {
            Key = "az1",
            PersonalAccessToken = "my_pat",
            Url = "https://dev.azure.com/my-org",
        });
    
        var mainProject = new Sonarqube.Project("mainProject", new()
        {
            Project = "main",
            Visibility = "public",
        });
    
        var mainAzureBinding = new Sonarqube.AzureBinding("mainAzureBinding", new()
        {
            AlmSetting = az1.Key,
            Project = mainProject.Project,
            ProjectName = "my_azure_project",
            RepositoryName = "my_repo",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sonarqube.AlmAzure;
    import com.pulumi.sonarqube.AlmAzureArgs;
    import com.pulumi.sonarqube.Project;
    import com.pulumi.sonarqube.ProjectArgs;
    import com.pulumi.sonarqube.AzureBinding;
    import com.pulumi.sonarqube.AzureBindingArgs;
    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 az1 = new AlmAzure("az1", AlmAzureArgs.builder()
                .key("az1")
                .personalAccessToken("my_pat")
                .url("https://dev.azure.com/my-org")
                .build());
    
            var mainProject = new Project("mainProject", ProjectArgs.builder()
                .project("main")
                .visibility("public")
                .build());
    
            var mainAzureBinding = new AzureBinding("mainAzureBinding", AzureBindingArgs.builder()
                .almSetting(az1.key())
                .project(mainProject.project())
                .projectName("my_azure_project")
                .repositoryName("my_repo")
                .build());
    
        }
    }
    
    resources:
      az1:
        type: sonarqube:AlmAzure
        properties:
          key: az1
          personalAccessToken: my_pat
          url: https://dev.azure.com/my-org
      mainProject:
        type: sonarqube:Project
        properties:
          project: main
          visibility: public
      mainAzureBinding:
        type: sonarqube:AzureBinding
        properties:
          almSetting: ${az1.key}
          project: ${mainProject.project}
          projectName: my_azure_project
          repositoryName: my_repo
    

    Create AzureBinding Resource

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

    Constructor syntax

    new AzureBinding(name: string, args: AzureBindingArgs, opts?: CustomResourceOptions);
    @overload
    def AzureBinding(resource_name: str,
                     args: AzureBindingArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def AzureBinding(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     alm_setting: Optional[str] = None,
                     project: Optional[str] = None,
                     project_name: Optional[str] = None,
                     repository_name: Optional[str] = None,
                     azure_binding_id: Optional[str] = None,
                     monorepo: Optional[bool] = None)
    func NewAzureBinding(ctx *Context, name string, args AzureBindingArgs, opts ...ResourceOption) (*AzureBinding, error)
    public AzureBinding(string name, AzureBindingArgs args, CustomResourceOptions? opts = null)
    public AzureBinding(String name, AzureBindingArgs args)
    public AzureBinding(String name, AzureBindingArgs args, CustomResourceOptions options)
    
    type: sonarqube:AzureBinding
    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 AzureBindingArgs
    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 AzureBindingArgs
    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 AzureBindingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AzureBindingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AzureBindingArgs
    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 azureBindingResource = new Sonarqube.AzureBinding("azureBindingResource", new()
    {
        AlmSetting = "string",
        Project = "string",
        ProjectName = "string",
        RepositoryName = "string",
        AzureBindingId = "string",
        Monorepo = false,
    });
    
    example, err := sonarqube.NewAzureBinding(ctx, "azureBindingResource", &sonarqube.AzureBindingArgs{
    	AlmSetting:     pulumi.String("string"),
    	Project:        pulumi.String("string"),
    	ProjectName:    pulumi.String("string"),
    	RepositoryName: pulumi.String("string"),
    	AzureBindingId: pulumi.String("string"),
    	Monorepo:       pulumi.Bool(false),
    })
    
    var azureBindingResource = new AzureBinding("azureBindingResource", AzureBindingArgs.builder()
        .almSetting("string")
        .project("string")
        .projectName("string")
        .repositoryName("string")
        .azureBindingId("string")
        .monorepo(false)
        .build());
    
    azure_binding_resource = sonarqube.AzureBinding("azureBindingResource",
        alm_setting="string",
        project="string",
        project_name="string",
        repository_name="string",
        azure_binding_id="string",
        monorepo=False)
    
    const azureBindingResource = new sonarqube.AzureBinding("azureBindingResource", {
        almSetting: "string",
        project: "string",
        projectName: "string",
        repositoryName: "string",
        azureBindingId: "string",
        monorepo: false,
    });
    
    type: sonarqube:AzureBinding
    properties:
        almSetting: string
        azureBindingId: string
        monorepo: false
        project: string
        projectName: string
        repositoryName: string
    

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

    AlmSetting string
    Azure DevOps setting key
    Project string
    SonarQube project key
    ProjectName string
    Azure project name
    RepositoryName string
    Azure repository name
    AzureBindingId string
    The ID of this resource.
    Monorepo bool
    Is this project part of a monorepo
    AlmSetting string
    Azure DevOps setting key
    Project string
    SonarQube project key
    ProjectName string
    Azure project name
    RepositoryName string
    Azure repository name
    AzureBindingId string
    The ID of this resource.
    Monorepo bool
    Is this project part of a monorepo
    almSetting String
    Azure DevOps setting key
    project String
    SonarQube project key
    projectName String
    Azure project name
    repositoryName String
    Azure repository name
    azureBindingId String
    The ID of this resource.
    monorepo Boolean
    Is this project part of a monorepo
    almSetting string
    Azure DevOps setting key
    project string
    SonarQube project key
    projectName string
    Azure project name
    repositoryName string
    Azure repository name
    azureBindingId string
    The ID of this resource.
    monorepo boolean
    Is this project part of a monorepo
    alm_setting str
    Azure DevOps setting key
    project str
    SonarQube project key
    project_name str
    Azure project name
    repository_name str
    Azure repository name
    azure_binding_id str
    The ID of this resource.
    monorepo bool
    Is this project part of a monorepo
    almSetting String
    Azure DevOps setting key
    project String
    SonarQube project key
    projectName String
    Azure project name
    repositoryName String
    Azure repository name
    azureBindingId String
    The ID of this resource.
    monorepo Boolean
    Is this project part of a monorepo

    Outputs

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

    Get an existing AzureBinding 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?: AzureBindingState, opts?: CustomResourceOptions): AzureBinding
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alm_setting: Optional[str] = None,
            azure_binding_id: Optional[str] = None,
            monorepo: Optional[bool] = None,
            project: Optional[str] = None,
            project_name: Optional[str] = None,
            repository_name: Optional[str] = None) -> AzureBinding
    func GetAzureBinding(ctx *Context, name string, id IDInput, state *AzureBindingState, opts ...ResourceOption) (*AzureBinding, error)
    public static AzureBinding Get(string name, Input<string> id, AzureBindingState? state, CustomResourceOptions? opts = null)
    public static AzureBinding get(String name, Output<String> id, AzureBindingState state, CustomResourceOptions options)
    resources:  _:    type: sonarqube:AzureBinding    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:
    AlmSetting string
    Azure DevOps setting key
    AzureBindingId string
    The ID of this resource.
    Monorepo bool
    Is this project part of a monorepo
    Project string
    SonarQube project key
    ProjectName string
    Azure project name
    RepositoryName string
    Azure repository name
    AlmSetting string
    Azure DevOps setting key
    AzureBindingId string
    The ID of this resource.
    Monorepo bool
    Is this project part of a monorepo
    Project string
    SonarQube project key
    ProjectName string
    Azure project name
    RepositoryName string
    Azure repository name
    almSetting String
    Azure DevOps setting key
    azureBindingId String
    The ID of this resource.
    monorepo Boolean
    Is this project part of a monorepo
    project String
    SonarQube project key
    projectName String
    Azure project name
    repositoryName String
    Azure repository name
    almSetting string
    Azure DevOps setting key
    azureBindingId string
    The ID of this resource.
    monorepo boolean
    Is this project part of a monorepo
    project string
    SonarQube project key
    projectName string
    Azure project name
    repositoryName string
    Azure repository name
    alm_setting str
    Azure DevOps setting key
    azure_binding_id str
    The ID of this resource.
    monorepo bool
    Is this project part of a monorepo
    project str
    SonarQube project key
    project_name str
    Azure project name
    repository_name str
    Azure repository name
    almSetting String
    Azure DevOps setting key
    azureBindingId String
    The ID of this resource.
    monorepo Boolean
    Is this project part of a monorepo
    project String
    SonarQube project key
    projectName String
    Azure project name
    repositoryName String
    Azure repository name

    Package Details

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