1. Packages
  2. Packages
  3. OVH
  4. API Docs
  5. CloudProjectKubeLogSubscription
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud

    Creates a log subscription for a Managed Kubernetes cluster associated with a public cloud project.

    Example Usage

    Create a log subscription for a Managed Kubernetes cluster.

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const stream = ovh.Dbaas.getLogsOutputGraylogStream({
        serviceName: "ldp-xx-xxxxx",
        title: "my stream",
    });
    const cluster = ovh.CloudProject.getKube({
        serviceName: "XXXXXX",
        kubeId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    });
    const sub = new ovh.CloudProjectKubeLogSubscription("sub", {
        serviceName: cluster.then(cluster => cluster.serviceName),
        kubeId: cluster.then(cluster => cluster.id),
        streamId: stream.then(stream => stream.streamId),
        kind: "audit",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    stream = ovh.Dbaas.get_logs_output_graylog_stream(service_name="ldp-xx-xxxxx",
        title="my stream")
    cluster = ovh.CloudProject.get_kube(service_name="XXXXXX",
        kube_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
    sub = ovh.CloudProjectKubeLogSubscription("sub",
        service_name=cluster.service_name,
        kube_id=cluster.id,
        stream_id=stream.stream_id,
        kind="audit")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/dbaas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		stream, err := dbaas.GetLogsOutputGraylogStream(ctx, &dbaas.GetLogsOutputGraylogStreamArgs{
    			ServiceName: "ldp-xx-xxxxx",
    			Title:       "my stream",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		cluster, err := cloudproject.GetKube(ctx, &cloudproject.GetKubeArgs{
    			ServiceName: "XXXXXX",
    			KubeId:      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = ovh.NewCloudProjectKubeLogSubscription(ctx, "sub", &ovh.CloudProjectKubeLogSubscriptionArgs{
    			ServiceName: pulumi.String(cluster.ServiceName),
    			KubeId:      pulumi.String(cluster.Id),
    			StreamId:    pulumi.String(stream.StreamId),
    			Kind:        pulumi.String("audit"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var stream = Ovh.Dbaas.GetLogsOutputGraylogStream.Invoke(new()
        {
            ServiceName = "ldp-xx-xxxxx",
            Title = "my stream",
        });
    
        var cluster = Ovh.CloudProject.GetKube.Invoke(new()
        {
            ServiceName = "XXXXXX",
            KubeId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        });
    
        var sub = new Ovh.CloudProjectKubeLogSubscription("sub", new()
        {
            ServiceName = cluster.Apply(getKubeResult => getKubeResult.ServiceName),
            KubeId = cluster.Apply(getKubeResult => getKubeResult.Id),
            StreamId = stream.Apply(getLogsOutputGraylogStreamResult => getLogsOutputGraylogStreamResult.StreamId),
            Kind = "audit",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.Dbaas.DbaasFunctions;
    import com.pulumi.ovh.Dbaas.inputs.GetLogsOutputGraylogStreamArgs;
    import com.pulumi.ovh.CloudProject.CloudProjectFunctions;
    import com.pulumi.ovh.CloudProject.inputs.GetKubeArgs;
    import com.ovhcloud.pulumi.ovh.CloudProjectKubeLogSubscription;
    import com.ovhcloud.pulumi.ovh.CloudProjectKubeLogSubscriptionArgs;
    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 stream = DbaasFunctions.getLogsOutputGraylogStream(GetLogsOutputGraylogStreamArgs.builder()
                .serviceName("ldp-xx-xxxxx")
                .title("my stream")
                .build());
    
            final var cluster = CloudProjectFunctions.getKube(GetKubeArgs.builder()
                .serviceName("XXXXXX")
                .kubeId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
                .build());
    
            var sub = new CloudProjectKubeLogSubscription("sub", CloudProjectKubeLogSubscriptionArgs.builder()
                .serviceName(cluster.serviceName())
                .kubeId(cluster.id())
                .streamId(stream.streamId())
                .kind("audit")
                .build());
    
        }
    }
    
    resources:
      sub:
        type: ovh:CloudProjectKubeLogSubscription
        properties:
          serviceName: ${cluster.serviceName}
          kubeId: ${cluster.id}
          streamId: ${stream.streamId}
          kind: audit
    variables:
      stream:
        fn::invoke:
          function: ovh:Dbaas:getLogsOutputGraylogStream
          arguments:
            serviceName: ldp-xx-xxxxx
            title: my stream
      cluster:
        fn::invoke:
          function: ovh:CloudProject:getKube
          arguments:
            serviceName: XXXXXX
            kubeId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    
    Example coming soon!
    

    Note: The OVHcloud APIv6 token used by the provider must have GET access on the following URI in its token ACL: /dbaas/logs/*/operation/*

    Create CloudProjectKubeLogSubscription Resource

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

    Constructor syntax

    new CloudProjectKubeLogSubscription(name: string, args: CloudProjectKubeLogSubscriptionArgs, opts?: CustomResourceOptions);
    @overload
    def CloudProjectKubeLogSubscription(resource_name: str,
                                        args: CloudProjectKubeLogSubscriptionArgs,
                                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def CloudProjectKubeLogSubscription(resource_name: str,
                                        opts: Optional[ResourceOptions] = None,
                                        kind: Optional[str] = None,
                                        kube_id: Optional[str] = None,
                                        stream_id: Optional[str] = None,
                                        service_name: Optional[str] = None)
    func NewCloudProjectKubeLogSubscription(ctx *Context, name string, args CloudProjectKubeLogSubscriptionArgs, opts ...ResourceOption) (*CloudProjectKubeLogSubscription, error)
    public CloudProjectKubeLogSubscription(string name, CloudProjectKubeLogSubscriptionArgs args, CustomResourceOptions? opts = null)
    public CloudProjectKubeLogSubscription(String name, CloudProjectKubeLogSubscriptionArgs args)
    public CloudProjectKubeLogSubscription(String name, CloudProjectKubeLogSubscriptionArgs args, CustomResourceOptions options)
    
    type: ovh:CloudProjectKubeLogSubscription
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "ovh_cloud_project_kube_log_subscription" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args CloudProjectKubeLogSubscriptionArgs
    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 CloudProjectKubeLogSubscriptionArgs
    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 CloudProjectKubeLogSubscriptionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CloudProjectKubeLogSubscriptionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CloudProjectKubeLogSubscriptionArgs
    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 cloudProjectKubeLogSubscriptionResource = new Ovh.CloudProjectKubeLogSubscription("cloudProjectKubeLogSubscriptionResource", new()
    {
        Kind = "string",
        KubeId = "string",
        StreamId = "string",
        ServiceName = "string",
    });
    
    example, err := ovh.NewCloudProjectKubeLogSubscription(ctx, "cloudProjectKubeLogSubscriptionResource", &ovh.CloudProjectKubeLogSubscriptionArgs{
    	Kind:        pulumi.String("string"),
    	KubeId:      pulumi.String("string"),
    	StreamId:    pulumi.String("string"),
    	ServiceName: pulumi.String("string"),
    })
    
    resource "ovh_cloud_project_kube_log_subscription" "cloudProjectKubeLogSubscriptionResource" {
      lifecycle {
        create_before_destroy = true
      }
      kind         = "string"
      kube_id      = "string"
      stream_id    = "string"
      service_name = "string"
    }
    
    var cloudProjectKubeLogSubscriptionResource = new CloudProjectKubeLogSubscription("cloudProjectKubeLogSubscriptionResource", CloudProjectKubeLogSubscriptionArgs.builder()
        .kind("string")
        .kubeId("string")
        .streamId("string")
        .serviceName("string")
        .build());
    
    cloud_project_kube_log_subscription_resource = ovh.CloudProjectKubeLogSubscription("cloudProjectKubeLogSubscriptionResource",
        kind="string",
        kube_id="string",
        stream_id="string",
        service_name="string")
    
    const cloudProjectKubeLogSubscriptionResource = new ovh.CloudProjectKubeLogSubscription("cloudProjectKubeLogSubscriptionResource", {
        kind: "string",
        kubeId: "string",
        streamId: "string",
        serviceName: "string",
    });
    
    type: ovh:CloudProjectKubeLogSubscription
    properties:
        kind: string
        kubeId: string
        serviceName: string
        streamId: string
    

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

    Kind string
    Log kind name of this subscription. Only audit is currently supported.
    KubeId string
    The id of the managed kubernetes cluster.
    StreamId string
    Id of the target Log data platform stream.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    Kind string
    Log kind name of this subscription. Only audit is currently supported.
    KubeId string
    The id of the managed kubernetes cluster.
    StreamId string
    Id of the target Log data platform stream.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    kind string
    Log kind name of this subscription. Only audit is currently supported.
    kube_id string
    The id of the managed kubernetes cluster.
    stream_id string
    Id of the target Log data platform stream.
    service_name string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    kind String
    Log kind name of this subscription. Only audit is currently supported.
    kubeId String
    The id of the managed kubernetes cluster.
    streamId String
    Id of the target Log data platform stream.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    kind string
    Log kind name of this subscription. Only audit is currently supported.
    kubeId string
    The id of the managed kubernetes cluster.
    streamId string
    Id of the target Log data platform stream.
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    kind str
    Log kind name of this subscription. Only audit is currently supported.
    kube_id str
    The id of the managed kubernetes cluster.
    stream_id str
    Id of the target Log data platform stream.
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    kind String
    Log kind name of this subscription. Only audit is currently supported.
    kubeId String
    The id of the managed kubernetes cluster.
    streamId String
    Id of the target Log data platform stream.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CloudProjectKubeLogSubscription resource produces the following output properties:

    CreatedAt string
    Creation date of the subscription.
    Id string
    The provider-assigned unique ID for this managed resource.
    Resources List<CloudProjectKubeLogSubscriptionResource>
    Information about the subscribed resource.
    SubscriptionId string
    ID of the log subscription.
    UpdatedAt string
    Last update date of the subscription.
    CreatedAt string
    Creation date of the subscription.
    Id string
    The provider-assigned unique ID for this managed resource.
    Resources []CloudProjectKubeLogSubscriptionResource
    Information about the subscribed resource.
    SubscriptionId string
    ID of the log subscription.
    UpdatedAt string
    Last update date of the subscription.
    created_at string
    Creation date of the subscription.
    id string
    The provider-assigned unique ID for this managed resource.
    resources list(object)
    Information about the subscribed resource.
    subscription_id string
    ID of the log subscription.
    updated_at string
    Last update date of the subscription.
    createdAt String
    Creation date of the subscription.
    id String
    The provider-assigned unique ID for this managed resource.
    resources List<CloudProjectKubeLogSubscriptionResource>
    Information about the subscribed resource.
    subscriptionId String
    ID of the log subscription.
    updatedAt String
    Last update date of the subscription.
    createdAt string
    Creation date of the subscription.
    id string
    The provider-assigned unique ID for this managed resource.
    resources CloudProjectKubeLogSubscriptionResource[]
    Information about the subscribed resource.
    subscriptionId string
    ID of the log subscription.
    updatedAt string
    Last update date of the subscription.
    created_at str
    Creation date of the subscription.
    id str
    The provider-assigned unique ID for this managed resource.
    resources Sequence[CloudProjectKubeLogSubscriptionResource]
    Information about the subscribed resource.
    subscription_id str
    ID of the log subscription.
    updated_at str
    Last update date of the subscription.
    createdAt String
    Creation date of the subscription.
    id String
    The provider-assigned unique ID for this managed resource.
    resources List<Property Map>
    Information about the subscribed resource.
    subscriptionId String
    ID of the log subscription.
    updatedAt String
    Last update date of the subscription.

    Look up Existing CloudProjectKubeLogSubscription Resource

    Get an existing CloudProjectKubeLogSubscription 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?: CloudProjectKubeLogSubscriptionState, opts?: CustomResourceOptions): CloudProjectKubeLogSubscription
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            kind: Optional[str] = None,
            kube_id: Optional[str] = None,
            resources: Optional[Sequence[CloudProjectKubeLogSubscriptionResourceArgs]] = None,
            service_name: Optional[str] = None,
            stream_id: Optional[str] = None,
            subscription_id: Optional[str] = None,
            updated_at: Optional[str] = None) -> CloudProjectKubeLogSubscription
    func GetCloudProjectKubeLogSubscription(ctx *Context, name string, id IDInput, state *CloudProjectKubeLogSubscriptionState, opts ...ResourceOption) (*CloudProjectKubeLogSubscription, error)
    public static CloudProjectKubeLogSubscription Get(string name, Input<string> id, CloudProjectKubeLogSubscriptionState? state, CustomResourceOptions? opts = null)
    public static CloudProjectKubeLogSubscription get(String name, Output<String> id, CloudProjectKubeLogSubscriptionState state, CustomResourceOptions options)
    resources:  _:    type: ovh:CloudProjectKubeLogSubscription    get:      id: ${id}
    import {
      to = ovh_cloud_project_kube_log_subscription.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:
    CreatedAt string
    Creation date of the subscription.
    Kind string
    Log kind name of this subscription. Only audit is currently supported.
    KubeId string
    The id of the managed kubernetes cluster.
    Resources List<CloudProjectKubeLogSubscriptionResource>
    Information about the subscribed resource.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    StreamId string
    Id of the target Log data platform stream.
    SubscriptionId string
    ID of the log subscription.
    UpdatedAt string
    Last update date of the subscription.
    CreatedAt string
    Creation date of the subscription.
    Kind string
    Log kind name of this subscription. Only audit is currently supported.
    KubeId string
    The id of the managed kubernetes cluster.
    Resources []CloudProjectKubeLogSubscriptionResourceArgs
    Information about the subscribed resource.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    StreamId string
    Id of the target Log data platform stream.
    SubscriptionId string
    ID of the log subscription.
    UpdatedAt string
    Last update date of the subscription.
    created_at string
    Creation date of the subscription.
    kind string
    Log kind name of this subscription. Only audit is currently supported.
    kube_id string
    The id of the managed kubernetes cluster.
    resources list(object)
    Information about the subscribed resource.
    service_name string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    stream_id string
    Id of the target Log data platform stream.
    subscription_id string
    ID of the log subscription.
    updated_at string
    Last update date of the subscription.
    createdAt String
    Creation date of the subscription.
    kind String
    Log kind name of this subscription. Only audit is currently supported.
    kubeId String
    The id of the managed kubernetes cluster.
    resources List<CloudProjectKubeLogSubscriptionResource>
    Information about the subscribed resource.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    streamId String
    Id of the target Log data platform stream.
    subscriptionId String
    ID of the log subscription.
    updatedAt String
    Last update date of the subscription.
    createdAt string
    Creation date of the subscription.
    kind string
    Log kind name of this subscription. Only audit is currently supported.
    kubeId string
    The id of the managed kubernetes cluster.
    resources CloudProjectKubeLogSubscriptionResource[]
    Information about the subscribed resource.
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    streamId string
    Id of the target Log data platform stream.
    subscriptionId string
    ID of the log subscription.
    updatedAt string
    Last update date of the subscription.
    created_at str
    Creation date of the subscription.
    kind str
    Log kind name of this subscription. Only audit is currently supported.
    kube_id str
    The id of the managed kubernetes cluster.
    resources Sequence[CloudProjectKubeLogSubscriptionResourceArgs]
    Information about the subscribed resource.
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    stream_id str
    Id of the target Log data platform stream.
    subscription_id str
    ID of the log subscription.
    updated_at str
    Last update date of the subscription.
    createdAt String
    Creation date of the subscription.
    kind String
    Log kind name of this subscription. Only audit is currently supported.
    kubeId String
    The id of the managed kubernetes cluster.
    resources List<Property Map>
    Information about the subscribed resource.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    streamId String
    Id of the target Log data platform stream.
    subscriptionId String
    ID of the log subscription.
    updatedAt String
    Last update date of the subscription.

    Supporting Types

    CloudProjectKubeLogSubscriptionResource, CloudProjectKubeLogSubscriptionResourceArgs

    Name string
    Name of the subscribed resource, where the logs come from.
    Type string
    Type of the subscribed resource, where the logs come from.
    Name string
    Name of the subscribed resource, where the logs come from.
    Type string
    Type of the subscribed resource, where the logs come from.
    name string
    Name of the subscribed resource, where the logs come from.
    type string
    Type of the subscribed resource, where the logs come from.
    name String
    Name of the subscribed resource, where the logs come from.
    type String
    Type of the subscribed resource, where the logs come from.
    name string
    Name of the subscribed resource, where the logs come from.
    type string
    Type of the subscribed resource, where the logs come from.
    name str
    Name of the subscribed resource, where the logs come from.
    type str
    Type of the subscribed resource, where the logs come from.
    name String
    Name of the subscribed resource, where the logs come from.
    type String
    Type of the subscribed resource, where the logs come from.

    Import

    OVHcloud Managed Kubernetes Service cluster log subscription can be imported using the service_name, kube_id and subscription_id separated by “/” E.g.,

    bash

    $ pulumi import ovh:index/cloudProjectKubeLogSubscription:CloudProjectKubeLogSubscription sub service_name/kube_id/subscription_id
    

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

    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.17.0
    published on Friday, Jul 17, 2026 by OVHcloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial