sonarqube.QualityprofileProjectAssociation
Explore with Pulumi AI
Provides a Sonarqube Quality Profile Project association resource. This can be used to associate a Quality Profile to a Project
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sonarqube from "@pulumi/sonarqube";
const mainQualityprofile = new sonarqube.Qualityprofile("mainQualityprofile", {language: "js"});
const mainProject = new sonarqube.Project("mainProject", {
project: "my_project",
visibility: "public",
});
const mainQualityprofileProjectAssociation = new sonarqube.QualityprofileProjectAssociation("mainQualityprofileProjectAssociation", {
qualityProfile: mainQualityprofile.name,
project: mainProject.project,
language: "js",
});
import pulumi
import pulumi_sonarqube as sonarqube
main_qualityprofile = sonarqube.Qualityprofile("mainQualityprofile", language="js")
main_project = sonarqube.Project("mainProject",
project="my_project",
visibility="public")
main_qualityprofile_project_association = sonarqube.QualityprofileProjectAssociation("mainQualityprofileProjectAssociation",
quality_profile=main_qualityprofile.name,
project=main_project.project,
language="js")
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 {
mainQualityprofile, err := sonarqube.NewQualityprofile(ctx, "mainQualityprofile", &sonarqube.QualityprofileArgs{
Language: pulumi.String("js"),
})
if err != nil {
return err
}
mainProject, err := sonarqube.NewProject(ctx, "mainProject", &sonarqube.ProjectArgs{
Project: pulumi.String("my_project"),
Visibility: pulumi.String("public"),
})
if err != nil {
return err
}
_, err = sonarqube.NewQualityprofileProjectAssociation(ctx, "mainQualityprofileProjectAssociation", &sonarqube.QualityprofileProjectAssociationArgs{
QualityProfile: mainQualityprofile.Name,
Project: mainProject.Project,
Language: pulumi.String("js"),
})
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 mainQualityprofile = new Sonarqube.Qualityprofile("mainQualityprofile", new()
{
Language = "js",
});
var mainProject = new Sonarqube.Project("mainProject", new()
{
Project = "my_project",
Visibility = "public",
});
var mainQualityprofileProjectAssociation = new Sonarqube.QualityprofileProjectAssociation("mainQualityprofileProjectAssociation", new()
{
QualityProfile = mainQualityprofile.Name,
Project = mainProject.Project,
Language = "js",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sonarqube.Qualityprofile;
import com.pulumi.sonarqube.QualityprofileArgs;
import com.pulumi.sonarqube.Project;
import com.pulumi.sonarqube.ProjectArgs;
import com.pulumi.sonarqube.QualityprofileProjectAssociation;
import com.pulumi.sonarqube.QualityprofileProjectAssociationArgs;
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 mainQualityprofile = new Qualityprofile("mainQualityprofile", QualityprofileArgs.builder()
.language("js")
.build());
var mainProject = new Project("mainProject", ProjectArgs.builder()
.project("my_project")
.visibility("public")
.build());
var mainQualityprofileProjectAssociation = new QualityprofileProjectAssociation("mainQualityprofileProjectAssociation", QualityprofileProjectAssociationArgs.builder()
.qualityProfile(mainQualityprofile.name())
.project(mainProject.project())
.language("js")
.build());
}
}
resources:
mainQualityprofile:
type: sonarqube:Qualityprofile
properties:
language: js
mainProject:
type: sonarqube:Project
properties:
project: my_project
visibility: public
mainQualityprofileProjectAssociation:
type: sonarqube:QualityprofileProjectAssociation
properties:
qualityProfile: ${mainQualityprofile.name}
project: ${mainProject.project}
language: js
Create QualityprofileProjectAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new QualityprofileProjectAssociation(name: string, args: QualityprofileProjectAssociationArgs, opts?: CustomResourceOptions);
@overload
def QualityprofileProjectAssociation(resource_name: str,
args: QualityprofileProjectAssociationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def QualityprofileProjectAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
language: Optional[str] = None,
project: Optional[str] = None,
quality_profile: Optional[str] = None,
qualityprofile_project_association_id: Optional[str] = None)
func NewQualityprofileProjectAssociation(ctx *Context, name string, args QualityprofileProjectAssociationArgs, opts ...ResourceOption) (*QualityprofileProjectAssociation, error)
public QualityprofileProjectAssociation(string name, QualityprofileProjectAssociationArgs args, CustomResourceOptions? opts = null)
public QualityprofileProjectAssociation(String name, QualityprofileProjectAssociationArgs args)
public QualityprofileProjectAssociation(String name, QualityprofileProjectAssociationArgs args, CustomResourceOptions options)
type: sonarqube:QualityprofileProjectAssociation
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 QualityprofileProjectAssociationArgs
- 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 QualityprofileProjectAssociationArgs
- 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 QualityprofileProjectAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args QualityprofileProjectAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args QualityprofileProjectAssociationArgs
- 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 qualityprofileProjectAssociationResource = new Sonarqube.QualityprofileProjectAssociation("qualityprofileProjectAssociationResource", new()
{
Language = "string",
Project = "string",
QualityProfile = "string",
QualityprofileProjectAssociationId = "string",
});
example, err := sonarqube.NewQualityprofileProjectAssociation(ctx, "qualityprofileProjectAssociationResource", &sonarqube.QualityprofileProjectAssociationArgs{
Language: pulumi.String("string"),
Project: pulumi.String("string"),
QualityProfile: pulumi.String("string"),
QualityprofileProjectAssociationId: pulumi.String("string"),
})
var qualityprofileProjectAssociationResource = new QualityprofileProjectAssociation("qualityprofileProjectAssociationResource", QualityprofileProjectAssociationArgs.builder()
.language("string")
.project("string")
.qualityProfile("string")
.qualityprofileProjectAssociationId("string")
.build());
qualityprofile_project_association_resource = sonarqube.QualityprofileProjectAssociation("qualityprofileProjectAssociationResource",
language="string",
project="string",
quality_profile="string",
qualityprofile_project_association_id="string")
const qualityprofileProjectAssociationResource = new sonarqube.QualityprofileProjectAssociation("qualityprofileProjectAssociationResource", {
language: "string",
project: "string",
qualityProfile: "string",
qualityprofileProjectAssociationId: "string",
});
type: sonarqube:QualityprofileProjectAssociation
properties:
language: string
project: string
qualityProfile: string
qualityprofileProjectAssociationId: string
QualityprofileProjectAssociation 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 QualityprofileProjectAssociation resource accepts the following input properties:
- Language string
- Quality profile language. Must be a langauge in this list https://next.sonarqube.com/sonarqube/web_api/api/languages/list
- Project string
- Name of the project
- Quality
Profile string - Name of the Quality Profile
- Qualityprofile
Project stringAssociation Id - The ID of this resource.
- Language string
- Quality profile language. Must be a langauge in this list https://next.sonarqube.com/sonarqube/web_api/api/languages/list
- Project string
- Name of the project
- Quality
Profile string - Name of the Quality Profile
- Qualityprofile
Project stringAssociation Id - The ID of this resource.
- language String
- Quality profile language. Must be a langauge in this list https://next.sonarqube.com/sonarqube/web_api/api/languages/list
- project String
- Name of the project
- quality
Profile String - Name of the Quality Profile
- qualityprofile
Project StringAssociation Id - The ID of this resource.
- language string
- Quality profile language. Must be a langauge in this list https://next.sonarqube.com/sonarqube/web_api/api/languages/list
- project string
- Name of the project
- quality
Profile string - Name of the Quality Profile
- qualityprofile
Project stringAssociation Id - The ID of this resource.
- language str
- Quality profile language. Must be a langauge in this list https://next.sonarqube.com/sonarqube/web_api/api/languages/list
- project str
- Name of the project
- quality_
profile str - Name of the Quality Profile
- qualityprofile_
project_ strassociation_ id - The ID of this resource.
- language String
- Quality profile language. Must be a langauge in this list https://next.sonarqube.com/sonarqube/web_api/api/languages/list
- project String
- Name of the project
- quality
Profile String - Name of the Quality Profile
- qualityprofile
Project StringAssociation Id - The ID of this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the QualityprofileProjectAssociation 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 QualityprofileProjectAssociation Resource
Get an existing QualityprofileProjectAssociation 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?: QualityprofileProjectAssociationState, opts?: CustomResourceOptions): QualityprofileProjectAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
language: Optional[str] = None,
project: Optional[str] = None,
quality_profile: Optional[str] = None,
qualityprofile_project_association_id: Optional[str] = None) -> QualityprofileProjectAssociation
func GetQualityprofileProjectAssociation(ctx *Context, name string, id IDInput, state *QualityprofileProjectAssociationState, opts ...ResourceOption) (*QualityprofileProjectAssociation, error)
public static QualityprofileProjectAssociation Get(string name, Input<string> id, QualityprofileProjectAssociationState? state, CustomResourceOptions? opts = null)
public static QualityprofileProjectAssociation get(String name, Output<String> id, QualityprofileProjectAssociationState state, CustomResourceOptions options)
resources: _: type: sonarqube:QualityprofileProjectAssociation 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.
- Language string
- Quality profile language. Must be a langauge in this list https://next.sonarqube.com/sonarqube/web_api/api/languages/list
- Project string
- Name of the project
- Quality
Profile string - Name of the Quality Profile
- Qualityprofile
Project stringAssociation Id - The ID of this resource.
- Language string
- Quality profile language. Must be a langauge in this list https://next.sonarqube.com/sonarqube/web_api/api/languages/list
- Project string
- Name of the project
- Quality
Profile string - Name of the Quality Profile
- Qualityprofile
Project stringAssociation Id - The ID of this resource.
- language String
- Quality profile language. Must be a langauge in this list https://next.sonarqube.com/sonarqube/web_api/api/languages/list
- project String
- Name of the project
- quality
Profile String - Name of the Quality Profile
- qualityprofile
Project StringAssociation Id - The ID of this resource.
- language string
- Quality profile language. Must be a langauge in this list https://next.sonarqube.com/sonarqube/web_api/api/languages/list
- project string
- Name of the project
- quality
Profile string - Name of the Quality Profile
- qualityprofile
Project stringAssociation Id - The ID of this resource.
- language str
- Quality profile language. Must be a langauge in this list https://next.sonarqube.com/sonarqube/web_api/api/languages/list
- project str
- Name of the project
- quality_
profile str - Name of the Quality Profile
- qualityprofile_
project_ strassociation_ id - The ID of this resource.
- language String
- Quality profile language. Must be a langauge in this list https://next.sonarqube.com/sonarqube/web_api/api/languages/list
- project String
- Name of the project
- quality
Profile String - Name of the Quality Profile
- qualityprofile
Project StringAssociation Id - The ID of this resource.
Package Details
- Repository
- sonarqube jdamata/terraform-provider-sonarqube
- License
- Notes
- This Pulumi package is based on the
sonarqube
Terraform Provider.