published on Friday, Jul 17, 2026 by OVHcloud
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
GETaccess 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_cloudprojectkubelogsubscription" "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_cloudprojectkubelogsubscription" "cloudProjectKubeLogSubscriptionResource" {
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
auditis 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_SERVICEenvironment variable is used.
- Kind string
- Log kind name of this subscription. Only
auditis 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_SERVICEenvironment variable is used.
- kind string
- Log kind name of this subscription. Only
auditis 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_SERVICEenvironment variable is used.
- kind String
- Log kind name of this subscription. Only
auditis 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_SERVICEenvironment variable is used.
- kind string
- Log kind name of this subscription. Only
auditis 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_SERVICEenvironment variable is used.
- kind str
- Log kind name of this subscription. Only
auditis 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_SERVICEenvironment variable is used.
- kind String
- Log kind name of this subscription. Only
auditis 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_SERVICEenvironment variable is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the CloudProjectKubeLogSubscription resource produces the following output properties:
- Created
At string - Creation date of the subscription.
- Id string
- The provider-assigned unique ID for this managed resource.
- Resources
List<Cloud
Project Kube Log Subscription Resource> - Information about the subscribed resource.
- Subscription
Id string - ID of the log subscription.
- Updated
At 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
[]Cloud
Project Kube Log Subscription Resource - Information about the subscribed resource.
- Subscription
Id string - ID of the log subscription.
- Updated
At 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.
- created
At String - Creation date of the subscription.
- id String
- The provider-assigned unique ID for this managed resource.
- resources
List<Cloud
Project Kube Log Subscription Resource> - Information about the subscribed resource.
- subscription
Id String - ID of the log subscription.
- updated
At 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
Cloud
Project Kube Log Subscription Resource[] - Information about the subscribed resource.
- subscription
Id string - ID of the log subscription.
- updated
At 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[Cloud
Project Kube Log Subscription Resource] - Information about the subscribed resource.
- subscription_
id str - ID of the log subscription.
- updated_
at str - 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<Property Map>
- Information about the subscribed resource.
- subscription
Id String - ID of the log subscription.
- updated
At 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) -> CloudProjectKubeLogSubscriptionfunc 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_cloudprojectkubelogsubscription.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.
- Created
At string - Creation date of the subscription.
- Kind string
- Log kind name of this subscription. Only
auditis currently supported. - Kube
Id string - The id of the managed kubernetes cluster.
- Resources
List<Cloud
Project Kube Log Subscription Resource> - Information about the subscribed resource.
- Service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment 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.
- Created
At string - Creation date of the subscription.
- Kind string
- Log kind name of this subscription. Only
auditis currently supported. - Kube
Id string - The id of the managed kubernetes cluster.
- Resources
[]Cloud
Project Kube Log Subscription Resource Args - Information about the subscribed resource.
- Service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment 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.
- created_
at string - Creation date of the subscription.
- kind string
- Log kind name of this subscription. Only
auditis 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_SERVICEenvironment 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.
- created
At String - Creation date of the subscription.
- kind String
- Log kind name of this subscription. Only
auditis currently supported. - kube
Id String - The id of the managed kubernetes cluster.
- resources
List<Cloud
Project Kube Log Subscription Resource> - Information about the subscribed resource.
- service
Name String - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment 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.
- created
At string - Creation date of the subscription.
- kind string
- Log kind name of this subscription. Only
auditis currently supported. - kube
Id string - The id of the managed kubernetes cluster.
- resources
Cloud
Project Kube Log Subscription Resource[] - Information about the subscribed resource.
- service
Name string - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment 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.
- created_
at str - Creation date of the subscription.
- kind str
- Log kind name of this subscription. Only
auditis currently supported. - kube_
id str - The id of the managed kubernetes cluster.
- resources
Sequence[Cloud
Project Kube Log Subscription Resource Args] - Information about the subscribed resource.
- service_
name str - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment 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.
- created
At String - Creation date of the subscription.
- kind String
- Log kind name of this subscription. Only
auditis currently supported. - kube
Id String - The id of the managed kubernetes cluster.
- resources List<Property Map>
- Information about the subscribed resource.
- service
Name String - The id of the public cloud project. If omitted, the
OVH_CLOUD_PROJECT_SERVICEenvironment 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.
Supporting Types
CloudProjectKubeLogSubscriptionResource, CloudProjectKubeLogSubscriptionResourceArgs
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
ovhTerraform Provider.
published on Friday, Jul 17, 2026 by OVHcloud