OVHCloud v2.8.0 published on Wednesday, Sep 24, 2025 by OVHcloud
ovh.CloudProject.getPrometheus
Use this data source to get information about a prometheus of a database cluster associated with a public cloud project. For mongodb, please use ovh.CloudProjectDatabase.MongoDbPrometheus datasource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const prometheus = ovh.CloudProject.getPrometheus({
    serviceName: "XXX",
    engine: "YYY",
    clusterId: "ZZZ",
});
export const name = prometheus.then(prometheus => prometheus.username);
import pulumi
import pulumi_ovh as ovh
prometheus = ovh.CloudProject.get_prometheus(service_name="XXX",
    engine="YYY",
    cluster_id="ZZZ")
pulumi.export("name", prometheus.username)
package main
import (
	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		prometheus, err := cloudproject.GetPrometheus(ctx, &cloudproject.GetPrometheusArgs{
			ServiceName: "XXX",
			Engine:      "YYY",
			ClusterId:   "ZZZ",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("name", prometheus.Username)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() => 
{
    var prometheus = Ovh.CloudProject.GetPrometheus.Invoke(new()
    {
        ServiceName = "XXX",
        Engine = "YYY",
        ClusterId = "ZZZ",
    });
    return new Dictionary<string, object?>
    {
        ["name"] = prometheus.Apply(getPrometheusResult => getPrometheusResult.Username),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProject.CloudProjectFunctions;
import com.pulumi.ovh.CloudProject.inputs.GetPrometheusArgs;
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 prometheus = CloudProjectFunctions.getPrometheus(GetPrometheusArgs.builder()
            .serviceName("XXX")
            .engine("YYY")
            .clusterId("ZZZ")
            .build());
        ctx.export("name", prometheus.username());
    }
}
variables:
  prometheus:
    fn::invoke:
      function: ovh:CloudProject:getPrometheus
      arguments:
        serviceName: XXX
        engine: YYY
        clusterId: ZZZ
outputs:
  name: ${prometheus.username}
Using getPrometheus
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 getPrometheus(args: GetPrometheusArgs, opts?: InvokeOptions): Promise<GetPrometheusResult>
function getPrometheusOutput(args: GetPrometheusOutputArgs, opts?: InvokeOptions): Output<GetPrometheusResult>def get_prometheus(cluster_id: Optional[str] = None,
                   engine: Optional[str] = None,
                   service_name: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetPrometheusResult
def get_prometheus_output(cluster_id: Optional[pulumi.Input[str]] = None,
                   engine: Optional[pulumi.Input[str]] = None,
                   service_name: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetPrometheusResult]func GetPrometheus(ctx *Context, args *GetPrometheusArgs, opts ...InvokeOption) (*GetPrometheusResult, error)
func GetPrometheusOutput(ctx *Context, args *GetPrometheusOutputArgs, opts ...InvokeOption) GetPrometheusResultOutput> Note: This function is named GetPrometheus in the Go SDK.
public static class GetPrometheus 
{
    public static Task<GetPrometheusResult> InvokeAsync(GetPrometheusArgs args, InvokeOptions? opts = null)
    public static Output<GetPrometheusResult> Invoke(GetPrometheusInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPrometheusResult> getPrometheus(GetPrometheusArgs args, InvokeOptions options)
public static Output<GetPrometheusResult> getPrometheus(GetPrometheusArgs args, InvokeOptions options)
fn::invoke:
  function: ovh:CloudProject/getPrometheus:getPrometheus
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ClusterId string
- Cluster ID
- Engine string
- The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation. Available engines:
- ServiceName string
- The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- ClusterId string
- Cluster ID
- Engine string
- The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation. Available engines:
- ServiceName string
- The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- clusterId String
- Cluster ID
- engine String
- The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation. Available engines:
- serviceName String
- The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- clusterId string
- Cluster ID
- engine string
- The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation. Available engines:
- serviceName string
- The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- cluster_id str
- Cluster ID
- engine str
- The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation. Available engines:
- service_name str
- The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
- clusterId String
- Cluster ID
- engine String
- The engine of the database cluster you want user information. To get a full list of available engine visit : public documentation. Available engines:
- serviceName String
- The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICEenvironment variable is used.
getPrometheus Result
The following output properties are available:
- ClusterId string
- See Argument Reference above.
- Engine string
- See Argument Reference above.
- Id string
- The provider-assigned unique ID for this managed resource.
- ServiceName string
- See Argument Reference above.
- Targets
List<GetPrometheus Target> 
- List of all endpoint targets.- Host- Host of the endpoint.
- Port- Connection port for the endpoint.
 
- Username string
- name of the prometheus user.
- ClusterId string
- See Argument Reference above.
- Engine string
- See Argument Reference above.
- Id string
- The provider-assigned unique ID for this managed resource.
- ServiceName string
- See Argument Reference above.
- Targets
[]GetPrometheus Target 
- List of all endpoint targets.- Host- Host of the endpoint.
- Port- Connection port for the endpoint.
 
- Username string
- name of the prometheus user.
- clusterId String
- See Argument Reference above.
- engine String
- See Argument Reference above.
- id String
- The provider-assigned unique ID for this managed resource.
- serviceName String
- See Argument Reference above.
- targets
List<GetPrometheus Target> 
- List of all endpoint targets.- Host- Host of the endpoint.
- Port- Connection port for the endpoint.
 
- username String
- name of the prometheus user.
- clusterId string
- See Argument Reference above.
- engine string
- See Argument Reference above.
- id string
- The provider-assigned unique ID for this managed resource.
- serviceName string
- See Argument Reference above.
- targets
GetPrometheus Target[] 
- List of all endpoint targets.- Host- Host of the endpoint.
- Port- Connection port for the endpoint.
 
- username string
- name of the prometheus user.
- cluster_id str
- See Argument Reference above.
- engine str
- See Argument Reference above.
- id str
- The provider-assigned unique ID for this managed resource.
- service_name str
- See Argument Reference above.
- targets
Sequence[GetPrometheus Target] 
- List of all endpoint targets.- Host- Host of the endpoint.
- Port- Connection port for the endpoint.
 
- username str
- name of the prometheus user.
- clusterId String
- See Argument Reference above.
- engine String
- See Argument Reference above.
- id String
- The provider-assigned unique ID for this managed resource.
- serviceName String
- See Argument Reference above.
- targets List<Property Map>
- List of all endpoint targets.- Host- Host of the endpoint.
- Port- Connection port for the endpoint.
 
- username String
- name of the prometheus user.
Supporting Types
GetPrometheusTarget  
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ovhTerraform Provider.
