1. Registry
  2. Packages
  3. Sonarqube Provider
  4. API Docs
  5. Application
Viewing docs for sonarqube 0.16.29
published on Thursday, Nov 5, 2026 by jdamata
sonarqube
Viewing docs for sonarqube 0.16.29
published on Thursday, Nov 5, 2026 by jdamata

    Provides a Sonarqube Application resource. An application groups several projects into one view. Applications are only available in the Developer edition and above.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sonarqube from "@pulumi/sonarqube";
    
    const api = new sonarqube.Project("api", {
        name: "Payments API",
        project: "payments-api",
        visibility: "private",
    });
    const web = new sonarqube.Project("web", {
        name: "Payments Web",
        project: "payments-web",
        visibility: "private",
    });
    const payments = new sonarqube.Application("payments", {
        key: "payments",
        name: "Payments",
        description: "Everything that makes up the payments product",
        visibility: "private",
        projects: [
            api.project,
            web.project,
        ],
        tags: [
            "payments",
            "team-a",
        ],
    });
    
    import pulumi
    import pulumi_sonarqube as sonarqube
    
    api = sonarqube.Project("api",
        name="Payments API",
        project="payments-api",
        visibility="private")
    web = sonarqube.Project("web",
        name="Payments Web",
        project="payments-web",
        visibility="private")
    payments = sonarqube.Application("payments",
        key="payments",
        name="Payments",
        description="Everything that makes up the payments product",
        visibility="private",
        projects=[
            api.project,
            web.project,
        ],
        tags=[
            "payments",
            "team-a",
        ])
    
    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 {
    		api, err := sonarqube.NewProject(ctx, "api", &sonarqube.ProjectArgs{
    			Name:       pulumi.String("Payments API"),
    			Project:    pulumi.String("payments-api"),
    			Visibility: pulumi.String("private"),
    		})
    		if err != nil {
    			return err
    		}
    		web, err := sonarqube.NewProject(ctx, "web", &sonarqube.ProjectArgs{
    			Name:       pulumi.String("Payments Web"),
    			Project:    pulumi.String("payments-web"),
    			Visibility: pulumi.String("private"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = sonarqube.NewApplication(ctx, "payments", &sonarqube.ApplicationArgs{
    			Key:         pulumi.String("payments"),
    			Name:        pulumi.String("Payments"),
    			Description: pulumi.String("Everything that makes up the payments product"),
    			Visibility:  pulumi.String("private"),
    			Projects: pulumi.StringArray{
    				api.Project,
    				web.Project,
    			},
    			Tags: pulumi.StringArray{
    				pulumi.String("payments"),
    				pulumi.String("team-a"),
    			},
    		})
    		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 api = new Sonarqube.Project("api", new()
        {
            Name = "Payments API",
            Project = "payments-api",
            Visibility = "private",
        });
    
        var web = new Sonarqube.Project("web", new()
        {
            Name = "Payments Web",
            Project = "payments-web",
            Visibility = "private",
        });
    
        var payments = new Sonarqube.Application("payments", new()
        {
            Key = "payments",
            Name = "Payments",
            Description = "Everything that makes up the payments product",
            Visibility = "private",
            Projects = new[]
            {
                api.Project,
                web.Project,
            },
            Tags = new[]
            {
                "payments",
                "team-a",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sonarqube.Project;
    import com.pulumi.sonarqube.ProjectArgs;
    import com.pulumi.sonarqube.Application;
    import com.pulumi.sonarqube.ApplicationArgs;
    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 api = new Project("api", ProjectArgs.builder()
                .name("Payments API")
                .project("payments-api")
                .visibility("private")
                .build());
    
            var web = new Project("web", ProjectArgs.builder()
                .name("Payments Web")
                .project("payments-web")
                .visibility("private")
                .build());
    
            var payments = new Application("payments", ApplicationArgs.builder()
                .key("payments")
                .name("Payments")
                .description("Everything that makes up the payments product")
                .visibility("private")
                .projects(            
                    api.project(),
                    web.project())
                .tags(            
                    "payments",
                    "team-a")
                .build());
    
        }
    }
    
    resources:
      api:
        type: sonarqube:Project
        properties:
          name: Payments API
          project: payments-api
          visibility: private
      web:
        type: sonarqube:Project
        properties:
          name: Payments Web
          project: payments-web
          visibility: private
      payments:
        type: sonarqube:Application
        properties:
          key: payments
          name: Payments
          description: Everything that makes up the payments product
          visibility: private
          projects:
            - ${api.project}
            - ${web.project}
          tags:
            - payments
            - team-a
    
    Example coming soon!
    

    Create Application Resource

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

    Constructor syntax

    new Application(name: string, args: ApplicationArgs, opts?: CustomResourceOptions);
    @overload
    def Application(resource_name: str,
                    args: ApplicationArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Application(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    key: Optional[str] = None,
                    application_id: Optional[str] = None,
                    description: Optional[str] = None,
                    name: Optional[str] = None,
                    projects: Optional[Sequence[str]] = None,
                    tags: Optional[Sequence[str]] = None,
                    visibility: Optional[str] = None)
    func NewApplication(ctx *Context, name string, args ApplicationArgs, opts ...ResourceOption) (*Application, error)
    public Application(string name, ApplicationArgs args, CustomResourceOptions? opts = null)
    public Application(String name, ApplicationArgs args)
    public Application(String name, ApplicationArgs args, CustomResourceOptions options)
    
    type: sonarqube:Application
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "sonarqube_application" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ApplicationArgs
    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 ApplicationArgs
    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 ApplicationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApplicationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApplicationArgs
    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 applicationResource = new Sonarqube.Application("applicationResource", new()
    {
        Key = "string",
        ApplicationId = "string",
        Description = "string",
        Name = "string",
        Projects = new[]
        {
            "string",
        },
        Tags = new[]
        {
            "string",
        },
        Visibility = "string",
    });
    
    example, err := sonarqube.NewApplication(ctx, "applicationResource", &sonarqube.ApplicationArgs{
    	Key:           pulumi.String("string"),
    	ApplicationId: pulumi.String("string"),
    	Description:   pulumi.String("string"),
    	Name:          pulumi.String("string"),
    	Projects: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Visibility: pulumi.String("string"),
    })
    
    resource "sonarqube_application" "applicationResource" {
      lifecycle {
        create_before_destroy = true
      }
      key            = "string"
      application_id = "string"
      description    = "string"
      name           = "string"
      projects       = ["string"]
      tags           = ["string"]
      visibility     = "string"
    }
    
    var applicationResource = new Application("applicationResource", ApplicationArgs.builder()
        .key("string")
        .applicationId("string")
        .description("string")
        .name("string")
        .projects("string")
        .tags("string")
        .visibility("string")
        .build());
    
    application_resource = sonarqube.Application("applicationResource",
        key="string",
        application_id="string",
        description="string",
        name="string",
        projects=["string"],
        tags=["string"],
        visibility="string")
    
    const applicationResource = new sonarqube.Application("applicationResource", {
        key: "string",
        applicationId: "string",
        description: "string",
        name: "string",
        projects: ["string"],
        tags: ["string"],
        visibility: "string",
    });
    
    type: sonarqube:Application
    properties:
        applicationId: string
        description: string
        key: string
        name: string
        projects:
            - string
        tags:
            - string
        visibility: string
    

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

    Key string
    Key of the application. Changing it creates a new application.
    ApplicationId string
    The ID of this resource.
    Description string
    Description of the application.
    Name string
    Name of the application.
    Projects List<string>
    Keys of the projects in the application.
    Tags List<string>
    Tags of the application.
    Visibility string
    Whether the application is public or private. Defaults to SonarQube's default visibility.
    Key string
    Key of the application. Changing it creates a new application.
    ApplicationId string
    The ID of this resource.
    Description string
    Description of the application.
    Name string
    Name of the application.
    Projects []string
    Keys of the projects in the application.
    Tags []string
    Tags of the application.
    Visibility string
    Whether the application is public or private. Defaults to SonarQube's default visibility.
    key string
    Key of the application. Changing it creates a new application.
    application_id string
    The ID of this resource.
    description string
    Description of the application.
    name string
    Name of the application.
    projects list(string)
    Keys of the projects in the application.
    tags list(string)
    Tags of the application.
    visibility string
    Whether the application is public or private. Defaults to SonarQube's default visibility.
    key String
    Key of the application. Changing it creates a new application.
    applicationId String
    The ID of this resource.
    description String
    Description of the application.
    name String
    Name of the application.
    projects List<String>
    Keys of the projects in the application.
    tags List<String>
    Tags of the application.
    visibility String
    Whether the application is public or private. Defaults to SonarQube's default visibility.
    key string
    Key of the application. Changing it creates a new application.
    applicationId string
    The ID of this resource.
    description string
    Description of the application.
    name string
    Name of the application.
    projects string[]
    Keys of the projects in the application.
    tags string[]
    Tags of the application.
    visibility string
    Whether the application is public or private. Defaults to SonarQube's default visibility.
    key str
    Key of the application. Changing it creates a new application.
    application_id str
    The ID of this resource.
    description str
    Description of the application.
    name str
    Name of the application.
    projects Sequence[str]
    Keys of the projects in the application.
    tags Sequence[str]
    Tags of the application.
    visibility str
    Whether the application is public or private. Defaults to SonarQube's default visibility.
    key String
    Key of the application. Changing it creates a new application.
    applicationId String
    The ID of this resource.
    description String
    Description of the application.
    name String
    Name of the application.
    projects List<String>
    Keys of the projects in the application.
    tags List<String>
    Tags of the application.
    visibility String
    Whether the application is public or private. Defaults to SonarQube's default visibility.

    Outputs

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

    Get an existing Application 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?: ApplicationState, opts?: CustomResourceOptions): Application
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            application_id: Optional[str] = None,
            description: Optional[str] = None,
            key: Optional[str] = None,
            name: Optional[str] = None,
            projects: Optional[Sequence[str]] = None,
            tags: Optional[Sequence[str]] = None,
            visibility: Optional[str] = None) -> Application
    func GetApplication(ctx *Context, name string, id IDInput, state *ApplicationState, opts ...ResourceOption) (*Application, error)
    public static Application Get(string name, Input<string> id, ApplicationState? state, CustomResourceOptions? opts = null)
    public static Application get(String name, Output<String> id, ApplicationState state, CustomResourceOptions options)
    resources:  _:    type: sonarqube:Application    get:      id: ${id}
    import {
      to = sonarqube_application.example
      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:
    ApplicationId string
    The ID of this resource.
    Description string
    Description of the application.
    Key string
    Key of the application. Changing it creates a new application.
    Name string
    Name of the application.
    Projects List<string>
    Keys of the projects in the application.
    Tags List<string>
    Tags of the application.
    Visibility string
    Whether the application is public or private. Defaults to SonarQube's default visibility.
    ApplicationId string
    The ID of this resource.
    Description string
    Description of the application.
    Key string
    Key of the application. Changing it creates a new application.
    Name string
    Name of the application.
    Projects []string
    Keys of the projects in the application.
    Tags []string
    Tags of the application.
    Visibility string
    Whether the application is public or private. Defaults to SonarQube's default visibility.
    application_id string
    The ID of this resource.
    description string
    Description of the application.
    key string
    Key of the application. Changing it creates a new application.
    name string
    Name of the application.
    projects list(string)
    Keys of the projects in the application.
    tags list(string)
    Tags of the application.
    visibility string
    Whether the application is public or private. Defaults to SonarQube's default visibility.
    applicationId String
    The ID of this resource.
    description String
    Description of the application.
    key String
    Key of the application. Changing it creates a new application.
    name String
    Name of the application.
    projects List<String>
    Keys of the projects in the application.
    tags List<String>
    Tags of the application.
    visibility String
    Whether the application is public or private. Defaults to SonarQube's default visibility.
    applicationId string
    The ID of this resource.
    description string
    Description of the application.
    key string
    Key of the application. Changing it creates a new application.
    name string
    Name of the application.
    projects string[]
    Keys of the projects in the application.
    tags string[]
    Tags of the application.
    visibility string
    Whether the application is public or private. Defaults to SonarQube's default visibility.
    application_id str
    The ID of this resource.
    description str
    Description of the application.
    key str
    Key of the application. Changing it creates a new application.
    name str
    Name of the application.
    projects Sequence[str]
    Keys of the projects in the application.
    tags Sequence[str]
    Tags of the application.
    visibility str
    Whether the application is public or private. Defaults to SonarQube's default visibility.
    applicationId String
    The ID of this resource.
    description String
    Description of the application.
    key String
    Key of the application. Changing it creates a new application.
    name String
    Name of the application.
    projects List<String>
    Keys of the projects in the application.
    tags List<String>
    Tags of the application.
    visibility String
    Whether the application is public or private. Defaults to SonarQube's default visibility.

    Import

    The pulumi import command can be used, for example:

    Import an application by its key

    $ pulumi import sonarqube:index/application:Application example my-application-key
    

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

    Package Details

    Repository
    sonarqube jdamata/terraform-provider-sonarqube
    License
    Notes
    This Pulumi package is based on the sonarqube Terraform Provider.
    sonarqube
    Viewing docs for sonarqube 0.16.29
    published on Thursday, Nov 5, 2026 by jdamata

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial