Viewing docs for sonarqube 0.16.26
published on Friday, Oct 2, 2026 by jdamata
published on Friday, Oct 2, 2026 by jdamata
sonarqube
Viewing docs for sonarqube 0.16.26
published on Friday, Oct 2, 2026 by jdamata
published on Friday, Oct 2, 2026 by jdamata
Provides a Sonarqube Measures data source. Use this to read metric measures for a component.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sonarqube from "@pulumi/sonarqube";
const myProject = sonarqube.getMeasures({
component: "my_project",
metricKeys: [
"coverage",
"reliability_rating",
"security_hotspots",
],
});
export const coverage = myProject.then(myProject => myProject.measures);
import pulumi
import pulumi_sonarqube as sonarqube
my_project = sonarqube.get_measures(component="my_project",
metric_keys=[
"coverage",
"reliability_rating",
"security_hotspots",
])
pulumi.export("coverage", my_project.measures)
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 {
myProject, err := sonarqube.GetMeasures(ctx, &sonarqube.GetMeasuresArgs{
Component: "my_project",
MetricKeys: []string{
"coverage",
"reliability_rating",
"security_hotspots",
},
}, nil)
if err != nil {
return err
}
ctx.Export("coverage", myProject.Measures)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sonarqube = Pulumi.Sonarqube;
return await Deployment.RunAsync(() =>
{
var myProject = Sonarqube.GetMeasures.Invoke(new()
{
Component = "my_project",
MetricKeys = new[]
{
"coverage",
"reliability_rating",
"security_hotspots",
},
});
return new Dictionary<string, object?>
{
["coverage"] = myProject.Apply(getMeasuresResult => getMeasuresResult.Measures),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sonarqube.SonarqubeFunctions;
import com.pulumi.sonarqube.inputs.GetMeasuresArgs;
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) {
final var myProject = SonarqubeFunctions.getMeasures(GetMeasuresArgs.builder()
.component("my_project")
.metricKeys(
"coverage",
"reliability_rating",
"security_hotspots")
.build());
ctx.export("coverage", myProject.measures());
}
}
variables:
myProject:
fn::invoke:
function: sonarqube:getMeasures
arguments:
component: my_project
metricKeys:
- coverage
- reliability_rating
- security_hotspots
outputs:
coverage: ${myProject.measures}
Example coming soon!
Using getMeasures
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getMeasures(args: GetMeasuresArgs, opts?: InvokeOptions): Promise<GetMeasuresResult>
function getMeasuresOutput(args: GetMeasuresOutputArgs, opts?: InvokeOutputOptions): Output<GetMeasuresResult>def get_measures(component: Optional[str] = None,
id: Optional[str] = None,
metric_keys: Optional[Sequence[str]] = None,
opts: Optional[InvokeOptions] = None) -> GetMeasuresResult
def get_measures_output(component: pulumi.Input[Optional[str]] = None,
id: pulumi.Input[Optional[str]] = None,
metric_keys: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetMeasuresResult]func GetMeasures(ctx *Context, args *GetMeasuresArgs, opts ...InvokeOption) (*GetMeasuresResult, error)
func GetMeasuresOutput(ctx *Context, args *GetMeasuresOutputArgs, opts ...InvokeOption) GetMeasuresResultOutput> Note: This function is named GetMeasures in the Go SDK.
public static class GetMeasures
{
public static Task<GetMeasuresResult> InvokeAsync(GetMeasuresArgs args, InvokeOptions? opts = null)
public static Output<GetMeasuresResult> Invoke(GetMeasuresInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetMeasuresResult> Invoke(GetMeasuresInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetMeasuresResult> getMeasures(GetMeasuresArgs args, InvokeOptions options)
public static Output<GetMeasuresResult> getMeasures(GetMeasuresArgs args, InvokeOptions options)
public static Output<GetMeasuresResult> getMeasures(GetMeasuresArgs args, InvokeOutputOptions options)
fn::invoke:
function: sonarqube:index/getMeasures:getMeasures
arguments:
# arguments dictionarydata "sonarqube_get_measures" "name" {
# arguments
}The following arguments are supported:
- Component string
- The key of the component (project) to retrieve measures for.
- Metric
Keys List<string> - List of metric keys to retrieve.
- Id string
- The ID of this resource.
- Component string
- The key of the component (project) to retrieve measures for.
- Metric
Keys []string - List of metric keys to retrieve.
- Id string
- The ID of this resource.
- component string
- The key of the component (project) to retrieve measures for.
- metric_
keys list(string) - List of metric keys to retrieve.
- id string
- The ID of this resource.
- component String
- The key of the component (project) to retrieve measures for.
- metric
Keys List<String> - List of metric keys to retrieve.
- id String
- The ID of this resource.
- component string
- The key of the component (project) to retrieve measures for.
- metric
Keys string[] - List of metric keys to retrieve.
- id string
- The ID of this resource.
- component str
- The key of the component (project) to retrieve measures for.
- metric_
keys Sequence[str] - List of metric keys to retrieve.
- id str
- The ID of this resource.
- component String
- The key of the component (project) to retrieve measures for.
- metric
Keys List<String> - List of metric keys to retrieve.
- id String
- The ID of this resource.
getMeasures Result
The following output properties are available:
- Component string
- The key of the component (project) to retrieve measures for.
- Id string
- The ID of this resource.
- Measures
List<Immutable
Dictionary<string, string>> - List of measures returned by SonarQube.
- Metric
Keys List<string> - List of metric keys to retrieve.
- Component string
- The key of the component (project) to retrieve measures for.
- Id string
- The ID of this resource.
- Measures []map[string]string
- List of measures returned by SonarQube.
- Metric
Keys []string - List of metric keys to retrieve.
- component string
- The key of the component (project) to retrieve measures for.
- id string
- The ID of this resource.
- measures list(map(string))
- List of measures returned by SonarQube.
- metric_
keys list(string) - List of metric keys to retrieve.
- component String
- The key of the component (project) to retrieve measures for.
- id String
- The ID of this resource.
- measures List<Map<String,String>>
- List of measures returned by SonarQube.
- metric
Keys List<String> - List of metric keys to retrieve.
- component string
- The key of the component (project) to retrieve measures for.
- id string
- The ID of this resource.
- measures {[key: string]: string}[]
- List of measures returned by SonarQube.
- metric
Keys string[] - List of metric keys to retrieve.
- component str
- The key of the component (project) to retrieve measures for.
- id str
- The ID of this resource.
- measures Sequence[Mapping[str, str]]
- List of measures returned by SonarQube.
- metric_
keys Sequence[str] - List of metric keys to retrieve.
- component String
- The key of the component (project) to retrieve measures for.
- id String
- The ID of this resource.
- measures List<Map<String>>
- List of measures returned by SonarQube.
- metric
Keys List<String> - List of metric keys to retrieve.
Package Details
- Repository
- sonarqube jdamata/terraform-provider-sonarqube
- License
- Notes
- This Pulumi package is based on the
sonarqubeTerraform Provider.
sonarqube
Viewing docs for sonarqube 0.16.26
published on Friday, Oct 2, 2026 by jdamata
published on Friday, Oct 2, 2026 by jdamata