1. Packages
  2. OVH
  3. API Docs
  4. getCloudProjectDatabaseClickhouseUser
Viewing docs for OVHCloud v2.12.0
published on Thursday, Mar 12, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.12.0
published on Thursday, Mar 12, 2026 by OVHcloud

    Use this data source to get information about a user of a clickhouse cluster associated with a public cloud project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const chUser = ovh.getCloudProjectDatabaseClickhouseUser({
        serviceName: "XXX",
        clusterId: "YYY",
        name: "ZZZ",
    });
    export const chUserRoles = chUser.then(chUser => chUser.roles);
    
    import pulumi
    import pulumi_ovh as ovh
    
    ch_user = ovh.get_cloud_project_database_clickhouse_user(service_name="XXX",
        cluster_id="YYY",
        name="ZZZ")
    pulumi.export("chUserRoles", ch_user.roles)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		chUser, err := ovh.LookupCloudProjectDatabaseClickhouseUser(ctx, &ovh.LookupCloudProjectDatabaseClickhouseUserArgs{
    			ServiceName: "XXX",
    			ClusterId:   "YYY",
    			Name:        "ZZZ",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("chUserRoles", chUser.Roles)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var chUser = Ovh.GetCloudProjectDatabaseClickhouseUser.Invoke(new()
        {
            ServiceName = "XXX",
            ClusterId = "YYY",
            Name = "ZZZ",
        });
    
        return new Dictionary<string, object?>
        {
            ["chUserRoles"] = chUser.Apply(getCloudProjectDatabaseClickhouseUserResult => getCloudProjectDatabaseClickhouseUserResult.Roles),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.OvhFunctions;
    import com.pulumi.ovh.inputs.GetCloudProjectDatabaseClickhouseUserArgs;
    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 chUser = OvhFunctions.getCloudProjectDatabaseClickhouseUser(GetCloudProjectDatabaseClickhouseUserArgs.builder()
                .serviceName("XXX")
                .clusterId("YYY")
                .name("ZZZ")
                .build());
    
            ctx.export("chUserRoles", chUser.roles());
        }
    }
    
    variables:
      chUser:
        fn::invoke:
          function: ovh:getCloudProjectDatabaseClickhouseUser
          arguments:
            serviceName: XXX
            clusterId: YYY
            name: ZZZ
    outputs:
      chUserRoles: ${chUser.roles}
    

    Using getCloudProjectDatabaseClickhouseUser

    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 getCloudProjectDatabaseClickhouseUser(args: GetCloudProjectDatabaseClickhouseUserArgs, opts?: InvokeOptions): Promise<GetCloudProjectDatabaseClickhouseUserResult>
    function getCloudProjectDatabaseClickhouseUserOutput(args: GetCloudProjectDatabaseClickhouseUserOutputArgs, opts?: InvokeOptions): Output<GetCloudProjectDatabaseClickhouseUserResult>
    def get_cloud_project_database_clickhouse_user(cluster_id: Optional[str] = None,
                                                   name: Optional[str] = None,
                                                   service_name: Optional[str] = None,
                                                   opts: Optional[InvokeOptions] = None) -> GetCloudProjectDatabaseClickhouseUserResult
    def get_cloud_project_database_clickhouse_user_output(cluster_id: Optional[pulumi.Input[str]] = None,
                                                   name: Optional[pulumi.Input[str]] = None,
                                                   service_name: Optional[pulumi.Input[str]] = None,
                                                   opts: Optional[InvokeOptions] = None) -> Output[GetCloudProjectDatabaseClickhouseUserResult]
    func LookupCloudProjectDatabaseClickhouseUser(ctx *Context, args *LookupCloudProjectDatabaseClickhouseUserArgs, opts ...InvokeOption) (*LookupCloudProjectDatabaseClickhouseUserResult, error)
    func LookupCloudProjectDatabaseClickhouseUserOutput(ctx *Context, args *LookupCloudProjectDatabaseClickhouseUserOutputArgs, opts ...InvokeOption) LookupCloudProjectDatabaseClickhouseUserResultOutput

    > Note: This function is named LookupCloudProjectDatabaseClickhouseUser in the Go SDK.

    public static class GetCloudProjectDatabaseClickhouseUser 
    {
        public static Task<GetCloudProjectDatabaseClickhouseUserResult> InvokeAsync(GetCloudProjectDatabaseClickhouseUserArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudProjectDatabaseClickhouseUserResult> Invoke(GetCloudProjectDatabaseClickhouseUserInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCloudProjectDatabaseClickhouseUserResult> getCloudProjectDatabaseClickhouseUser(GetCloudProjectDatabaseClickhouseUserArgs args, InvokeOptions options)
    public static Output<GetCloudProjectDatabaseClickhouseUserResult> getCloudProjectDatabaseClickhouseUser(GetCloudProjectDatabaseClickhouseUserArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:index/getCloudProjectDatabaseClickhouseUser:getCloudProjectDatabaseClickhouseUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterId string
    Cluster ID
    Name string
    Name of the user.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    ClusterId string
    Cluster ID
    Name string
    Name of the user.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    clusterId String
    Cluster ID
    name String
    Name of the user.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    clusterId string
    Cluster ID
    name string
    Name of the user.
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    cluster_id str
    Cluster ID
    name str
    Name of the user.
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    clusterId String
    Cluster ID
    name String
    Name of the user.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

    getCloudProjectDatabaseClickhouseUser Result

    The following output properties are available:

    ClusterId string
    See Argument Reference above.
    CreatedAt string
    Date of the creation of the user.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the user.
    Roles List<string>
    Roles the user belongs to.
    ServiceName string
    See Argument Reference above.
    Status string
    Current status of the user.
    ClusterId string
    See Argument Reference above.
    CreatedAt string
    Date of the creation of the user.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the user.
    Roles []string
    Roles the user belongs to.
    ServiceName string
    See Argument Reference above.
    Status string
    Current status of the user.
    clusterId String
    See Argument Reference above.
    createdAt String
    Date of the creation of the user.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the user.
    roles List<String>
    Roles the user belongs to.
    serviceName String
    See Argument Reference above.
    status String
    Current status of the user.
    clusterId string
    See Argument Reference above.
    createdAt string
    Date of the creation of the user.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Name of the user.
    roles string[]
    Roles the user belongs to.
    serviceName string
    See Argument Reference above.
    status string
    Current status of the user.
    cluster_id str
    See Argument Reference above.
    created_at str
    Date of the creation of the user.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Name of the user.
    roles Sequence[str]
    Roles the user belongs to.
    service_name str
    See Argument Reference above.
    status str
    Current status of the user.
    clusterId String
    See Argument Reference above.
    createdAt String
    Date of the creation of the user.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the user.
    roles List<String>
    Roles the user belongs to.
    serviceName String
    See Argument Reference above.
    status String
    Current status of the user.

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    Viewing docs for OVHCloud v2.12.0
    published on Thursday, Mar 12, 2026 by OVHcloud
      Try Pulumi Cloud free. Your team will thank you.