1. Packages
  2. Packages
  3. Timescale Provider
  4. API Docs
  5. ConnectorSrcPostgres
Viewing docs for timescale 2.12.1
published on Thursday, May 7, 2026 by timescale
Viewing docs for timescale 2.12.1
published on Thursday, May 7, 2026 by timescale

    Manages a PostgreSQL source connector for logical replication from an external PostgreSQL database into a Timescale Cloud service.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as timescale from "@pulumi/timescale";
    
    const config = new pulumi.Config();
    const tsProjectId = config.require("tsProjectId");
    const tsAccessKey = config.require("tsAccessKey");
    const tsSecretKey = config.require("tsSecretKey");
    // Create the target service to replicate data into
    const example = new timescale.Service("example", {
        name: "postgres-connector-service",
        milliCpu: 1000,
        memoryGb: 4,
        regionCode: "us-east-1",
    });
    const exampleConnectorSrcPostgres = new timescale.ConnectorSrcPostgres("example", {
        serviceId: example.id,
        displayName: "my-postgres-connector",
        name: "my-postgres-source",
        connectionString: "postgresql://user:password@source-host:5432/mydb",
        tableSyncWorkers: 4,
        enabled: true,
        tables: [{
            schemaName: "public",
            tableName: "events",
            hypertableSpec: {
                primaryDimension: {
                    columnName: "created_at",
                    partitionInterval: "7d",
                },
            },
        }],
    });
    
    import pulumi
    import pulumi_timescale as timescale
    
    config = pulumi.Config()
    ts_project_id = config.require("tsProjectId")
    ts_access_key = config.require("tsAccessKey")
    ts_secret_key = config.require("tsSecretKey")
    # Create the target service to replicate data into
    example = timescale.Service("example",
        name="postgres-connector-service",
        milli_cpu=1000,
        memory_gb=4,
        region_code="us-east-1")
    example_connector_src_postgres = timescale.ConnectorSrcPostgres("example",
        service_id=example.id,
        display_name="my-postgres-connector",
        name="my-postgres-source",
        connection_string="postgresql://user:password@source-host:5432/mydb",
        table_sync_workers=4,
        enabled=True,
        tables=[{
            "schema_name": "public",
            "table_name": "events",
            "hypertable_spec": {
                "primary_dimension": {
                    "column_name": "created_at",
                    "partition_interval": "7d",
                },
            },
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/timescale/v2/timescale"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		tsProjectId := cfg.Require("tsProjectId")
    		tsAccessKey := cfg.Require("tsAccessKey")
    		tsSecretKey := cfg.Require("tsSecretKey")
    		// Create the target service to replicate data into
    		example, err := timescale.NewService(ctx, "example", &timescale.ServiceArgs{
    			Name:       pulumi.String("postgres-connector-service"),
    			MilliCpu:   pulumi.Float64(1000),
    			MemoryGb:   pulumi.Float64(4),
    			RegionCode: pulumi.String("us-east-1"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = timescale.NewConnectorSrcPostgres(ctx, "example", &timescale.ConnectorSrcPostgresArgs{
    			ServiceId:        example.ID(),
    			DisplayName:      pulumi.String("my-postgres-connector"),
    			Name:             pulumi.String("my-postgres-source"),
    			ConnectionString: pulumi.String("postgresql://user:password@source-host:5432/mydb"),
    			TableSyncWorkers: pulumi.Float64(4),
    			Enabled:          pulumi.Bool(true),
    			Tables: timescale.ConnectorSrcPostgresTableArray{
    				&timescale.ConnectorSrcPostgresTableArgs{
    					SchemaName: pulumi.String("public"),
    					TableName:  pulumi.String("events"),
    					HypertableSpec: &timescale.ConnectorSrcPostgresTableHypertableSpecArgs{
    						PrimaryDimension: &timescale.ConnectorSrcPostgresTableHypertableSpecPrimaryDimensionArgs{
    							ColumnName:        pulumi.String("created_at"),
    							PartitionInterval: pulumi.String("7d"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Timescale = Pulumi.Timescale;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var tsProjectId = config.Require("tsProjectId");
        var tsAccessKey = config.Require("tsAccessKey");
        var tsSecretKey = config.Require("tsSecretKey");
        // Create the target service to replicate data into
        var example = new Timescale.Service("example", new()
        {
            Name = "postgres-connector-service",
            MilliCpu = 1000,
            MemoryGb = 4,
            RegionCode = "us-east-1",
        });
    
        var exampleConnectorSrcPostgres = new Timescale.ConnectorSrcPostgres("example", new()
        {
            ServiceId = example.Id,
            DisplayName = "my-postgres-connector",
            Name = "my-postgres-source",
            ConnectionString = "postgresql://user:password@source-host:5432/mydb",
            TableSyncWorkers = 4,
            Enabled = true,
            Tables = new[]
            {
                new Timescale.Inputs.ConnectorSrcPostgresTableArgs
                {
                    SchemaName = "public",
                    TableName = "events",
                    HypertableSpec = new Timescale.Inputs.ConnectorSrcPostgresTableHypertableSpecArgs
                    {
                        PrimaryDimension = new Timescale.Inputs.ConnectorSrcPostgresTableHypertableSpecPrimaryDimensionArgs
                        {
                            ColumnName = "created_at",
                            PartitionInterval = "7d",
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.timescale.Service;
    import com.pulumi.timescale.ServiceArgs;
    import com.pulumi.timescale.ConnectorSrcPostgres;
    import com.pulumi.timescale.ConnectorSrcPostgresArgs;
    import com.pulumi.timescale.inputs.ConnectorSrcPostgresTableArgs;
    import com.pulumi.timescale.inputs.ConnectorSrcPostgresTableHypertableSpecArgs;
    import com.pulumi.timescale.inputs.ConnectorSrcPostgresTableHypertableSpecPrimaryDimensionArgs;
    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 config = ctx.config();
            final var tsProjectId = config.get("tsProjectId");
            final var tsAccessKey = config.get("tsAccessKey");
            final var tsSecretKey = config.get("tsSecretKey");
            // Create the target service to replicate data into
            var example = new Service("example", ServiceArgs.builder()
                .name("postgres-connector-service")
                .milliCpu(1000.0)
                .memoryGb(4.0)
                .regionCode("us-east-1")
                .build());
    
            var exampleConnectorSrcPostgres = new ConnectorSrcPostgres("exampleConnectorSrcPostgres", ConnectorSrcPostgresArgs.builder()
                .serviceId(example.id())
                .displayName("my-postgres-connector")
                .name("my-postgres-source")
                .connectionString("postgresql://user:password@source-host:5432/mydb")
                .tableSyncWorkers(4.0)
                .enabled(true)
                .tables(ConnectorSrcPostgresTableArgs.builder()
                    .schemaName("public")
                    .tableName("events")
                    .hypertableSpec(ConnectorSrcPostgresTableHypertableSpecArgs.builder()
                        .primaryDimension(ConnectorSrcPostgresTableHypertableSpecPrimaryDimensionArgs.builder()
                            .columnName("created_at")
                            .partitionInterval("7d")
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    configuration:
      tsProjectId:
        type: string
      tsAccessKey:
        type: string
      tsSecretKey:
        type: string
    resources:
      # Create the target service to replicate data into
      example:
        type: timescale:Service
        properties:
          name: postgres-connector-service
          milliCpu: 1000
          memoryGb: 4
          regionCode: us-east-1
      exampleConnectorSrcPostgres:
        type: timescale:ConnectorSrcPostgres
        name: example
        properties:
          serviceId: ${example.id}
          displayName: my-postgres-connector
          name: my-postgres-source
          connectionString: postgresql://user:password@source-host:5432/mydb
          tableSyncWorkers: 4
          enabled: true
          tables:
            - schemaName: public
              tableName: events
              hypertableSpec:
                primaryDimension:
                  columnName: created_at
                  partitionInterval: 7d
    

    Create ConnectorSrcPostgres Resource

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

    Constructor syntax

    new ConnectorSrcPostgres(name: string, args: ConnectorSrcPostgresArgs, opts?: CustomResourceOptions);
    @overload
    def ConnectorSrcPostgres(resource_name: str,
                             args: ConnectorSrcPostgresArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def ConnectorSrcPostgres(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             connection_string: Optional[str] = None,
                             display_name: Optional[str] = None,
                             service_id: Optional[str] = None,
                             enabled: Optional[bool] = None,
                             name: Optional[str] = None,
                             ssh_tunnel: Optional[ConnectorSrcPostgresSshTunnelArgs] = None,
                             table_sync_workers: Optional[float] = None,
                             tables: Optional[Sequence[ConnectorSrcPostgresTableArgs]] = None)
    func NewConnectorSrcPostgres(ctx *Context, name string, args ConnectorSrcPostgresArgs, opts ...ResourceOption) (*ConnectorSrcPostgres, error)
    public ConnectorSrcPostgres(string name, ConnectorSrcPostgresArgs args, CustomResourceOptions? opts = null)
    public ConnectorSrcPostgres(String name, ConnectorSrcPostgresArgs args)
    public ConnectorSrcPostgres(String name, ConnectorSrcPostgresArgs args, CustomResourceOptions options)
    
    type: timescale:ConnectorSrcPostgres
    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 ConnectorSrcPostgresArgs
    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 ConnectorSrcPostgresArgs
    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 ConnectorSrcPostgresArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConnectorSrcPostgresArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConnectorSrcPostgresArgs
    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 connectorSrcPostgresResource = new Timescale.ConnectorSrcPostgres("connectorSrcPostgresResource", new()
    {
        ConnectionString = "string",
        DisplayName = "string",
        ServiceId = "string",
        Enabled = false,
        Name = "string",
        SshTunnel = new Timescale.Inputs.ConnectorSrcPostgresSshTunnelArgs
        {
            Name = "string",
            Host = "string",
            Port = 0,
            PublicKey = "string",
            SshTunnelId = "string",
            Username = "string",
        },
        TableSyncWorkers = 0,
        Tables = new[]
        {
            new Timescale.Inputs.ConnectorSrcPostgresTableArgs
            {
                SchemaName = "string",
                TableName = "string",
                HypertableSpec = new Timescale.Inputs.ConnectorSrcPostgresTableHypertableSpecArgs
                {
                    PrimaryDimension = new Timescale.Inputs.ConnectorSrcPostgresTableHypertableSpecPrimaryDimensionArgs
                    {
                        ColumnName = "string",
                        PartitionInterval = "string",
                    },
                    SecondaryDimensions = new[]
                    {
                        new Timescale.Inputs.ConnectorSrcPostgresTableHypertableSpecSecondaryDimensionArgs
                        {
                            Hash = new Timescale.Inputs.ConnectorSrcPostgresTableHypertableSpecSecondaryDimensionHashArgs
                            {
                                ColumnName = "string",
                                NumberPartitions = 0,
                            },
                            Range = new Timescale.Inputs.ConnectorSrcPostgresTableHypertableSpecSecondaryDimensionRangeArgs
                            {
                                ColumnName = "string",
                                PartitionInterval = "string",
                            },
                        },
                    },
                },
                PublicationName = "string",
                TableMapping = new Timescale.Inputs.ConnectorSrcPostgresTableTableMappingArgs
                {
                    SchemaName = "string",
                    TableName = "string",
                },
            },
        },
    });
    
    example, err := timescale.NewConnectorSrcPostgres(ctx, "connectorSrcPostgresResource", &timescale.ConnectorSrcPostgresArgs{
    	ConnectionString: pulumi.String("string"),
    	DisplayName:      pulumi.String("string"),
    	ServiceId:        pulumi.String("string"),
    	Enabled:          pulumi.Bool(false),
    	Name:             pulumi.String("string"),
    	SshTunnel: &timescale.ConnectorSrcPostgresSshTunnelArgs{
    		Name:        pulumi.String("string"),
    		Host:        pulumi.String("string"),
    		Port:        pulumi.Float64(0),
    		PublicKey:   pulumi.String("string"),
    		SshTunnelId: pulumi.String("string"),
    		Username:    pulumi.String("string"),
    	},
    	TableSyncWorkers: pulumi.Float64(0),
    	Tables: timescale.ConnectorSrcPostgresTableArray{
    		&timescale.ConnectorSrcPostgresTableArgs{
    			SchemaName: pulumi.String("string"),
    			TableName:  pulumi.String("string"),
    			HypertableSpec: &timescale.ConnectorSrcPostgresTableHypertableSpecArgs{
    				PrimaryDimension: &timescale.ConnectorSrcPostgresTableHypertableSpecPrimaryDimensionArgs{
    					ColumnName:        pulumi.String("string"),
    					PartitionInterval: pulumi.String("string"),
    				},
    				SecondaryDimensions: timescale.ConnectorSrcPostgresTableHypertableSpecSecondaryDimensionArray{
    					&timescale.ConnectorSrcPostgresTableHypertableSpecSecondaryDimensionArgs{
    						Hash: &timescale.ConnectorSrcPostgresTableHypertableSpecSecondaryDimensionHashArgs{
    							ColumnName:       pulumi.String("string"),
    							NumberPartitions: pulumi.Float64(0),
    						},
    						Range: &timescale.ConnectorSrcPostgresTableHypertableSpecSecondaryDimensionRangeArgs{
    							ColumnName:        pulumi.String("string"),
    							PartitionInterval: pulumi.String("string"),
    						},
    					},
    				},
    			},
    			PublicationName: pulumi.String("string"),
    			TableMapping: &timescale.ConnectorSrcPostgresTableTableMappingArgs{
    				SchemaName: pulumi.String("string"),
    				TableName:  pulumi.String("string"),
    			},
    		},
    	},
    })
    
    var connectorSrcPostgresResource = new ConnectorSrcPostgres("connectorSrcPostgresResource", ConnectorSrcPostgresArgs.builder()
        .connectionString("string")
        .displayName("string")
        .serviceId("string")
        .enabled(false)
        .name("string")
        .sshTunnel(ConnectorSrcPostgresSshTunnelArgs.builder()
            .name("string")
            .host("string")
            .port(0.0)
            .publicKey("string")
            .sshTunnelId("string")
            .username("string")
            .build())
        .tableSyncWorkers(0.0)
        .tables(ConnectorSrcPostgresTableArgs.builder()
            .schemaName("string")
            .tableName("string")
            .hypertableSpec(ConnectorSrcPostgresTableHypertableSpecArgs.builder()
                .primaryDimension(ConnectorSrcPostgresTableHypertableSpecPrimaryDimensionArgs.builder()
                    .columnName("string")
                    .partitionInterval("string")
                    .build())
                .secondaryDimensions(ConnectorSrcPostgresTableHypertableSpecSecondaryDimensionArgs.builder()
                    .hash(ConnectorSrcPostgresTableHypertableSpecSecondaryDimensionHashArgs.builder()
                        .columnName("string")
                        .numberPartitions(0.0)
                        .build())
                    .range(ConnectorSrcPostgresTableHypertableSpecSecondaryDimensionRangeArgs.builder()
                        .columnName("string")
                        .partitionInterval("string")
                        .build())
                    .build())
                .build())
            .publicationName("string")
            .tableMapping(ConnectorSrcPostgresTableTableMappingArgs.builder()
                .schemaName("string")
                .tableName("string")
                .build())
            .build())
        .build());
    
    connector_src_postgres_resource = timescale.ConnectorSrcPostgres("connectorSrcPostgresResource",
        connection_string="string",
        display_name="string",
        service_id="string",
        enabled=False,
        name="string",
        ssh_tunnel={
            "name": "string",
            "host": "string",
            "port": float(0),
            "public_key": "string",
            "ssh_tunnel_id": "string",
            "username": "string",
        },
        table_sync_workers=float(0),
        tables=[{
            "schema_name": "string",
            "table_name": "string",
            "hypertable_spec": {
                "primary_dimension": {
                    "column_name": "string",
                    "partition_interval": "string",
                },
                "secondary_dimensions": [{
                    "hash": {
                        "column_name": "string",
                        "number_partitions": float(0),
                    },
                    "range": {
                        "column_name": "string",
                        "partition_interval": "string",
                    },
                }],
            },
            "publication_name": "string",
            "table_mapping": {
                "schema_name": "string",
                "table_name": "string",
            },
        }])
    
    const connectorSrcPostgresResource = new timescale.ConnectorSrcPostgres("connectorSrcPostgresResource", {
        connectionString: "string",
        displayName: "string",
        serviceId: "string",
        enabled: false,
        name: "string",
        sshTunnel: {
            name: "string",
            host: "string",
            port: 0,
            publicKey: "string",
            sshTunnelId: "string",
            username: "string",
        },
        tableSyncWorkers: 0,
        tables: [{
            schemaName: "string",
            tableName: "string",
            hypertableSpec: {
                primaryDimension: {
                    columnName: "string",
                    partitionInterval: "string",
                },
                secondaryDimensions: [{
                    hash: {
                        columnName: "string",
                        numberPartitions: 0,
                    },
                    range: {
                        columnName: "string",
                        partitionInterval: "string",
                    },
                }],
            },
            publicationName: "string",
            tableMapping: {
                schemaName: "string",
                tableName: "string",
            },
        }],
    });
    
    type: timescale:ConnectorSrcPostgres
    properties:
        connectionString: string
        displayName: string
        enabled: false
        name: string
        serviceId: string
        sshTunnel:
            host: string
            name: string
            port: 0
            publicKey: string
            sshTunnelId: string
            username: string
        tableSyncWorkers: 0
        tables:
            - hypertableSpec:
                primaryDimension:
                    columnName: string
                    partitionInterval: string
                secondaryDimensions:
                    - hash:
                        columnName: string
                        numberPartitions: 0
                      range:
                        columnName: string
                        partitionInterval: string
              publicationName: string
              schemaName: string
              tableMapping:
                schemaName: string
                tableName: string
              tableName: string
    

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

    ConnectionString string
    PostgreSQL connection string for the source database (e.g. postgresql://user:password@host:5432/dbname).
    DisplayName string
    Human-readable display name for the connector.
    ServiceId string
    The Timescale Cloud service ID to replicate data into.
    Enabled bool
    Whether the connector is enabled (default: true).
    Name string
    Name for the source configuration.
    SshTunnel ConnectorSrcPostgresSshTunnel
    Optional SSH tunnel configuration for connecting to the source database through a bastion host.
    TableSyncWorkers double
    Number of parallel workers for table synchronization (default: 4).
    Tables List<ConnectorSrcPostgresTable>
    Tables to replicate from the source database. If a table does not exist on the target service, the connector creates it automatically. Table configurations (table_mapping, publication_name) are immutable once added — changing them causes the provider to automatically drop the table from the connector and re-add it with the new configuration. The actual table in the target database is not dropped. Warning: re-adding a table triggers a full re-sync of all the table's data.
    ConnectionString string
    PostgreSQL connection string for the source database (e.g. postgresql://user:password@host:5432/dbname).
    DisplayName string
    Human-readable display name for the connector.
    ServiceId string
    The Timescale Cloud service ID to replicate data into.
    Enabled bool
    Whether the connector is enabled (default: true).
    Name string
    Name for the source configuration.
    SshTunnel ConnectorSrcPostgresSshTunnelArgs
    Optional SSH tunnel configuration for connecting to the source database through a bastion host.
    TableSyncWorkers float64
    Number of parallel workers for table synchronization (default: 4).
    Tables []ConnectorSrcPostgresTableArgs
    Tables to replicate from the source database. If a table does not exist on the target service, the connector creates it automatically. Table configurations (table_mapping, publication_name) are immutable once added — changing them causes the provider to automatically drop the table from the connector and re-add it with the new configuration. The actual table in the target database is not dropped. Warning: re-adding a table triggers a full re-sync of all the table's data.
    connectionString String
    PostgreSQL connection string for the source database (e.g. postgresql://user:password@host:5432/dbname).
    displayName String
    Human-readable display name for the connector.
    serviceId String
    The Timescale Cloud service ID to replicate data into.
    enabled Boolean
    Whether the connector is enabled (default: true).
    name String
    Name for the source configuration.
    sshTunnel ConnectorSrcPostgresSshTunnel
    Optional SSH tunnel configuration for connecting to the source database through a bastion host.
    tableSyncWorkers Double
    Number of parallel workers for table synchronization (default: 4).
    tables List<ConnectorSrcPostgresTable>
    Tables to replicate from the source database. If a table does not exist on the target service, the connector creates it automatically. Table configurations (table_mapping, publication_name) are immutable once added — changing them causes the provider to automatically drop the table from the connector and re-add it with the new configuration. The actual table in the target database is not dropped. Warning: re-adding a table triggers a full re-sync of all the table's data.
    connectionString string
    PostgreSQL connection string for the source database (e.g. postgresql://user:password@host:5432/dbname).
    displayName string
    Human-readable display name for the connector.
    serviceId string
    The Timescale Cloud service ID to replicate data into.
    enabled boolean
    Whether the connector is enabled (default: true).
    name string
    Name for the source configuration.
    sshTunnel ConnectorSrcPostgresSshTunnel
    Optional SSH tunnel configuration for connecting to the source database through a bastion host.
    tableSyncWorkers number
    Number of parallel workers for table synchronization (default: 4).
    tables ConnectorSrcPostgresTable[]
    Tables to replicate from the source database. If a table does not exist on the target service, the connector creates it automatically. Table configurations (table_mapping, publication_name) are immutable once added — changing them causes the provider to automatically drop the table from the connector and re-add it with the new configuration. The actual table in the target database is not dropped. Warning: re-adding a table triggers a full re-sync of all the table's data.
    connection_string str
    PostgreSQL connection string for the source database (e.g. postgresql://user:password@host:5432/dbname).
    display_name str
    Human-readable display name for the connector.
    service_id str
    The Timescale Cloud service ID to replicate data into.
    enabled bool
    Whether the connector is enabled (default: true).
    name str
    Name for the source configuration.
    ssh_tunnel ConnectorSrcPostgresSshTunnelArgs
    Optional SSH tunnel configuration for connecting to the source database through a bastion host.
    table_sync_workers float
    Number of parallel workers for table synchronization (default: 4).
    tables Sequence[ConnectorSrcPostgresTableArgs]
    Tables to replicate from the source database. If a table does not exist on the target service, the connector creates it automatically. Table configurations (table_mapping, publication_name) are immutable once added — changing them causes the provider to automatically drop the table from the connector and re-add it with the new configuration. The actual table in the target database is not dropped. Warning: re-adding a table triggers a full re-sync of all the table's data.
    connectionString String
    PostgreSQL connection string for the source database (e.g. postgresql://user:password@host:5432/dbname).
    displayName String
    Human-readable display name for the connector.
    serviceId String
    The Timescale Cloud service ID to replicate data into.
    enabled Boolean
    Whether the connector is enabled (default: true).
    name String
    Name for the source configuration.
    sshTunnel Property Map
    Optional SSH tunnel configuration for connecting to the source database through a bastion host.
    tableSyncWorkers Number
    Number of parallel workers for table synchronization (default: 4).
    tables List<Property Map>
    Tables to replicate from the source database. If a table does not exist on the target service, the connector creates it automatically. Table configurations (table_mapping, publication_name) are immutable once added — changing them causes the provider to automatically drop the table from the connector and re-add it with the new configuration. The actual table in the target database is not dropped. Warning: re-adding a table triggers a full re-sync of all the table's data.

    Outputs

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

    CreatedAt string
    Timestamp when the connector was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    SourceId string
    Unique identifier for the source configuration.
    Status string
    Current connector status (ok, warning, error, paused).
    CreatedAt string
    Timestamp when the connector was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    SourceId string
    Unique identifier for the source configuration.
    Status string
    Current connector status (ok, warning, error, paused).
    createdAt String
    Timestamp when the connector was created.
    id String
    The provider-assigned unique ID for this managed resource.
    sourceId String
    Unique identifier for the source configuration.
    status String
    Current connector status (ok, warning, error, paused).
    createdAt string
    Timestamp when the connector was created.
    id string
    The provider-assigned unique ID for this managed resource.
    sourceId string
    Unique identifier for the source configuration.
    status string
    Current connector status (ok, warning, error, paused).
    created_at str
    Timestamp when the connector was created.
    id str
    The provider-assigned unique ID for this managed resource.
    source_id str
    Unique identifier for the source configuration.
    status str
    Current connector status (ok, warning, error, paused).
    createdAt String
    Timestamp when the connector was created.
    id String
    The provider-assigned unique ID for this managed resource.
    sourceId String
    Unique identifier for the source configuration.
    status String
    Current connector status (ok, warning, error, paused).

    Look up Existing ConnectorSrcPostgres Resource

    Get an existing ConnectorSrcPostgres 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?: ConnectorSrcPostgresState, opts?: CustomResourceOptions): ConnectorSrcPostgres
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            connection_string: Optional[str] = None,
            created_at: Optional[str] = None,
            display_name: Optional[str] = None,
            enabled: Optional[bool] = None,
            name: Optional[str] = None,
            service_id: Optional[str] = None,
            source_id: Optional[str] = None,
            ssh_tunnel: Optional[ConnectorSrcPostgresSshTunnelArgs] = None,
            status: Optional[str] = None,
            table_sync_workers: Optional[float] = None,
            tables: Optional[Sequence[ConnectorSrcPostgresTableArgs]] = None) -> ConnectorSrcPostgres
    func GetConnectorSrcPostgres(ctx *Context, name string, id IDInput, state *ConnectorSrcPostgresState, opts ...ResourceOption) (*ConnectorSrcPostgres, error)
    public static ConnectorSrcPostgres Get(string name, Input<string> id, ConnectorSrcPostgresState? state, CustomResourceOptions? opts = null)
    public static ConnectorSrcPostgres get(String name, Output<String> id, ConnectorSrcPostgresState state, CustomResourceOptions options)
    resources:  _:    type: timescale:ConnectorSrcPostgres    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:
    ConnectionString string
    PostgreSQL connection string for the source database (e.g. postgresql://user:password@host:5432/dbname).
    CreatedAt string
    Timestamp when the connector was created.
    DisplayName string
    Human-readable display name for the connector.
    Enabled bool
    Whether the connector is enabled (default: true).
    Name string
    Name for the source configuration.
    ServiceId string
    The Timescale Cloud service ID to replicate data into.
    SourceId string
    Unique identifier for the source configuration.
    SshTunnel ConnectorSrcPostgresSshTunnel
    Optional SSH tunnel configuration for connecting to the source database through a bastion host.
    Status string
    Current connector status (ok, warning, error, paused).
    TableSyncWorkers double
    Number of parallel workers for table synchronization (default: 4).
    Tables List<ConnectorSrcPostgresTable>
    Tables to replicate from the source database. If a table does not exist on the target service, the connector creates it automatically. Table configurations (table_mapping, publication_name) are immutable once added — changing them causes the provider to automatically drop the table from the connector and re-add it with the new configuration. The actual table in the target database is not dropped. Warning: re-adding a table triggers a full re-sync of all the table's data.
    ConnectionString string
    PostgreSQL connection string for the source database (e.g. postgresql://user:password@host:5432/dbname).
    CreatedAt string
    Timestamp when the connector was created.
    DisplayName string
    Human-readable display name for the connector.
    Enabled bool
    Whether the connector is enabled (default: true).
    Name string
    Name for the source configuration.
    ServiceId string
    The Timescale Cloud service ID to replicate data into.
    SourceId string
    Unique identifier for the source configuration.
    SshTunnel ConnectorSrcPostgresSshTunnelArgs
    Optional SSH tunnel configuration for connecting to the source database through a bastion host.
    Status string
    Current connector status (ok, warning, error, paused).
    TableSyncWorkers float64
    Number of parallel workers for table synchronization (default: 4).
    Tables []ConnectorSrcPostgresTableArgs
    Tables to replicate from the source database. If a table does not exist on the target service, the connector creates it automatically. Table configurations (table_mapping, publication_name) are immutable once added — changing them causes the provider to automatically drop the table from the connector and re-add it with the new configuration. The actual table in the target database is not dropped. Warning: re-adding a table triggers a full re-sync of all the table's data.
    connectionString String
    PostgreSQL connection string for the source database (e.g. postgresql://user:password@host:5432/dbname).
    createdAt String
    Timestamp when the connector was created.
    displayName String
    Human-readable display name for the connector.
    enabled Boolean
    Whether the connector is enabled (default: true).
    name String
    Name for the source configuration.
    serviceId String
    The Timescale Cloud service ID to replicate data into.
    sourceId String
    Unique identifier for the source configuration.
    sshTunnel ConnectorSrcPostgresSshTunnel
    Optional SSH tunnel configuration for connecting to the source database through a bastion host.
    status String
    Current connector status (ok, warning, error, paused).
    tableSyncWorkers Double
    Number of parallel workers for table synchronization (default: 4).
    tables List<ConnectorSrcPostgresTable>
    Tables to replicate from the source database. If a table does not exist on the target service, the connector creates it automatically. Table configurations (table_mapping, publication_name) are immutable once added — changing them causes the provider to automatically drop the table from the connector and re-add it with the new configuration. The actual table in the target database is not dropped. Warning: re-adding a table triggers a full re-sync of all the table's data.
    connectionString string
    PostgreSQL connection string for the source database (e.g. postgresql://user:password@host:5432/dbname).
    createdAt string
    Timestamp when the connector was created.
    displayName string
    Human-readable display name for the connector.
    enabled boolean
    Whether the connector is enabled (default: true).
    name string
    Name for the source configuration.
    serviceId string
    The Timescale Cloud service ID to replicate data into.
    sourceId string
    Unique identifier for the source configuration.
    sshTunnel ConnectorSrcPostgresSshTunnel
    Optional SSH tunnel configuration for connecting to the source database through a bastion host.
    status string
    Current connector status (ok, warning, error, paused).
    tableSyncWorkers number
    Number of parallel workers for table synchronization (default: 4).
    tables ConnectorSrcPostgresTable[]
    Tables to replicate from the source database. If a table does not exist on the target service, the connector creates it automatically. Table configurations (table_mapping, publication_name) are immutable once added — changing them causes the provider to automatically drop the table from the connector and re-add it with the new configuration. The actual table in the target database is not dropped. Warning: re-adding a table triggers a full re-sync of all the table's data.
    connection_string str
    PostgreSQL connection string for the source database (e.g. postgresql://user:password@host:5432/dbname).
    created_at str
    Timestamp when the connector was created.
    display_name str
    Human-readable display name for the connector.
    enabled bool
    Whether the connector is enabled (default: true).
    name str
    Name for the source configuration.
    service_id str
    The Timescale Cloud service ID to replicate data into.
    source_id str
    Unique identifier for the source configuration.
    ssh_tunnel ConnectorSrcPostgresSshTunnelArgs
    Optional SSH tunnel configuration for connecting to the source database through a bastion host.
    status str
    Current connector status (ok, warning, error, paused).
    table_sync_workers float
    Number of parallel workers for table synchronization (default: 4).
    tables Sequence[ConnectorSrcPostgresTableArgs]
    Tables to replicate from the source database. If a table does not exist on the target service, the connector creates it automatically. Table configurations (table_mapping, publication_name) are immutable once added — changing them causes the provider to automatically drop the table from the connector and re-add it with the new configuration. The actual table in the target database is not dropped. Warning: re-adding a table triggers a full re-sync of all the table's data.
    connectionString String
    PostgreSQL connection string for the source database (e.g. postgresql://user:password@host:5432/dbname).
    createdAt String
    Timestamp when the connector was created.
    displayName String
    Human-readable display name for the connector.
    enabled Boolean
    Whether the connector is enabled (default: true).
    name String
    Name for the source configuration.
    serviceId String
    The Timescale Cloud service ID to replicate data into.
    sourceId String
    Unique identifier for the source configuration.
    sshTunnel Property Map
    Optional SSH tunnel configuration for connecting to the source database through a bastion host.
    status String
    Current connector status (ok, warning, error, paused).
    tableSyncWorkers Number
    Number of parallel workers for table synchronization (default: 4).
    tables List<Property Map>
    Tables to replicate from the source database. If a table does not exist on the target service, the connector creates it automatically. Table configurations (table_mapping, publication_name) are immutable once added — changing them causes the provider to automatically drop the table from the connector and re-add it with the new configuration. The actual table in the target database is not dropped. Warning: re-adding a table triggers a full re-sync of all the table's data.

    Supporting Types

    ConnectorSrcPostgresSshTunnel, ConnectorSrcPostgresSshTunnelArgs

    Name string
    Name for the SSH tunnel configuration.
    Host string
    SSH host (bastion server) for the tunnel connection.
    Port double
    SSH port for the tunnel connection.
    PublicKey string
    Server-generated public key. Add this to the authorized_keys file on your SSH bastion host.
    SshTunnelId string
    Unique identifier for the SSH tunnel configuration.
    Username string
    SSH username for the tunnel connection.
    Name string
    Name for the SSH tunnel configuration.
    Host string
    SSH host (bastion server) for the tunnel connection.
    Port float64
    SSH port for the tunnel connection.
    PublicKey string
    Server-generated public key. Add this to the authorized_keys file on your SSH bastion host.
    SshTunnelId string
    Unique identifier for the SSH tunnel configuration.
    Username string
    SSH username for the tunnel connection.
    name String
    Name for the SSH tunnel configuration.
    host String
    SSH host (bastion server) for the tunnel connection.
    port Double
    SSH port for the tunnel connection.
    publicKey String
    Server-generated public key. Add this to the authorized_keys file on your SSH bastion host.
    sshTunnelId String
    Unique identifier for the SSH tunnel configuration.
    username String
    SSH username for the tunnel connection.
    name string
    Name for the SSH tunnel configuration.
    host string
    SSH host (bastion server) for the tunnel connection.
    port number
    SSH port for the tunnel connection.
    publicKey string
    Server-generated public key. Add this to the authorized_keys file on your SSH bastion host.
    sshTunnelId string
    Unique identifier for the SSH tunnel configuration.
    username string
    SSH username for the tunnel connection.
    name str
    Name for the SSH tunnel configuration.
    host str
    SSH host (bastion server) for the tunnel connection.
    port float
    SSH port for the tunnel connection.
    public_key str
    Server-generated public key. Add this to the authorized_keys file on your SSH bastion host.
    ssh_tunnel_id str
    Unique identifier for the SSH tunnel configuration.
    username str
    SSH username for the tunnel connection.
    name String
    Name for the SSH tunnel configuration.
    host String
    SSH host (bastion server) for the tunnel connection.
    port Number
    SSH port for the tunnel connection.
    publicKey String
    Server-generated public key. Add this to the authorized_keys file on your SSH bastion host.
    sshTunnelId String
    Unique identifier for the SSH tunnel configuration.
    username String
    SSH username for the tunnel connection.

    ConnectorSrcPostgresTable, ConnectorSrcPostgresTableArgs

    SchemaName string
    Schema name of the source table.
    TableName string
    Name of the source table.
    HypertableSpec ConnectorSrcPostgresTableHypertableSpec
    Optional hypertable configuration for tables that the connector creates on the target. When provided and the target table does not already exist, the connector creates it as a hypertable with the specified dimensions. If the target table already exists, this setting is a no-op. Create-only: this can only be set when adding a new table to the connector and cannot be changed afterward.
    PublicationName string
    Existing PostgreSQL publication name to use for this table. If not provided the connector will create one.
    TableMapping ConnectorSrcPostgresTableTableMapping
    Optional mapping to a different table name on the target service.
    SchemaName string
    Schema name of the source table.
    TableName string
    Name of the source table.
    HypertableSpec ConnectorSrcPostgresTableHypertableSpec
    Optional hypertable configuration for tables that the connector creates on the target. When provided and the target table does not already exist, the connector creates it as a hypertable with the specified dimensions. If the target table already exists, this setting is a no-op. Create-only: this can only be set when adding a new table to the connector and cannot be changed afterward.
    PublicationName string
    Existing PostgreSQL publication name to use for this table. If not provided the connector will create one.
    TableMapping ConnectorSrcPostgresTableTableMapping
    Optional mapping to a different table name on the target service.
    schemaName String
    Schema name of the source table.
    tableName String
    Name of the source table.
    hypertableSpec ConnectorSrcPostgresTableHypertableSpec
    Optional hypertable configuration for tables that the connector creates on the target. When provided and the target table does not already exist, the connector creates it as a hypertable with the specified dimensions. If the target table already exists, this setting is a no-op. Create-only: this can only be set when adding a new table to the connector and cannot be changed afterward.
    publicationName String
    Existing PostgreSQL publication name to use for this table. If not provided the connector will create one.
    tableMapping ConnectorSrcPostgresTableTableMapping
    Optional mapping to a different table name on the target service.
    schemaName string
    Schema name of the source table.
    tableName string
    Name of the source table.
    hypertableSpec ConnectorSrcPostgresTableHypertableSpec
    Optional hypertable configuration for tables that the connector creates on the target. When provided and the target table does not already exist, the connector creates it as a hypertable with the specified dimensions. If the target table already exists, this setting is a no-op. Create-only: this can only be set when adding a new table to the connector and cannot be changed afterward.
    publicationName string
    Existing PostgreSQL publication name to use for this table. If not provided the connector will create one.
    tableMapping ConnectorSrcPostgresTableTableMapping
    Optional mapping to a different table name on the target service.
    schema_name str
    Schema name of the source table.
    table_name str
    Name of the source table.
    hypertable_spec ConnectorSrcPostgresTableHypertableSpec
    Optional hypertable configuration for tables that the connector creates on the target. When provided and the target table does not already exist, the connector creates it as a hypertable with the specified dimensions. If the target table already exists, this setting is a no-op. Create-only: this can only be set when adding a new table to the connector and cannot be changed afterward.
    publication_name str
    Existing PostgreSQL publication name to use for this table. If not provided the connector will create one.
    table_mapping ConnectorSrcPostgresTableTableMapping
    Optional mapping to a different table name on the target service.
    schemaName String
    Schema name of the source table.
    tableName String
    Name of the source table.
    hypertableSpec Property Map
    Optional hypertable configuration for tables that the connector creates on the target. When provided and the target table does not already exist, the connector creates it as a hypertable with the specified dimensions. If the target table already exists, this setting is a no-op. Create-only: this can only be set when adding a new table to the connector and cannot be changed afterward.
    publicationName String
    Existing PostgreSQL publication name to use for this table. If not provided the connector will create one.
    tableMapping Property Map
    Optional mapping to a different table name on the target service.

    ConnectorSrcPostgresTableHypertableSpec, ConnectorSrcPostgresTableHypertableSpecArgs

    primaryDimension Property Map
    Primary time dimension for the hypertable.
    secondaryDimensions List<Property Map>
    Optional secondary dimensions for the hypertable.

    ConnectorSrcPostgresTableHypertableSpecPrimaryDimension, ConnectorSrcPostgresTableHypertableSpecPrimaryDimensionArgs

    ColumnName string
    Name of the time column (e.g. created_at).
    PartitionInterval string
    Chunk time interval (e.g. 7d, 1h, 168h).
    ColumnName string
    Name of the time column (e.g. created_at).
    PartitionInterval string
    Chunk time interval (e.g. 7d, 1h, 168h).
    columnName String
    Name of the time column (e.g. created_at).
    partitionInterval String
    Chunk time interval (e.g. 7d, 1h, 168h).
    columnName string
    Name of the time column (e.g. created_at).
    partitionInterval string
    Chunk time interval (e.g. 7d, 1h, 168h).
    column_name str
    Name of the time column (e.g. created_at).
    partition_interval str
    Chunk time interval (e.g. 7d, 1h, 168h).
    columnName String
    Name of the time column (e.g. created_at).
    partitionInterval String
    Chunk time interval (e.g. 7d, 1h, 168h).

    ConnectorSrcPostgresTableHypertableSpecSecondaryDimension, ConnectorSrcPostgresTableHypertableSpecSecondaryDimensionArgs

    hash Property Map
    Hash (space) dimension.
    range Property Map
    Range (time-based) dimension.

    ConnectorSrcPostgresTableHypertableSpecSecondaryDimensionHash, ConnectorSrcPostgresTableHypertableSpecSecondaryDimensionHashArgs

    ColumnName string
    Column name for the hash dimension.
    NumberPartitions double
    Number of hash partitions.
    ColumnName string
    Column name for the hash dimension.
    NumberPartitions float64
    Number of hash partitions.
    columnName String
    Column name for the hash dimension.
    numberPartitions Double
    Number of hash partitions.
    columnName string
    Column name for the hash dimension.
    numberPartitions number
    Number of hash partitions.
    column_name str
    Column name for the hash dimension.
    number_partitions float
    Number of hash partitions.
    columnName String
    Column name for the hash dimension.
    numberPartitions Number
    Number of hash partitions.

    ConnectorSrcPostgresTableHypertableSpecSecondaryDimensionRange, ConnectorSrcPostgresTableHypertableSpecSecondaryDimensionRangeArgs

    ColumnName string
    Column name for the range dimension.
    PartitionInterval string
    Partition interval for the range dimension.
    ColumnName string
    Column name for the range dimension.
    PartitionInterval string
    Partition interval for the range dimension.
    columnName String
    Column name for the range dimension.
    partitionInterval String
    Partition interval for the range dimension.
    columnName string
    Column name for the range dimension.
    partitionInterval string
    Partition interval for the range dimension.
    column_name str
    Column name for the range dimension.
    partition_interval str
    Partition interval for the range dimension.
    columnName String
    Column name for the range dimension.
    partitionInterval String
    Partition interval for the range dimension.

    ConnectorSrcPostgresTableTableMapping, ConnectorSrcPostgresTableTableMappingArgs

    SchemaName string
    Target schema name.
    TableName string
    Target table name.
    SchemaName string
    Target schema name.
    TableName string
    Target table name.
    schemaName String
    Target schema name.
    tableName String
    Target table name.
    schemaName string
    Target schema name.
    tableName string
    Target table name.
    schema_name str
    Target schema name.
    table_name str
    Target table name.
    schemaName String
    Target schema name.
    tableName String
    Target table name.

    Package Details

    Repository
    timescale timescale/terraform-provider-timescale
    License
    Notes
    This Pulumi package is based on the timescale Terraform Provider.
    Viewing docs for timescale 2.12.1
    published on Thursday, May 7, 2026 by timescale
      Try Pulumi Cloud free. Your team will thank you.