1. Packages
  2. DigitalOcean Provider
  3. API Docs
  4. DatabaseLogsinkRsyslog
DigitalOcean v4.56.0 published on Monday, Dec 22, 2025 by Pulumi
digitalocean logo
DigitalOcean v4.56.0 published on Monday, Dec 22, 2025 by Pulumi

    Provides a DigitalOcean database logsink resource allowing you to forward logs from a managed database cluster to an external rsyslog server.

    This resource supports the following DigitalOcean managed database engines:

    • PostgreSQL
    • MySQL
    • Kafka
    • Valkey

    Note: MongoDB databases use a different log forwarding mechanism and require Datadog logsinks (not currently available in this provider).

    Example Usage

    Basic rsyslog configuration

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const postgres_example = new digitalocean.DatabaseCluster("postgres-example", {
        name: "example-postgres-cluster",
        engine: "pg",
        version: "15",
        size: digitalocean.DatabaseSlug.DB_1VPCU1GB,
        region: digitalocean.Region.NYC1,
        nodeCount: 1,
    });
    const example = new digitalocean.DatabaseLogsinkRsyslog("example", {
        clusterId: postgres_example.id,
        name: "rsyslog-prod",
        server: "192.0.2.10",
        port: 514,
        format: "rfc5424",
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    postgres_example = digitalocean.DatabaseCluster("postgres-example",
        name="example-postgres-cluster",
        engine="pg",
        version="15",
        size=digitalocean.DatabaseSlug.D_B_1_VPCU1_GB,
        region=digitalocean.Region.NYC1,
        node_count=1)
    example = digitalocean.DatabaseLogsinkRsyslog("example",
        cluster_id=postgres_example.id,
        name="rsyslog-prod",
        server="192.0.2.10",
        port=514,
        format="rfc5424")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		postgres_example, err := digitalocean.NewDatabaseCluster(ctx, "postgres-example", &digitalocean.DatabaseClusterArgs{
    			Name:      pulumi.String("example-postgres-cluster"),
    			Engine:    pulumi.String("pg"),
    			Version:   pulumi.String("15"),
    			Size:      pulumi.String(digitalocean.DatabaseSlug_DB_1VPCU1GB),
    			Region:    pulumi.String(digitalocean.RegionNYC1),
    			NodeCount: pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = digitalocean.NewDatabaseLogsinkRsyslog(ctx, "example", &digitalocean.DatabaseLogsinkRsyslogArgs{
    			ClusterId: postgres_example.ID(),
    			Name:      pulumi.String("rsyslog-prod"),
    			Server:    pulumi.String("192.0.2.10"),
    			Port:      pulumi.Int(514),
    			Format:    pulumi.String("rfc5424"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var postgres_example = new DigitalOcean.DatabaseCluster("postgres-example", new()
        {
            Name = "example-postgres-cluster",
            Engine = "pg",
            Version = "15",
            Size = DigitalOcean.DatabaseSlug.DB_1VPCU1GB,
            Region = DigitalOcean.Region.NYC1,
            NodeCount = 1,
        });
    
        var example = new DigitalOcean.DatabaseLogsinkRsyslog("example", new()
        {
            ClusterId = postgres_example.Id,
            Name = "rsyslog-prod",
            Server = "192.0.2.10",
            Port = 514,
            Format = "rfc5424",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.digitalocean.DatabaseCluster;
    import com.pulumi.digitalocean.DatabaseClusterArgs;
    import com.pulumi.digitalocean.DatabaseLogsinkRsyslog;
    import com.pulumi.digitalocean.DatabaseLogsinkRsyslogArgs;
    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) {
            var postgres_example = new DatabaseCluster("postgres-example", DatabaseClusterArgs.builder()
                .name("example-postgres-cluster")
                .engine("pg")
                .version("15")
                .size("db-s-1vcpu-1gb")
                .region("nyc1")
                .nodeCount(1)
                .build());
    
            var example = new DatabaseLogsinkRsyslog("example", DatabaseLogsinkRsyslogArgs.builder()
                .clusterId(postgres_example.id())
                .name("rsyslog-prod")
                .server("192.0.2.10")
                .port(514)
                .format("rfc5424")
                .build());
    
        }
    }
    
    resources:
      example:
        type: digitalocean:DatabaseLogsinkRsyslog
        properties:
          clusterId: ${["postgres-example"].id}
          name: rsyslog-prod
          server: 192.0.2.10
          port: 514
          format: rfc5424
      postgres-example:
        type: digitalocean:DatabaseCluster
        properties:
          name: example-postgres-cluster
          engine: pg
          version: '15'
          size: db-s-1vcpu-1gb
          region: nyc1
          nodeCount: 1
    

    TLS-enabled rsyslog configuration

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    import * as std from "@pulumi/std";
    
    const example_tls = new digitalocean.DatabaseLogsinkRsyslog("example-tls", {
        clusterId: postgres_example.id,
        name: "rsyslog-secure",
        server: "logs.example.com",
        port: 6514,
        tls: true,
        format: "rfc5424",
        caCert: std.file({
            input: "/path/to/ca.pem",
        }).then(invoke => invoke.result),
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    import pulumi_std as std
    
    example_tls = digitalocean.DatabaseLogsinkRsyslog("example-tls",
        cluster_id=postgres_example["id"],
        name="rsyslog-secure",
        server="logs.example.com",
        port=6514,
        tls=True,
        format="rfc5424",
        ca_cert=std.file(input="/path/to/ca.pem").result)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		invokeFile, err := std.File(ctx, &std.FileArgs{
    			Input: "/path/to/ca.pem",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = digitalocean.NewDatabaseLogsinkRsyslog(ctx, "example-tls", &digitalocean.DatabaseLogsinkRsyslogArgs{
    			ClusterId: pulumi.Any(postgres_example.Id),
    			Name:      pulumi.String("rsyslog-secure"),
    			Server:    pulumi.String("logs.example.com"),
    			Port:      pulumi.Int(6514),
    			Tls:       pulumi.Bool(true),
    			Format:    pulumi.String("rfc5424"),
    			CaCert:    pulumi.String(invokeFile.Result),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var example_tls = new DigitalOcean.DatabaseLogsinkRsyslog("example-tls", new()
        {
            ClusterId = postgres_example.Id,
            Name = "rsyslog-secure",
            Server = "logs.example.com",
            Port = 6514,
            Tls = true,
            Format = "rfc5424",
            CaCert = Std.File.Invoke(new()
            {
                Input = "/path/to/ca.pem",
            }).Apply(invoke => invoke.Result),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.digitalocean.DatabaseLogsinkRsyslog;
    import com.pulumi.digitalocean.DatabaseLogsinkRsyslogArgs;
    import com.pulumi.std.StdFunctions;
    import com.pulumi.std.inputs.FileArgs;
    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) {
            var example_tls = new DatabaseLogsinkRsyslog("example-tls", DatabaseLogsinkRsyslogArgs.builder()
                .clusterId(postgres_example.id())
                .name("rsyslog-secure")
                .server("logs.example.com")
                .port(6514)
                .tls(true)
                .format("rfc5424")
                .caCert(StdFunctions.file(FileArgs.builder()
                    .input("/path/to/ca.pem")
                    .build()).result())
                .build());
    
        }
    }
    
    resources:
      example-tls:
        type: digitalocean:DatabaseLogsinkRsyslog
        properties:
          clusterId: ${["postgres-example"].id}
          name: rsyslog-secure
          server: logs.example.com
          port: 6514
          tls: true
          format: rfc5424
          caCert:
            fn::invoke:
              function: std:file
              arguments:
                input: /path/to/ca.pem
              return: result
    

    mTLS (mutual TLS) configuration

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    import * as std from "@pulumi/std";
    
    const example_mtls = new digitalocean.DatabaseLogsinkRsyslog("example-mtls", {
        clusterId: postgres_example.id,
        name: "rsyslog-mtls",
        server: "secure-logs.example.com",
        port: 6514,
        tls: true,
        format: "rfc5424",
        caCert: std.file({
            input: "/path/to/ca.pem",
        }).then(invoke => invoke.result),
        clientCert: std.file({
            input: "/path/to/client.crt",
        }).then(invoke => invoke.result),
        clientKey: std.file({
            input: "/path/to/client.key",
        }).then(invoke => invoke.result),
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    import pulumi_std as std
    
    example_mtls = digitalocean.DatabaseLogsinkRsyslog("example-mtls",
        cluster_id=postgres_example["id"],
        name="rsyslog-mtls",
        server="secure-logs.example.com",
        port=6514,
        tls=True,
        format="rfc5424",
        ca_cert=std.file(input="/path/to/ca.pem").result,
        client_cert=std.file(input="/path/to/client.crt").result,
        client_key=std.file(input="/path/to/client.key").result)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		invokeFile, err := std.File(ctx, &std.FileArgs{
    			Input: "/path/to/ca.pem",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		invokeFile1, err := std.File(ctx, &std.FileArgs{
    			Input: "/path/to/client.crt",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		invokeFile2, err := std.File(ctx, &std.FileArgs{
    			Input: "/path/to/client.key",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = digitalocean.NewDatabaseLogsinkRsyslog(ctx, "example-mtls", &digitalocean.DatabaseLogsinkRsyslogArgs{
    			ClusterId:  pulumi.Any(postgres_example.Id),
    			Name:       pulumi.String("rsyslog-mtls"),
    			Server:     pulumi.String("secure-logs.example.com"),
    			Port:       pulumi.Int(6514),
    			Tls:        pulumi.Bool(true),
    			Format:     pulumi.String("rfc5424"),
    			CaCert:     pulumi.String(invokeFile.Result),
    			ClientCert: pulumi.String(invokeFile1.Result),
    			ClientKey:  pulumi.String(invokeFile2.Result),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var example_mtls = new DigitalOcean.DatabaseLogsinkRsyslog("example-mtls", new()
        {
            ClusterId = postgres_example.Id,
            Name = "rsyslog-mtls",
            Server = "secure-logs.example.com",
            Port = 6514,
            Tls = true,
            Format = "rfc5424",
            CaCert = Std.File.Invoke(new()
            {
                Input = "/path/to/ca.pem",
            }).Apply(invoke => invoke.Result),
            ClientCert = Std.File.Invoke(new()
            {
                Input = "/path/to/client.crt",
            }).Apply(invoke => invoke.Result),
            ClientKey = Std.File.Invoke(new()
            {
                Input = "/path/to/client.key",
            }).Apply(invoke => invoke.Result),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.digitalocean.DatabaseLogsinkRsyslog;
    import com.pulumi.digitalocean.DatabaseLogsinkRsyslogArgs;
    import com.pulumi.std.StdFunctions;
    import com.pulumi.std.inputs.FileArgs;
    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) {
            var example_mtls = new DatabaseLogsinkRsyslog("example-mtls", DatabaseLogsinkRsyslogArgs.builder()
                .clusterId(postgres_example.id())
                .name("rsyslog-mtls")
                .server("secure-logs.example.com")
                .port(6514)
                .tls(true)
                .format("rfc5424")
                .caCert(StdFunctions.file(FileArgs.builder()
                    .input("/path/to/ca.pem")
                    .build()).result())
                .clientCert(StdFunctions.file(FileArgs.builder()
                    .input("/path/to/client.crt")
                    .build()).result())
                .clientKey(StdFunctions.file(FileArgs.builder()
                    .input("/path/to/client.key")
                    .build()).result())
                .build());
    
        }
    }
    
    resources:
      example-mtls:
        type: digitalocean:DatabaseLogsinkRsyslog
        properties:
          clusterId: ${["postgres-example"].id}
          name: rsyslog-mtls
          server: secure-logs.example.com
          port: 6514
          tls: true
          format: rfc5424
          caCert:
            fn::invoke:
              function: std:file
              arguments:
                input: /path/to/ca.pem
              return: result
          clientCert:
            fn::invoke:
              function: std:file
              arguments:
                input: /path/to/client.crt
              return: result
          clientKey:
            fn::invoke:
              function: std:file
              arguments:
                input: /path/to/client.key
              return: result
    

    Custom format configuration

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const example_custom = new digitalocean.DatabaseLogsinkRsyslog("example-custom", {
        clusterId: postgres_example.id,
        name: "rsyslog-custom",
        server: "192.0.2.10",
        port: 514,
        format: "custom",
        logline: "<%pri%>%timestamp:::date-rfc3339% %HOSTNAME% %app-name% %msg%",
        structuredData: "[example@41058 iut=\"3\"]",
    });
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    example_custom = digitalocean.DatabaseLogsinkRsyslog("example-custom",
        cluster_id=postgres_example["id"],
        name="rsyslog-custom",
        server="192.0.2.10",
        port=514,
        format="custom",
        logline="<%pri%>%timestamp:::date-rfc3339% %HOSTNAME% %app-name% %msg%",
        structured_data="[example@41058 iut=\"3\"]")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := digitalocean.NewDatabaseLogsinkRsyslog(ctx, "example-custom", &digitalocean.DatabaseLogsinkRsyslogArgs{
    			ClusterId:      pulumi.Any(postgres_example.Id),
    			Name:           pulumi.String("rsyslog-custom"),
    			Server:         pulumi.String("192.0.2.10"),
    			Port:           pulumi.Int(514),
    			Format:         pulumi.String("custom"),
    			Logline:        pulumi.String("<%pri%>%timestamp:::date-rfc3339% %HOSTNAME% %app-name% %msg%"),
    			StructuredData: pulumi.String("[example@41058 iut=\"3\"]"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var example_custom = new DigitalOcean.DatabaseLogsinkRsyslog("example-custom", new()
        {
            ClusterId = postgres_example.Id,
            Name = "rsyslog-custom",
            Server = "192.0.2.10",
            Port = 514,
            Format = "custom",
            Logline = "<%pri%>%timestamp:::date-rfc3339% %HOSTNAME% %app-name% %msg%",
            StructuredData = "[example@41058 iut=\"3\"]",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.digitalocean.DatabaseLogsinkRsyslog;
    import com.pulumi.digitalocean.DatabaseLogsinkRsyslogArgs;
    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) {
            var example_custom = new DatabaseLogsinkRsyslog("example-custom", DatabaseLogsinkRsyslogArgs.builder()
                .clusterId(postgres_example.id())
                .name("rsyslog-custom")
                .server("192.0.2.10")
                .port(514)
                .format("custom")
                .logline("<%pri%>%timestamp:::date-rfc3339% %HOSTNAME% %app-name% %msg%")
                .structuredData("[example@41058 iut=\"3\"]")
                .build());
    
        }
    }
    
    resources:
      example-custom:
        type: digitalocean:DatabaseLogsinkRsyslog
        properties:
          clusterId: ${["postgres-example"].id}
          name: rsyslog-custom
          server: 192.0.2.10
          port: 514
          format: custom
          logline: <%pri%>%timestamp:::date-rfc3339% %HOSTNAME% %app-name% %msg%
          structuredData: '[example@41058 iut="3"]'
    

    Create DatabaseLogsinkRsyslog Resource

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

    Constructor syntax

    new DatabaseLogsinkRsyslog(name: string, args: DatabaseLogsinkRsyslogArgs, opts?: CustomResourceOptions);
    @overload
    def DatabaseLogsinkRsyslog(resource_name: str,
                               args: DatabaseLogsinkRsyslogArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def DatabaseLogsinkRsyslog(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               cluster_id: Optional[str] = None,
                               port: Optional[int] = None,
                               server: Optional[str] = None,
                               ca_cert: Optional[str] = None,
                               client_cert: Optional[str] = None,
                               client_key: Optional[str] = None,
                               format: Optional[str] = None,
                               logline: Optional[str] = None,
                               name: Optional[str] = None,
                               structured_data: Optional[str] = None,
                               tls: Optional[bool] = None)
    func NewDatabaseLogsinkRsyslog(ctx *Context, name string, args DatabaseLogsinkRsyslogArgs, opts ...ResourceOption) (*DatabaseLogsinkRsyslog, error)
    public DatabaseLogsinkRsyslog(string name, DatabaseLogsinkRsyslogArgs args, CustomResourceOptions? opts = null)
    public DatabaseLogsinkRsyslog(String name, DatabaseLogsinkRsyslogArgs args)
    public DatabaseLogsinkRsyslog(String name, DatabaseLogsinkRsyslogArgs args, CustomResourceOptions options)
    
    type: digitalocean:DatabaseLogsinkRsyslog
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DatabaseLogsinkRsyslogArgs
    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 DatabaseLogsinkRsyslogArgs
    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 DatabaseLogsinkRsyslogArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DatabaseLogsinkRsyslogArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DatabaseLogsinkRsyslogArgs
    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 databaseLogsinkRsyslogResource = new DigitalOcean.DatabaseLogsinkRsyslog("databaseLogsinkRsyslogResource", new()
    {
        ClusterId = "string",
        Port = 0,
        Server = "string",
        CaCert = "string",
        ClientCert = "string",
        ClientKey = "string",
        Format = "string",
        Logline = "string",
        Name = "string",
        StructuredData = "string",
        Tls = false,
    });
    
    example, err := digitalocean.NewDatabaseLogsinkRsyslog(ctx, "databaseLogsinkRsyslogResource", &digitalocean.DatabaseLogsinkRsyslogArgs{
    	ClusterId:      pulumi.String("string"),
    	Port:           pulumi.Int(0),
    	Server:         pulumi.String("string"),
    	CaCert:         pulumi.String("string"),
    	ClientCert:     pulumi.String("string"),
    	ClientKey:      pulumi.String("string"),
    	Format:         pulumi.String("string"),
    	Logline:        pulumi.String("string"),
    	Name:           pulumi.String("string"),
    	StructuredData: pulumi.String("string"),
    	Tls:            pulumi.Bool(false),
    })
    
    var databaseLogsinkRsyslogResource = new DatabaseLogsinkRsyslog("databaseLogsinkRsyslogResource", DatabaseLogsinkRsyslogArgs.builder()
        .clusterId("string")
        .port(0)
        .server("string")
        .caCert("string")
        .clientCert("string")
        .clientKey("string")
        .format("string")
        .logline("string")
        .name("string")
        .structuredData("string")
        .tls(false)
        .build());
    
    database_logsink_rsyslog_resource = digitalocean.DatabaseLogsinkRsyslog("databaseLogsinkRsyslogResource",
        cluster_id="string",
        port=0,
        server="string",
        ca_cert="string",
        client_cert="string",
        client_key="string",
        format="string",
        logline="string",
        name="string",
        structured_data="string",
        tls=False)
    
    const databaseLogsinkRsyslogResource = new digitalocean.DatabaseLogsinkRsyslog("databaseLogsinkRsyslogResource", {
        clusterId: "string",
        port: 0,
        server: "string",
        caCert: "string",
        clientCert: "string",
        clientKey: "string",
        format: "string",
        logline: "string",
        name: "string",
        structuredData: "string",
        tls: false,
    });
    
    type: digitalocean:DatabaseLogsinkRsyslog
    properties:
        caCert: string
        clientCert: string
        clientKey: string
        clusterId: string
        format: string
        logline: string
        name: string
        port: 0
        server: string
        structuredData: string
        tls: false
    

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

    ClusterId string
    UUID of the source database cluster that will forward logs.
    Port int
    Port number for the rsyslog server. Must be between 1 and 65535.
    Server string
    Hostname or IP address of the rsyslog server.
    CaCert string
    CA certificate for TLS verification in PEM format. Can be specified using file() function.
    ClientCert string
    Client certificate for mutual TLS authentication in PEM format. Note: Requires tls to be true.
    ClientKey string
    Client private key for mutual TLS authentication in PEM format. Note: Requires tls to be true. This field is marked as sensitive.
    Format string
    Log format to use. Must be one of rfc5424 (default), rfc3164, or custom.
    Logline string
    Custom logline template. Required when format is set to custom. Supports rsyslog-style templating with the following tokens: %HOSTNAME%, %app-name%, %msg%, %msgid%, %pri%, %procid%, %structured-data%, %timestamp%, and %timestamp:::date-rfc3339%.
    Name string
    Display name for the logsink. Note: This is immutable; changing it will force recreation of the resource.
    StructuredData string
    Content of the structured data block for RFC5424 messages.
    Tls bool
    Enable TLS encryption for the rsyslog connection. Defaults to false. Note: It is highly recommended to enable TLS as log messages may contain sensitive information.
    ClusterId string
    UUID of the source database cluster that will forward logs.
    Port int
    Port number for the rsyslog server. Must be between 1 and 65535.
    Server string
    Hostname or IP address of the rsyslog server.
    CaCert string
    CA certificate for TLS verification in PEM format. Can be specified using file() function.
    ClientCert string
    Client certificate for mutual TLS authentication in PEM format. Note: Requires tls to be true.
    ClientKey string
    Client private key for mutual TLS authentication in PEM format. Note: Requires tls to be true. This field is marked as sensitive.
    Format string
    Log format to use. Must be one of rfc5424 (default), rfc3164, or custom.
    Logline string
    Custom logline template. Required when format is set to custom. Supports rsyslog-style templating with the following tokens: %HOSTNAME%, %app-name%, %msg%, %msgid%, %pri%, %procid%, %structured-data%, %timestamp%, and %timestamp:::date-rfc3339%.
    Name string
    Display name for the logsink. Note: This is immutable; changing it will force recreation of the resource.
    StructuredData string
    Content of the structured data block for RFC5424 messages.
    Tls bool
    Enable TLS encryption for the rsyslog connection. Defaults to false. Note: It is highly recommended to enable TLS as log messages may contain sensitive information.
    clusterId String
    UUID of the source database cluster that will forward logs.
    port Integer
    Port number for the rsyslog server. Must be between 1 and 65535.
    server String
    Hostname or IP address of the rsyslog server.
    caCert String
    CA certificate for TLS verification in PEM format. Can be specified using file() function.
    clientCert String
    Client certificate for mutual TLS authentication in PEM format. Note: Requires tls to be true.
    clientKey String
    Client private key for mutual TLS authentication in PEM format. Note: Requires tls to be true. This field is marked as sensitive.
    format String
    Log format to use. Must be one of rfc5424 (default), rfc3164, or custom.
    logline String
    Custom logline template. Required when format is set to custom. Supports rsyslog-style templating with the following tokens: %HOSTNAME%, %app-name%, %msg%, %msgid%, %pri%, %procid%, %structured-data%, %timestamp%, and %timestamp:::date-rfc3339%.
    name String
    Display name for the logsink. Note: This is immutable; changing it will force recreation of the resource.
    structuredData String
    Content of the structured data block for RFC5424 messages.
    tls Boolean
    Enable TLS encryption for the rsyslog connection. Defaults to false. Note: It is highly recommended to enable TLS as log messages may contain sensitive information.
    clusterId string
    UUID of the source database cluster that will forward logs.
    port number
    Port number for the rsyslog server. Must be between 1 and 65535.
    server string
    Hostname or IP address of the rsyslog server.
    caCert string
    CA certificate for TLS verification in PEM format. Can be specified using file() function.
    clientCert string
    Client certificate for mutual TLS authentication in PEM format. Note: Requires tls to be true.
    clientKey string
    Client private key for mutual TLS authentication in PEM format. Note: Requires tls to be true. This field is marked as sensitive.
    format string
    Log format to use. Must be one of rfc5424 (default), rfc3164, or custom.
    logline string
    Custom logline template. Required when format is set to custom. Supports rsyslog-style templating with the following tokens: %HOSTNAME%, %app-name%, %msg%, %msgid%, %pri%, %procid%, %structured-data%, %timestamp%, and %timestamp:::date-rfc3339%.
    name string
    Display name for the logsink. Note: This is immutable; changing it will force recreation of the resource.
    structuredData string
    Content of the structured data block for RFC5424 messages.
    tls boolean
    Enable TLS encryption for the rsyslog connection. Defaults to false. Note: It is highly recommended to enable TLS as log messages may contain sensitive information.
    cluster_id str
    UUID of the source database cluster that will forward logs.
    port int
    Port number for the rsyslog server. Must be between 1 and 65535.
    server str
    Hostname or IP address of the rsyslog server.
    ca_cert str
    CA certificate for TLS verification in PEM format. Can be specified using file() function.
    client_cert str
    Client certificate for mutual TLS authentication in PEM format. Note: Requires tls to be true.
    client_key str
    Client private key for mutual TLS authentication in PEM format. Note: Requires tls to be true. This field is marked as sensitive.
    format str
    Log format to use. Must be one of rfc5424 (default), rfc3164, or custom.
    logline str
    Custom logline template. Required when format is set to custom. Supports rsyslog-style templating with the following tokens: %HOSTNAME%, %app-name%, %msg%, %msgid%, %pri%, %procid%, %structured-data%, %timestamp%, and %timestamp:::date-rfc3339%.
    name str
    Display name for the logsink. Note: This is immutable; changing it will force recreation of the resource.
    structured_data str
    Content of the structured data block for RFC5424 messages.
    tls bool
    Enable TLS encryption for the rsyslog connection. Defaults to false. Note: It is highly recommended to enable TLS as log messages may contain sensitive information.
    clusterId String
    UUID of the source database cluster that will forward logs.
    port Number
    Port number for the rsyslog server. Must be between 1 and 65535.
    server String
    Hostname or IP address of the rsyslog server.
    caCert String
    CA certificate for TLS verification in PEM format. Can be specified using file() function.
    clientCert String
    Client certificate for mutual TLS authentication in PEM format. Note: Requires tls to be true.
    clientKey String
    Client private key for mutual TLS authentication in PEM format. Note: Requires tls to be true. This field is marked as sensitive.
    format String
    Log format to use. Must be one of rfc5424 (default), rfc3164, or custom.
    logline String
    Custom logline template. Required when format is set to custom. Supports rsyslog-style templating with the following tokens: %HOSTNAME%, %app-name%, %msg%, %msgid%, %pri%, %procid%, %structured-data%, %timestamp%, and %timestamp:::date-rfc3339%.
    name String
    Display name for the logsink. Note: This is immutable; changing it will force recreation of the resource.
    structuredData String
    Content of the structured data block for RFC5424 messages.
    tls Boolean
    Enable TLS encryption for the rsyslog connection. Defaults to false. Note: It is highly recommended to enable TLS as log messages may contain sensitive information.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    LogsinkId string
    The unique identifier for the logsink as returned by the DigitalOcean API.
    Id string
    The provider-assigned unique ID for this managed resource.
    LogsinkId string
    The unique identifier for the logsink as returned by the DigitalOcean API.
    id String
    The provider-assigned unique ID for this managed resource.
    logsinkId String
    The unique identifier for the logsink as returned by the DigitalOcean API.
    id string
    The provider-assigned unique ID for this managed resource.
    logsinkId string
    The unique identifier for the logsink as returned by the DigitalOcean API.
    id str
    The provider-assigned unique ID for this managed resource.
    logsink_id str
    The unique identifier for the logsink as returned by the DigitalOcean API.
    id String
    The provider-assigned unique ID for this managed resource.
    logsinkId String
    The unique identifier for the logsink as returned by the DigitalOcean API.

    Look up Existing DatabaseLogsinkRsyslog Resource

    Get an existing DatabaseLogsinkRsyslog 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?: DatabaseLogsinkRsyslogState, opts?: CustomResourceOptions): DatabaseLogsinkRsyslog
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ca_cert: Optional[str] = None,
            client_cert: Optional[str] = None,
            client_key: Optional[str] = None,
            cluster_id: Optional[str] = None,
            format: Optional[str] = None,
            logline: Optional[str] = None,
            logsink_id: Optional[str] = None,
            name: Optional[str] = None,
            port: Optional[int] = None,
            server: Optional[str] = None,
            structured_data: Optional[str] = None,
            tls: Optional[bool] = None) -> DatabaseLogsinkRsyslog
    func GetDatabaseLogsinkRsyslog(ctx *Context, name string, id IDInput, state *DatabaseLogsinkRsyslogState, opts ...ResourceOption) (*DatabaseLogsinkRsyslog, error)
    public static DatabaseLogsinkRsyslog Get(string name, Input<string> id, DatabaseLogsinkRsyslogState? state, CustomResourceOptions? opts = null)
    public static DatabaseLogsinkRsyslog get(String name, Output<String> id, DatabaseLogsinkRsyslogState state, CustomResourceOptions options)
    resources:  _:    type: digitalocean:DatabaseLogsinkRsyslog    get:      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:
    CaCert string
    CA certificate for TLS verification in PEM format. Can be specified using file() function.
    ClientCert string
    Client certificate for mutual TLS authentication in PEM format. Note: Requires tls to be true.
    ClientKey string
    Client private key for mutual TLS authentication in PEM format. Note: Requires tls to be true. This field is marked as sensitive.
    ClusterId string
    UUID of the source database cluster that will forward logs.
    Format string
    Log format to use. Must be one of rfc5424 (default), rfc3164, or custom.
    Logline string
    Custom logline template. Required when format is set to custom. Supports rsyslog-style templating with the following tokens: %HOSTNAME%, %app-name%, %msg%, %msgid%, %pri%, %procid%, %structured-data%, %timestamp%, and %timestamp:::date-rfc3339%.
    LogsinkId string
    The unique identifier for the logsink as returned by the DigitalOcean API.
    Name string
    Display name for the logsink. Note: This is immutable; changing it will force recreation of the resource.
    Port int
    Port number for the rsyslog server. Must be between 1 and 65535.
    Server string
    Hostname or IP address of the rsyslog server.
    StructuredData string
    Content of the structured data block for RFC5424 messages.
    Tls bool
    Enable TLS encryption for the rsyslog connection. Defaults to false. Note: It is highly recommended to enable TLS as log messages may contain sensitive information.
    CaCert string
    CA certificate for TLS verification in PEM format. Can be specified using file() function.
    ClientCert string
    Client certificate for mutual TLS authentication in PEM format. Note: Requires tls to be true.
    ClientKey string
    Client private key for mutual TLS authentication in PEM format. Note: Requires tls to be true. This field is marked as sensitive.
    ClusterId string
    UUID of the source database cluster that will forward logs.
    Format string
    Log format to use. Must be one of rfc5424 (default), rfc3164, or custom.
    Logline string
    Custom logline template. Required when format is set to custom. Supports rsyslog-style templating with the following tokens: %HOSTNAME%, %app-name%, %msg%, %msgid%, %pri%, %procid%, %structured-data%, %timestamp%, and %timestamp:::date-rfc3339%.
    LogsinkId string
    The unique identifier for the logsink as returned by the DigitalOcean API.
    Name string
    Display name for the logsink. Note: This is immutable; changing it will force recreation of the resource.
    Port int
    Port number for the rsyslog server. Must be between 1 and 65535.
    Server string
    Hostname or IP address of the rsyslog server.
    StructuredData string
    Content of the structured data block for RFC5424 messages.
    Tls bool
    Enable TLS encryption for the rsyslog connection. Defaults to false. Note: It is highly recommended to enable TLS as log messages may contain sensitive information.
    caCert String
    CA certificate for TLS verification in PEM format. Can be specified using file() function.
    clientCert String
    Client certificate for mutual TLS authentication in PEM format. Note: Requires tls to be true.
    clientKey String
    Client private key for mutual TLS authentication in PEM format. Note: Requires tls to be true. This field is marked as sensitive.
    clusterId String
    UUID of the source database cluster that will forward logs.
    format String
    Log format to use. Must be one of rfc5424 (default), rfc3164, or custom.
    logline String
    Custom logline template. Required when format is set to custom. Supports rsyslog-style templating with the following tokens: %HOSTNAME%, %app-name%, %msg%, %msgid%, %pri%, %procid%, %structured-data%, %timestamp%, and %timestamp:::date-rfc3339%.
    logsinkId String
    The unique identifier for the logsink as returned by the DigitalOcean API.
    name String
    Display name for the logsink. Note: This is immutable; changing it will force recreation of the resource.
    port Integer
    Port number for the rsyslog server. Must be between 1 and 65535.
    server String
    Hostname or IP address of the rsyslog server.
    structuredData String
    Content of the structured data block for RFC5424 messages.
    tls Boolean
    Enable TLS encryption for the rsyslog connection. Defaults to false. Note: It is highly recommended to enable TLS as log messages may contain sensitive information.
    caCert string
    CA certificate for TLS verification in PEM format. Can be specified using file() function.
    clientCert string
    Client certificate for mutual TLS authentication in PEM format. Note: Requires tls to be true.
    clientKey string
    Client private key for mutual TLS authentication in PEM format. Note: Requires tls to be true. This field is marked as sensitive.
    clusterId string
    UUID of the source database cluster that will forward logs.
    format string
    Log format to use. Must be one of rfc5424 (default), rfc3164, or custom.
    logline string
    Custom logline template. Required when format is set to custom. Supports rsyslog-style templating with the following tokens: %HOSTNAME%, %app-name%, %msg%, %msgid%, %pri%, %procid%, %structured-data%, %timestamp%, and %timestamp:::date-rfc3339%.
    logsinkId string
    The unique identifier for the logsink as returned by the DigitalOcean API.
    name string
    Display name for the logsink. Note: This is immutable; changing it will force recreation of the resource.
    port number
    Port number for the rsyslog server. Must be between 1 and 65535.
    server string
    Hostname or IP address of the rsyslog server.
    structuredData string
    Content of the structured data block for RFC5424 messages.
    tls boolean
    Enable TLS encryption for the rsyslog connection. Defaults to false. Note: It is highly recommended to enable TLS as log messages may contain sensitive information.
    ca_cert str
    CA certificate for TLS verification in PEM format. Can be specified using file() function.
    client_cert str
    Client certificate for mutual TLS authentication in PEM format. Note: Requires tls to be true.
    client_key str
    Client private key for mutual TLS authentication in PEM format. Note: Requires tls to be true. This field is marked as sensitive.
    cluster_id str
    UUID of the source database cluster that will forward logs.
    format str
    Log format to use. Must be one of rfc5424 (default), rfc3164, or custom.
    logline str
    Custom logline template. Required when format is set to custom. Supports rsyslog-style templating with the following tokens: %HOSTNAME%, %app-name%, %msg%, %msgid%, %pri%, %procid%, %structured-data%, %timestamp%, and %timestamp:::date-rfc3339%.
    logsink_id str
    The unique identifier for the logsink as returned by the DigitalOcean API.
    name str
    Display name for the logsink. Note: This is immutable; changing it will force recreation of the resource.
    port int
    Port number for the rsyslog server. Must be between 1 and 65535.
    server str
    Hostname or IP address of the rsyslog server.
    structured_data str
    Content of the structured data block for RFC5424 messages.
    tls bool
    Enable TLS encryption for the rsyslog connection. Defaults to false. Note: It is highly recommended to enable TLS as log messages may contain sensitive information.
    caCert String
    CA certificate for TLS verification in PEM format. Can be specified using file() function.
    clientCert String
    Client certificate for mutual TLS authentication in PEM format. Note: Requires tls to be true.
    clientKey String
    Client private key for mutual TLS authentication in PEM format. Note: Requires tls to be true. This field is marked as sensitive.
    clusterId String
    UUID of the source database cluster that will forward logs.
    format String
    Log format to use. Must be one of rfc5424 (default), rfc3164, or custom.
    logline String
    Custom logline template. Required when format is set to custom. Supports rsyslog-style templating with the following tokens: %HOSTNAME%, %app-name%, %msg%, %msgid%, %pri%, %procid%, %structured-data%, %timestamp%, and %timestamp:::date-rfc3339%.
    logsinkId String
    The unique identifier for the logsink as returned by the DigitalOcean API.
    name String
    Display name for the logsink. Note: This is immutable; changing it will force recreation of the resource.
    port Number
    Port number for the rsyslog server. Must be between 1 and 65535.
    server String
    Hostname or IP address of the rsyslog server.
    structuredData String
    Content of the structured data block for RFC5424 messages.
    tls Boolean
    Enable TLS encryption for the rsyslog connection. Defaults to false. Note: It is highly recommended to enable TLS as log messages may contain sensitive information.

    Import

    Database logsink rsyslog resources can be imported using the composite ID format cluster_id,logsink_id. For example:

    $ pulumi import digitalocean:index/databaseLogsinkRsyslog:DatabaseLogsinkRsyslog example 245bcfd0-7f31-4ce6-a2bc-475a116cca97,f38db7c8-1f31-4ce6-a2bc-475a116cca97
    

    Note: The cluster ID and logsink ID must be separated by a comma.

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

    Package Details

    Repository
    DigitalOcean pulumi/pulumi-digitalocean
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the digitalocean Terraform Provider.
    digitalocean logo
    DigitalOcean v4.56.0 published on Monday, Dec 22, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate