1. Packages
  2. Timescale Provider
  3. API Docs
  4. Service
timescale 1.15.0 published on Friday, Feb 21, 2025 by timescale

timescale.Service

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as timescale from "@pulumi/timescale";

const test = new timescale.Service("test", {});
// name       = ""
// milli_cpu  = 1000
// memory_gb  = 4
// region_code = ""
// Read replica
const readReplica = new timescale.Service("readReplica", {readReplicaSource: test.id});
Copy
import pulumi
import pulumi_timescale as timescale

test = timescale.Service("test")
# name       = ""
# milli_cpu  = 1000
# memory_gb  = 4
# region_code = ""
# Read replica
read_replica = timescale.Service("readReplica", read_replica_source=test.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/timescale/timescale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		test, err := timescale.NewService(ctx, "test", nil)
		if err != nil {
			return err
		}
		// Read replica
		_, err = timescale.NewService(ctx, "readReplica", &timescale.ServiceArgs{
			ReadReplicaSource: test.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Timescale = Pulumi.Timescale;

return await Deployment.RunAsync(() => 
{
    var test = new Timescale.Service("test");

    // name       = ""
    // milli_cpu  = 1000
    // memory_gb  = 4
    // region_code = ""
    // Read replica
    var readReplica = new Timescale.Service("readReplica", new()
    {
        ReadReplicaSource = test.Id,
    });

});
Copy
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 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 test = new Service("test");

        // name       = ""
        // milli_cpu  = 1000
        // memory_gb  = 4
        // region_code = ""
        // Read replica
        var readReplica = new Service("readReplica", ServiceArgs.builder()
            .readReplicaSource(test.id())
            .build());

    }
}
Copy
resources:
  test:
    type: timescale:Service
  # Read replica
  readReplica:
    type: timescale:Service
    properties:
      readReplicaSource: ${test.id}
Copy

Create Service Resource

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

Constructor syntax

new Service(name: string, args?: ServiceArgs, opts?: CustomResourceOptions);
@overload
def Service(resource_name: str,
            args: Optional[ServiceArgs] = None,
            opts: Optional[ResourceOptions] = None)

@overload
def Service(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            connection_pooler_enabled: Optional[bool] = None,
            enable_ha_replica: Optional[bool] = None,
            environment_tag: Optional[str] = None,
            memory_gb: Optional[float] = None,
            milli_cpu: Optional[float] = None,
            name: Optional[str] = None,
            password: Optional[str] = None,
            paused: Optional[bool] = None,
            read_replica_source: Optional[str] = None,
            region_code: Optional[str] = None,
            storage_gb: Optional[float] = None,
            timeouts: Optional[ServiceTimeoutsArgs] = None,
            vpc_id: Optional[float] = None)
func NewService(ctx *Context, name string, args *ServiceArgs, opts ...ResourceOption) (*Service, error)
public Service(string name, ServiceArgs? args = null, CustomResourceOptions? opts = null)
public Service(String name, ServiceArgs args)
public Service(String name, ServiceArgs args, CustomResourceOptions options)
type: timescale:Service
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args ServiceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args ServiceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args ServiceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args ServiceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ServiceArgs
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 serviceResource = new Timescale.Service("serviceResource", new()
{
    ConnectionPoolerEnabled = false,
    EnableHaReplica = false,
    EnvironmentTag = "string",
    MemoryGb = 0,
    MilliCpu = 0,
    Name = "string",
    Password = "string",
    Paused = false,
    ReadReplicaSource = "string",
    RegionCode = "string",
    Timeouts = new Timescale.Inputs.ServiceTimeoutsArgs
    {
        Create = "string",
    },
    VpcId = 0,
});
Copy
example, err := timescale.NewService(ctx, "serviceResource", &timescale.ServiceArgs{
ConnectionPoolerEnabled: pulumi.Bool(false),
EnableHaReplica: pulumi.Bool(false),
EnvironmentTag: pulumi.String("string"),
MemoryGb: pulumi.Float64(0),
MilliCpu: pulumi.Float64(0),
Name: pulumi.String("string"),
Password: pulumi.String("string"),
Paused: pulumi.Bool(false),
ReadReplicaSource: pulumi.String("string"),
RegionCode: pulumi.String("string"),
Timeouts: &.ServiceTimeoutsArgs{
Create: pulumi.String("string"),
},
VpcId: pulumi.Float64(0),
})
Copy
var serviceResource = new Service("serviceResource", ServiceArgs.builder()
    .connectionPoolerEnabled(false)
    .enableHaReplica(false)
    .environmentTag("string")
    .memoryGb(0)
    .milliCpu(0)
    .name("string")
    .password("string")
    .paused(false)
    .readReplicaSource("string")
    .regionCode("string")
    .timeouts(ServiceTimeoutsArgs.builder()
        .create("string")
        .build())
    .vpcId(0)
    .build());
Copy
service_resource = timescale.Service("serviceResource",
    connection_pooler_enabled=False,
    enable_ha_replica=False,
    environment_tag="string",
    memory_gb=0,
    milli_cpu=0,
    name="string",
    password="string",
    paused=False,
    read_replica_source="string",
    region_code="string",
    timeouts={
        "create": "string",
    },
    vpc_id=0)
Copy
const serviceResource = new timescale.Service("serviceResource", {
    connectionPoolerEnabled: false,
    enableHaReplica: false,
    environmentTag: "string",
    memoryGb: 0,
    milliCpu: 0,
    name: "string",
    password: "string",
    paused: false,
    readReplicaSource: "string",
    regionCode: "string",
    timeouts: {
        create: "string",
    },
    vpcId: 0,
});
Copy
type: timescale:Service
properties:
    connectionPoolerEnabled: false
    enableHaReplica: false
    environmentTag: string
    memoryGb: 0
    milliCpu: 0
    name: string
    password: string
    paused: false
    readReplicaSource: string
    regionCode: string
    timeouts:
        create: string
    vpcId: 0
Copy

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

ConnectionPoolerEnabled bool
Set connection pooler status for this service.
EnableHaReplica bool
Enable HA Replica
EnvironmentTag string
Set environment tag for this service.
MemoryGb double
Memory GB
MilliCpu double
Milli CPU
Name string
Service Name is the configurable name assigned to this resource. If none is provided, a default will be generated by the provider.
Password string
The Postgres password for this service
Paused bool
Paused status of the service.
ReadReplicaSource string
If set, this database will be a read replica of the provided source database. The region must be the same as the source, or if omitted will be handled by the provider
RegionCode string
The region for this service.
StorageGb double
Deprecated: Storage GB

Deprecated: Deprecated

Timeouts ServiceTimeouts
VpcId double
The VpcID this service is tied to.
ConnectionPoolerEnabled bool
Set connection pooler status for this service.
EnableHaReplica bool
Enable HA Replica
EnvironmentTag string
Set environment tag for this service.
MemoryGb float64
Memory GB
MilliCpu float64
Milli CPU
Name string
Service Name is the configurable name assigned to this resource. If none is provided, a default will be generated by the provider.
Password string
The Postgres password for this service
Paused bool
Paused status of the service.
ReadReplicaSource string
If set, this database will be a read replica of the provided source database. The region must be the same as the source, or if omitted will be handled by the provider
RegionCode string
The region for this service.
StorageGb float64
Deprecated: Storage GB

Deprecated: Deprecated

Timeouts ServiceTimeoutsArgs
VpcId float64
The VpcID this service is tied to.
connectionPoolerEnabled Boolean
Set connection pooler status for this service.
enableHaReplica Boolean
Enable HA Replica
environmentTag String
Set environment tag for this service.
memoryGb Double
Memory GB
milliCpu Double
Milli CPU
name String
Service Name is the configurable name assigned to this resource. If none is provided, a default will be generated by the provider.
password String
The Postgres password for this service
paused Boolean
Paused status of the service.
readReplicaSource String
If set, this database will be a read replica of the provided source database. The region must be the same as the source, or if omitted will be handled by the provider
regionCode String
The region for this service.
storageGb Double
Deprecated: Storage GB

Deprecated: Deprecated

timeouts ServiceTimeouts
vpcId Double
The VpcID this service is tied to.
connectionPoolerEnabled boolean
Set connection pooler status for this service.
enableHaReplica boolean
Enable HA Replica
environmentTag string
Set environment tag for this service.
memoryGb number
Memory GB
milliCpu number
Milli CPU
name string
Service Name is the configurable name assigned to this resource. If none is provided, a default will be generated by the provider.
password string
The Postgres password for this service
paused boolean
Paused status of the service.
readReplicaSource string
If set, this database will be a read replica of the provided source database. The region must be the same as the source, or if omitted will be handled by the provider
regionCode string
The region for this service.
storageGb number
Deprecated: Storage GB

Deprecated: Deprecated

timeouts ServiceTimeouts
vpcId number
The VpcID this service is tied to.
connection_pooler_enabled bool
Set connection pooler status for this service.
enable_ha_replica bool
Enable HA Replica
environment_tag str
Set environment tag for this service.
memory_gb float
Memory GB
milli_cpu float
Milli CPU
name str
Service Name is the configurable name assigned to this resource. If none is provided, a default will be generated by the provider.
password str
The Postgres password for this service
paused bool
Paused status of the service.
read_replica_source str
If set, this database will be a read replica of the provided source database. The region must be the same as the source, or if omitted will be handled by the provider
region_code str
The region for this service.
storage_gb float
Deprecated: Storage GB

Deprecated: Deprecated

timeouts ServiceTimeoutsArgs
vpc_id float
The VpcID this service is tied to.
connectionPoolerEnabled Boolean
Set connection pooler status for this service.
enableHaReplica Boolean
Enable HA Replica
environmentTag String
Set environment tag for this service.
memoryGb Number
Memory GB
milliCpu Number
Milli CPU
name String
Service Name is the configurable name assigned to this resource. If none is provided, a default will be generated by the provider.
password String
The Postgres password for this service
paused Boolean
Paused status of the service.
readReplicaSource String
If set, this database will be a read replica of the provided source database. The region must be the same as the source, or if omitted will be handled by the provider
regionCode String
The region for this service.
storageGb Number
Deprecated: Storage GB

Deprecated: Deprecated

timeouts Property Map
vpcId Number
The VpcID this service is tied to.

Outputs

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

Hostname string
The hostname for this service
Id string
The provider-assigned unique ID for this managed resource.
PoolerHostname string
Hostname of the pooler of this service.
PoolerPort double
Port of the pooler of this service.
Port double
The port for this service
ReplicaHostname string
Hostname of the HA-Replica of this service.
ReplicaPort double
Port of the HA-Replica of this service.
Username string
The Postgres user for this service
Hostname string
The hostname for this service
Id string
The provider-assigned unique ID for this managed resource.
PoolerHostname string
Hostname of the pooler of this service.
PoolerPort float64
Port of the pooler of this service.
Port float64
The port for this service
ReplicaHostname string
Hostname of the HA-Replica of this service.
ReplicaPort float64
Port of the HA-Replica of this service.
Username string
The Postgres user for this service
hostname String
The hostname for this service
id String
The provider-assigned unique ID for this managed resource.
poolerHostname String
Hostname of the pooler of this service.
poolerPort Double
Port of the pooler of this service.
port Double
The port for this service
replicaHostname String
Hostname of the HA-Replica of this service.
replicaPort Double
Port of the HA-Replica of this service.
username String
The Postgres user for this service
hostname string
The hostname for this service
id string
The provider-assigned unique ID for this managed resource.
poolerHostname string
Hostname of the pooler of this service.
poolerPort number
Port of the pooler of this service.
port number
The port for this service
replicaHostname string
Hostname of the HA-Replica of this service.
replicaPort number
Port of the HA-Replica of this service.
username string
The Postgres user for this service
hostname str
The hostname for this service
id str
The provider-assigned unique ID for this managed resource.
pooler_hostname str
Hostname of the pooler of this service.
pooler_port float
Port of the pooler of this service.
port float
The port for this service
replica_hostname str
Hostname of the HA-Replica of this service.
replica_port float
Port of the HA-Replica of this service.
username str
The Postgres user for this service
hostname String
The hostname for this service
id String
The provider-assigned unique ID for this managed resource.
poolerHostname String
Hostname of the pooler of this service.
poolerPort Number
Port of the pooler of this service.
port Number
The port for this service
replicaHostname String
Hostname of the HA-Replica of this service.
replicaPort Number
Port of the HA-Replica of this service.
username String
The Postgres user for this service

Look up Existing Service Resource

Get an existing Service 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?: ServiceState, opts?: CustomResourceOptions): Service
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        connection_pooler_enabled: Optional[bool] = None,
        enable_ha_replica: Optional[bool] = None,
        environment_tag: Optional[str] = None,
        hostname: Optional[str] = None,
        memory_gb: Optional[float] = None,
        milli_cpu: Optional[float] = None,
        name: Optional[str] = None,
        password: Optional[str] = None,
        paused: Optional[bool] = None,
        pooler_hostname: Optional[str] = None,
        pooler_port: Optional[float] = None,
        port: Optional[float] = None,
        read_replica_source: Optional[str] = None,
        region_code: Optional[str] = None,
        replica_hostname: Optional[str] = None,
        replica_port: Optional[float] = None,
        storage_gb: Optional[float] = None,
        timeouts: Optional[ServiceTimeoutsArgs] = None,
        username: Optional[str] = None,
        vpc_id: Optional[float] = None) -> Service
func GetService(ctx *Context, name string, id IDInput, state *ServiceState, opts ...ResourceOption) (*Service, error)
public static Service Get(string name, Input<string> id, ServiceState? state, CustomResourceOptions? opts = null)
public static Service get(String name, Output<String> id, ServiceState state, CustomResourceOptions options)
resources:  _:    type: timescale:Service    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ConnectionPoolerEnabled bool
Set connection pooler status for this service.
EnableHaReplica bool
Enable HA Replica
EnvironmentTag string
Set environment tag for this service.
Hostname string
The hostname for this service
MemoryGb double
Memory GB
MilliCpu double
Milli CPU
Name string
Service Name is the configurable name assigned to this resource. If none is provided, a default will be generated by the provider.
Password string
The Postgres password for this service
Paused bool
Paused status of the service.
PoolerHostname string
Hostname of the pooler of this service.
PoolerPort double
Port of the pooler of this service.
Port double
The port for this service
ReadReplicaSource string
If set, this database will be a read replica of the provided source database. The region must be the same as the source, or if omitted will be handled by the provider
RegionCode string
The region for this service.
ReplicaHostname string
Hostname of the HA-Replica of this service.
ReplicaPort double
Port of the HA-Replica of this service.
StorageGb double
Deprecated: Storage GB

Deprecated: Deprecated

Timeouts ServiceTimeouts
Username string
The Postgres user for this service
VpcId double
The VpcID this service is tied to.
ConnectionPoolerEnabled bool
Set connection pooler status for this service.
EnableHaReplica bool
Enable HA Replica
EnvironmentTag string
Set environment tag for this service.
Hostname string
The hostname for this service
MemoryGb float64
Memory GB
MilliCpu float64
Milli CPU
Name string
Service Name is the configurable name assigned to this resource. If none is provided, a default will be generated by the provider.
Password string
The Postgres password for this service
Paused bool
Paused status of the service.
PoolerHostname string
Hostname of the pooler of this service.
PoolerPort float64
Port of the pooler of this service.
Port float64
The port for this service
ReadReplicaSource string
If set, this database will be a read replica of the provided source database. The region must be the same as the source, or if omitted will be handled by the provider
RegionCode string
The region for this service.
ReplicaHostname string
Hostname of the HA-Replica of this service.
ReplicaPort float64
Port of the HA-Replica of this service.
StorageGb float64
Deprecated: Storage GB

Deprecated: Deprecated

Timeouts ServiceTimeoutsArgs
Username string
The Postgres user for this service
VpcId float64
The VpcID this service is tied to.
connectionPoolerEnabled Boolean
Set connection pooler status for this service.
enableHaReplica Boolean
Enable HA Replica
environmentTag String
Set environment tag for this service.
hostname String
The hostname for this service
memoryGb Double
Memory GB
milliCpu Double
Milli CPU
name String
Service Name is the configurable name assigned to this resource. If none is provided, a default will be generated by the provider.
password String
The Postgres password for this service
paused Boolean
Paused status of the service.
poolerHostname String
Hostname of the pooler of this service.
poolerPort Double
Port of the pooler of this service.
port Double
The port for this service
readReplicaSource String
If set, this database will be a read replica of the provided source database. The region must be the same as the source, or if omitted will be handled by the provider
regionCode String
The region for this service.
replicaHostname String
Hostname of the HA-Replica of this service.
replicaPort Double
Port of the HA-Replica of this service.
storageGb Double
Deprecated: Storage GB

Deprecated: Deprecated

timeouts ServiceTimeouts
username String
The Postgres user for this service
vpcId Double
The VpcID this service is tied to.
connectionPoolerEnabled boolean
Set connection pooler status for this service.
enableHaReplica boolean
Enable HA Replica
environmentTag string
Set environment tag for this service.
hostname string
The hostname for this service
memoryGb number
Memory GB
milliCpu number
Milli CPU
name string
Service Name is the configurable name assigned to this resource. If none is provided, a default will be generated by the provider.
password string
The Postgres password for this service
paused boolean
Paused status of the service.
poolerHostname string
Hostname of the pooler of this service.
poolerPort number
Port of the pooler of this service.
port number
The port for this service
readReplicaSource string
If set, this database will be a read replica of the provided source database. The region must be the same as the source, or if omitted will be handled by the provider
regionCode string
The region for this service.
replicaHostname string
Hostname of the HA-Replica of this service.
replicaPort number
Port of the HA-Replica of this service.
storageGb number
Deprecated: Storage GB

Deprecated: Deprecated

timeouts ServiceTimeouts
username string
The Postgres user for this service
vpcId number
The VpcID this service is tied to.
connection_pooler_enabled bool
Set connection pooler status for this service.
enable_ha_replica bool
Enable HA Replica
environment_tag str
Set environment tag for this service.
hostname str
The hostname for this service
memory_gb float
Memory GB
milli_cpu float
Milli CPU
name str
Service Name is the configurable name assigned to this resource. If none is provided, a default will be generated by the provider.
password str
The Postgres password for this service
paused bool
Paused status of the service.
pooler_hostname str
Hostname of the pooler of this service.
pooler_port float
Port of the pooler of this service.
port float
The port for this service
read_replica_source str
If set, this database will be a read replica of the provided source database. The region must be the same as the source, or if omitted will be handled by the provider
region_code str
The region for this service.
replica_hostname str
Hostname of the HA-Replica of this service.
replica_port float
Port of the HA-Replica of this service.
storage_gb float
Deprecated: Storage GB

Deprecated: Deprecated

timeouts ServiceTimeoutsArgs
username str
The Postgres user for this service
vpc_id float
The VpcID this service is tied to.
connectionPoolerEnabled Boolean
Set connection pooler status for this service.
enableHaReplica Boolean
Enable HA Replica
environmentTag String
Set environment tag for this service.
hostname String
The hostname for this service
memoryGb Number
Memory GB
milliCpu Number
Milli CPU
name String
Service Name is the configurable name assigned to this resource. If none is provided, a default will be generated by the provider.
password String
The Postgres password for this service
paused Boolean
Paused status of the service.
poolerHostname String
Hostname of the pooler of this service.
poolerPort Number
Port of the pooler of this service.
port Number
The port for this service
readReplicaSource String
If set, this database will be a read replica of the provided source database. The region must be the same as the source, or if omitted will be handled by the provider
regionCode String
The region for this service.
replicaHostname String
Hostname of the HA-Replica of this service.
replicaPort Number
Port of the HA-Replica of this service.
storageGb Number
Deprecated: Storage GB

Deprecated: Deprecated

timeouts Property Map
username String
The Postgres user for this service
vpcId Number
The VpcID this service is tied to.

Supporting Types

ServiceTimeouts
, ServiceTimeoutsArgs

Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

Package Details

Repository
timescale timescale/terraform-provider-timescale
License
Notes
This Pulumi package is based on the timescale Terraform Provider.