1. Packages
  2. Linode Provider
  3. API Docs
  4. DatabasePostgresqlV2
Linode v4.32.0 published on Saturday, Jan 25, 2025 by Pulumi

linode.DatabasePostgresqlV2

Explore with Pulumi AI

linode logo
Linode v4.32.0 published on Saturday, Jan 25, 2025 by Pulumi

    Provides a Linode PostgreSQL Database resource. This can be used to create, modify, and delete Linode PostgreSQL Databases. For more information, see the Linode APIv4 docs.

    Please keep in mind that Managed Databases can take up to half an hour to provision.

    Example Usage

    Creating a simple PostgreSQL database that does not allow connections:

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    const foobar = new linode.DatabasePostgresqlV2("foobar", {
        label: "mydatabase",
        engineId: "postgresql/16",
        region: "us-mia",
        type: "g6-nanode-1",
    });
    
    import pulumi
    import pulumi_linode as linode
    
    foobar = linode.DatabasePostgresqlV2("foobar",
        label="mydatabase",
        engine_id="postgresql/16",
        region="us-mia",
        type="g6-nanode-1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := linode.NewDatabasePostgresqlV2(ctx, "foobar", &linode.DatabasePostgresqlV2Args{
    			Label:    pulumi.String("mydatabase"),
    			EngineId: pulumi.String("postgresql/16"),
    			Region:   pulumi.String("us-mia"),
    			Type:     pulumi.String("g6-nanode-1"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var foobar = new Linode.DatabasePostgresqlV2("foobar", new()
        {
            Label = "mydatabase",
            EngineId = "postgresql/16",
            Region = "us-mia",
            Type = "g6-nanode-1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.linode.DatabasePostgresqlV2;
    import com.pulumi.linode.DatabasePostgresqlV2Args;
    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 foobar = new DatabasePostgresqlV2("foobar", DatabasePostgresqlV2Args.builder()
                .label("mydatabase")
                .engineId("postgresql/16")
                .region("us-mia")
                .type("g6-nanode-1")
                .build());
    
        }
    }
    
    resources:
      foobar:
        type: linode:DatabasePostgresqlV2
        properties:
          label: mydatabase
          engineId: postgresql/16
          region: us-mia
          type: g6-nanode-1
    

    Creating a simple PostgreSQL database that allows connections from all IPv4 addresses:

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    resources:
      foobar:
        type: linode:DatabasePostgresqlV2
        properties:
          label: mydatabase
          engineId: postgresql/16
          region: us-mia
          type: g6-nanode-1
          allowedIps:
            - 0.0.0.0/0
    

    Creating a complex PostgreSQL database:

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.linode.DatabasePostgresqlV2;
    import com.pulumi.linode.DatabasePostgresqlV2Args;
    import com.pulumi.linode.inputs.DatabasePostgresqlV2UpdatesArgs;
    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 foobar = new DatabasePostgresqlV2("foobar", DatabasePostgresqlV2Args.builder()
                .label("mydatabase")
                .engineId("postgresql/16")
                .region("us-mia")
                .type("g6-nanode-1")
                .allowLists("10.0.0.3/32")
                .clusterSize(3)
                .updates(DatabasePostgresqlV2UpdatesArgs.builder()
                    .duration(4)
                    .frequency("weekly")
                    .hour_of_day(22)
                    .day_of_week(2)
                    .build())
                .build());
    
        }
    }
    
    resources:
      foobar:
        type: linode:DatabasePostgresqlV2
        properties:
          label: mydatabase
          engineId: postgresql/16
          region: us-mia
          type: g6-nanode-1
          allowLists:
            - 10.0.0.3/32
          clusterSize: 3
          updates:
            duration: 4
            frequency: weekly
            hour_of_day: 22
            day_of_week: 2
    

    Creating a forked PostgreSQL database:

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    const foobar = new linode.DatabasePostgresqlV2("foobar", {
        label: "mydatabase",
        engineId: "postgresql/16",
        region: "us-mia",
        type: "g6-nanode-1",
        forkSource: 12345,
    });
    
    import pulumi
    import pulumi_linode as linode
    
    foobar = linode.DatabasePostgresqlV2("foobar",
        label="mydatabase",
        engine_id="postgresql/16",
        region="us-mia",
        type="g6-nanode-1",
        fork_source=12345)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := linode.NewDatabasePostgresqlV2(ctx, "foobar", &linode.DatabasePostgresqlV2Args{
    			Label:      pulumi.String("mydatabase"),
    			EngineId:   pulumi.String("postgresql/16"),
    			Region:     pulumi.String("us-mia"),
    			Type:       pulumi.String("g6-nanode-1"),
    			ForkSource: pulumi.Int(12345),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var foobar = new Linode.DatabasePostgresqlV2("foobar", new()
        {
            Label = "mydatabase",
            EngineId = "postgresql/16",
            Region = "us-mia",
            Type = "g6-nanode-1",
            ForkSource = 12345,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.linode.DatabasePostgresqlV2;
    import com.pulumi.linode.DatabasePostgresqlV2Args;
    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 foobar = new DatabasePostgresqlV2("foobar", DatabasePostgresqlV2Args.builder()
                .label("mydatabase")
                .engineId("postgresql/16")
                .region("us-mia")
                .type("g6-nanode-1")
                .forkSource(12345)
                .build());
    
        }
    }
    
    resources:
      foobar:
        type: linode:DatabasePostgresqlV2
        properties:
          label: mydatabase
          engineId: postgresql/16
          region: us-mia
          type: g6-nanode-1
          forkSource: 12345
    

    pending_updates

    The following arguments are exposed by each entry in the pending_updates attribute:

    • deadline - The time when a mandatory update needs to be applied.

    • description - A description of the update.

    • planned_for - The date and time a maintenance update will be applied.

    updates

    The following arguments are supported in the updates specification block:

    • day_of_week - (Required) The day to perform maintenance. (monday, tuesday, …)

    • duration - (Required) The maximum maintenance window time in hours. (1..3)

    • frequency - (Required) Whether maintenance occurs on a weekly or monthly basis. (weekly, monthly)

    • hour_of_day - (Required) The hour to begin maintenance based in UTC time. (0..23)

    • week_of_month - (Optional) The week of the month to perform monthly frequency updates. Required for monthly frequency updates. (1..4)

    Create DatabasePostgresqlV2 Resource

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

    Constructor syntax

    new DatabasePostgresqlV2(name: string, args: DatabasePostgresqlV2Args, opts?: CustomResourceOptions);
    @overload
    def DatabasePostgresqlV2(resource_name: str,
                             args: DatabasePostgresqlV2Args,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def DatabasePostgresqlV2(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             engine_id: Optional[str] = None,
                             label: Optional[str] = None,
                             region: Optional[str] = None,
                             type: Optional[str] = None,
                             allow_lists: Optional[Sequence[str]] = None,
                             cluster_size: Optional[int] = None,
                             fork_restore_time: Optional[str] = None,
                             fork_source: Optional[int] = None,
                             timeouts: Optional[DatabasePostgresqlV2TimeoutsArgs] = None,
                             updates: Optional[DatabasePostgresqlV2UpdatesArgs] = None)
    func NewDatabasePostgresqlV2(ctx *Context, name string, args DatabasePostgresqlV2Args, opts ...ResourceOption) (*DatabasePostgresqlV2, error)
    public DatabasePostgresqlV2(string name, DatabasePostgresqlV2Args args, CustomResourceOptions? opts = null)
    public DatabasePostgresqlV2(String name, DatabasePostgresqlV2Args args)
    public DatabasePostgresqlV2(String name, DatabasePostgresqlV2Args args, CustomResourceOptions options)
    
    type: linode:DatabasePostgresqlV2
    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 DatabasePostgresqlV2Args
    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 DatabasePostgresqlV2Args
    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 DatabasePostgresqlV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DatabasePostgresqlV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DatabasePostgresqlV2Args
    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 databasePostgresqlV2Resource = new Linode.DatabasePostgresqlV2("databasePostgresqlV2Resource", new()
    {
        EngineId = "string",
        Label = "string",
        Region = "string",
        Type = "string",
        AllowLists = new[]
        {
            "string",
        },
        ClusterSize = 0,
        ForkRestoreTime = "string",
        ForkSource = 0,
        Timeouts = new Linode.Inputs.DatabasePostgresqlV2TimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
        Updates = new Linode.Inputs.DatabasePostgresqlV2UpdatesArgs
        {
            DayOfWeek = 0,
            Duration = 0,
            Frequency = "string",
            HourOfDay = 0,
        },
    });
    
    example, err := linode.NewDatabasePostgresqlV2(ctx, "databasePostgresqlV2Resource", &linode.DatabasePostgresqlV2Args{
    	EngineId: pulumi.String("string"),
    	Label:    pulumi.String("string"),
    	Region:   pulumi.String("string"),
    	Type:     pulumi.String("string"),
    	AllowLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ClusterSize:     pulumi.Int(0),
    	ForkRestoreTime: pulumi.String("string"),
    	ForkSource:      pulumi.Int(0),
    	Timeouts: &linode.DatabasePostgresqlV2TimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    	Updates: &linode.DatabasePostgresqlV2UpdatesArgs{
    		DayOfWeek: pulumi.Int(0),
    		Duration:  pulumi.Int(0),
    		Frequency: pulumi.String("string"),
    		HourOfDay: pulumi.Int(0),
    	},
    })
    
    var databasePostgresqlV2Resource = new DatabasePostgresqlV2("databasePostgresqlV2Resource", DatabasePostgresqlV2Args.builder()
        .engineId("string")
        .label("string")
        .region("string")
        .type("string")
        .allowLists("string")
        .clusterSize(0)
        .forkRestoreTime("string")
        .forkSource(0)
        .timeouts(DatabasePostgresqlV2TimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .updates(DatabasePostgresqlV2UpdatesArgs.builder()
            .dayOfWeek(0)
            .duration(0)
            .frequency("string")
            .hourOfDay(0)
            .build())
        .build());
    
    database_postgresql_v2_resource = linode.DatabasePostgresqlV2("databasePostgresqlV2Resource",
        engine_id="string",
        label="string",
        region="string",
        type="string",
        allow_lists=["string"],
        cluster_size=0,
        fork_restore_time="string",
        fork_source=0,
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        },
        updates={
            "day_of_week": 0,
            "duration": 0,
            "frequency": "string",
            "hour_of_day": 0,
        })
    
    const databasePostgresqlV2Resource = new linode.DatabasePostgresqlV2("databasePostgresqlV2Resource", {
        engineId: "string",
        label: "string",
        region: "string",
        type: "string",
        allowLists: ["string"],
        clusterSize: 0,
        forkRestoreTime: "string",
        forkSource: 0,
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
        updates: {
            dayOfWeek: 0,
            duration: 0,
            frequency: "string",
            hourOfDay: 0,
        },
    });
    
    type: linode:DatabasePostgresqlV2
    properties:
        allowLists:
            - string
        clusterSize: 0
        engineId: string
        forkRestoreTime: string
        forkSource: 0
        label: string
        region: string
        timeouts:
            create: string
            delete: string
            update: string
        type: string
        updates:
            dayOfWeek: 0
            duration: 0
            frequency: string
            hourOfDay: 0
    

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

    EngineId string
    The Managed Database engine in engine/version format. (e.g. postgresql/16)
    Label string
    A unique, user-defined string referring to the Managed Database.
    Region string
    The region to use for the Managed Database.
    Type string
    The Linode Instance type used for the nodes of the Managed Database.


    AllowLists List<string>
    A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
    ClusterSize int
    The number of Linode Instance nodes deployed to the Managed Database. (default 1)
    ForkRestoreTime string
    The database timestamp from which it was restored.
    ForkSource int
    The ID of the database that was forked from.

    • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
    Timeouts DatabasePostgresqlV2Timeouts
    Updates DatabasePostgresqlV2Updates
    Configuration settings for automated patch update maintenance for the Managed Database.
    EngineId string
    The Managed Database engine in engine/version format. (e.g. postgresql/16)
    Label string
    A unique, user-defined string referring to the Managed Database.
    Region string
    The region to use for the Managed Database.
    Type string
    The Linode Instance type used for the nodes of the Managed Database.


    AllowLists []string
    A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
    ClusterSize int
    The number of Linode Instance nodes deployed to the Managed Database. (default 1)
    ForkRestoreTime string
    The database timestamp from which it was restored.
    ForkSource int
    The ID of the database that was forked from.

    • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
    Timeouts DatabasePostgresqlV2TimeoutsArgs
    Updates DatabasePostgresqlV2UpdatesArgs
    Configuration settings for automated patch update maintenance for the Managed Database.
    engineId String
    The Managed Database engine in engine/version format. (e.g. postgresql/16)
    label String
    A unique, user-defined string referring to the Managed Database.
    region String
    The region to use for the Managed Database.
    type String
    The Linode Instance type used for the nodes of the Managed Database.


    allowLists List<String>
    A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
    clusterSize Integer
    The number of Linode Instance nodes deployed to the Managed Database. (default 1)
    forkRestoreTime String
    The database timestamp from which it was restored.
    forkSource Integer
    The ID of the database that was forked from.

    • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
    timeouts DatabasePostgresqlV2Timeouts
    updates DatabasePostgresqlV2Updates
    Configuration settings for automated patch update maintenance for the Managed Database.
    engineId string
    The Managed Database engine in engine/version format. (e.g. postgresql/16)
    label string
    A unique, user-defined string referring to the Managed Database.
    region string
    The region to use for the Managed Database.
    type string
    The Linode Instance type used for the nodes of the Managed Database.


    allowLists string[]
    A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
    clusterSize number
    The number of Linode Instance nodes deployed to the Managed Database. (default 1)
    forkRestoreTime string
    The database timestamp from which it was restored.
    forkSource number
    The ID of the database that was forked from.

    • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
    timeouts DatabasePostgresqlV2Timeouts
    updates DatabasePostgresqlV2Updates
    Configuration settings for automated patch update maintenance for the Managed Database.
    engine_id str
    The Managed Database engine in engine/version format. (e.g. postgresql/16)
    label str
    A unique, user-defined string referring to the Managed Database.
    region str
    The region to use for the Managed Database.
    type str
    The Linode Instance type used for the nodes of the Managed Database.


    allow_lists Sequence[str]
    A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
    cluster_size int
    The number of Linode Instance nodes deployed to the Managed Database. (default 1)
    fork_restore_time str
    The database timestamp from which it was restored.
    fork_source int
    The ID of the database that was forked from.

    • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
    timeouts DatabasePostgresqlV2TimeoutsArgs
    updates DatabasePostgresqlV2UpdatesArgs
    Configuration settings for automated patch update maintenance for the Managed Database.
    engineId String
    The Managed Database engine in engine/version format. (e.g. postgresql/16)
    label String
    A unique, user-defined string referring to the Managed Database.
    region String
    The region to use for the Managed Database.
    type String
    The Linode Instance type used for the nodes of the Managed Database.


    allowLists List<String>
    A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
    clusterSize Number
    The number of Linode Instance nodes deployed to the Managed Database. (default 1)
    forkRestoreTime String
    The database timestamp from which it was restored.
    forkSource Number
    The ID of the database that was forked from.

    • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
    timeouts Property Map
    updates Property Map
    Configuration settings for automated patch update maintenance for the Managed Database.

    Outputs

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

    CaCert string
    The base64-encoded SSL CA certificate for the Managed Database.
    Created string
    When this Managed Database was created.
    Encrypted bool
    Whether the Managed Databases is encrypted.
    Engine string
    The Managed Database engine. (e.g. postgresql)
    HostPrimary string
    The primary host for the Managed Database.
    HostSecondary string
    The secondary/private host for the managed database.
    Id string
    The provider-assigned unique ID for this managed resource.
    Members Dictionary<string, string>
    A mapping between IP addresses and strings designating them as primary or failover.
    OldestRestoreTime string
    The oldest time to which a database can be restored.
    PendingUpdates List<DatabasePostgresqlV2PendingUpdate>
    A set of pending updates.
    Platform string
    The back-end platform for relational databases used by the service.
    Port int
    The access port for this Managed Database.
    RootPassword string
    The randomly-generated root password for the Managed Database instance.
    RootUsername string
    The root username for the Managed Database instance.
    SslConnection bool
    Whether to require SSL credentials to establish a connection to the Managed Database.
    Status string
    The operating status of the Managed Database.
    Updated string
    When this Managed Database was last updated.
    Version string
    The Managed Database engine version. (e.g. 13.2)
    CaCert string
    The base64-encoded SSL CA certificate for the Managed Database.
    Created string
    When this Managed Database was created.
    Encrypted bool
    Whether the Managed Databases is encrypted.
    Engine string
    The Managed Database engine. (e.g. postgresql)
    HostPrimary string
    The primary host for the Managed Database.
    HostSecondary string
    The secondary/private host for the managed database.
    Id string
    The provider-assigned unique ID for this managed resource.
    Members map[string]string
    A mapping between IP addresses and strings designating them as primary or failover.
    OldestRestoreTime string
    The oldest time to which a database can be restored.
    PendingUpdates []DatabasePostgresqlV2PendingUpdate
    A set of pending updates.
    Platform string
    The back-end platform for relational databases used by the service.
    Port int
    The access port for this Managed Database.
    RootPassword string
    The randomly-generated root password for the Managed Database instance.
    RootUsername string
    The root username for the Managed Database instance.
    SslConnection bool
    Whether to require SSL credentials to establish a connection to the Managed Database.
    Status string
    The operating status of the Managed Database.
    Updated string
    When this Managed Database was last updated.
    Version string
    The Managed Database engine version. (e.g. 13.2)
    caCert String
    The base64-encoded SSL CA certificate for the Managed Database.
    created String
    When this Managed Database was created.
    encrypted Boolean
    Whether the Managed Databases is encrypted.
    engine String
    The Managed Database engine. (e.g. postgresql)
    hostPrimary String
    The primary host for the Managed Database.
    hostSecondary String
    The secondary/private host for the managed database.
    id String
    The provider-assigned unique ID for this managed resource.
    members Map<String,String>
    A mapping between IP addresses and strings designating them as primary or failover.
    oldestRestoreTime String
    The oldest time to which a database can be restored.
    pendingUpdates List<DatabasePostgresqlV2PendingUpdate>
    A set of pending updates.
    platform String
    The back-end platform for relational databases used by the service.
    port Integer
    The access port for this Managed Database.
    rootPassword String
    The randomly-generated root password for the Managed Database instance.
    rootUsername String
    The root username for the Managed Database instance.
    sslConnection Boolean
    Whether to require SSL credentials to establish a connection to the Managed Database.
    status String
    The operating status of the Managed Database.
    updated String
    When this Managed Database was last updated.
    version String
    The Managed Database engine version. (e.g. 13.2)
    caCert string
    The base64-encoded SSL CA certificate for the Managed Database.
    created string
    When this Managed Database was created.
    encrypted boolean
    Whether the Managed Databases is encrypted.
    engine string
    The Managed Database engine. (e.g. postgresql)
    hostPrimary string
    The primary host for the Managed Database.
    hostSecondary string
    The secondary/private host for the managed database.
    id string
    The provider-assigned unique ID for this managed resource.
    members {[key: string]: string}
    A mapping between IP addresses and strings designating them as primary or failover.
    oldestRestoreTime string
    The oldest time to which a database can be restored.
    pendingUpdates DatabasePostgresqlV2PendingUpdate[]
    A set of pending updates.
    platform string
    The back-end platform for relational databases used by the service.
    port number
    The access port for this Managed Database.
    rootPassword string
    The randomly-generated root password for the Managed Database instance.
    rootUsername string
    The root username for the Managed Database instance.
    sslConnection boolean
    Whether to require SSL credentials to establish a connection to the Managed Database.
    status string
    The operating status of the Managed Database.
    updated string
    When this Managed Database was last updated.
    version string
    The Managed Database engine version. (e.g. 13.2)
    ca_cert str
    The base64-encoded SSL CA certificate for the Managed Database.
    created str
    When this Managed Database was created.
    encrypted bool
    Whether the Managed Databases is encrypted.
    engine str
    The Managed Database engine. (e.g. postgresql)
    host_primary str
    The primary host for the Managed Database.
    host_secondary str
    The secondary/private host for the managed database.
    id str
    The provider-assigned unique ID for this managed resource.
    members Mapping[str, str]
    A mapping between IP addresses and strings designating them as primary or failover.
    oldest_restore_time str
    The oldest time to which a database can be restored.
    pending_updates Sequence[DatabasePostgresqlV2PendingUpdate]
    A set of pending updates.
    platform str
    The back-end platform for relational databases used by the service.
    port int
    The access port for this Managed Database.
    root_password str
    The randomly-generated root password for the Managed Database instance.
    root_username str
    The root username for the Managed Database instance.
    ssl_connection bool
    Whether to require SSL credentials to establish a connection to the Managed Database.
    status str
    The operating status of the Managed Database.
    updated str
    When this Managed Database was last updated.
    version str
    The Managed Database engine version. (e.g. 13.2)
    caCert String
    The base64-encoded SSL CA certificate for the Managed Database.
    created String
    When this Managed Database was created.
    encrypted Boolean
    Whether the Managed Databases is encrypted.
    engine String
    The Managed Database engine. (e.g. postgresql)
    hostPrimary String
    The primary host for the Managed Database.
    hostSecondary String
    The secondary/private host for the managed database.
    id String
    The provider-assigned unique ID for this managed resource.
    members Map<String>
    A mapping between IP addresses and strings designating them as primary or failover.
    oldestRestoreTime String
    The oldest time to which a database can be restored.
    pendingUpdates List<Property Map>
    A set of pending updates.
    platform String
    The back-end platform for relational databases used by the service.
    port Number
    The access port for this Managed Database.
    rootPassword String
    The randomly-generated root password for the Managed Database instance.
    rootUsername String
    The root username for the Managed Database instance.
    sslConnection Boolean
    Whether to require SSL credentials to establish a connection to the Managed Database.
    status String
    The operating status of the Managed Database.
    updated String
    When this Managed Database was last updated.
    version String
    The Managed Database engine version. (e.g. 13.2)

    Look up Existing DatabasePostgresqlV2 Resource

    Get an existing DatabasePostgresqlV2 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?: DatabasePostgresqlV2State, opts?: CustomResourceOptions): DatabasePostgresqlV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allow_lists: Optional[Sequence[str]] = None,
            ca_cert: Optional[str] = None,
            cluster_size: Optional[int] = None,
            created: Optional[str] = None,
            encrypted: Optional[bool] = None,
            engine: Optional[str] = None,
            engine_id: Optional[str] = None,
            fork_restore_time: Optional[str] = None,
            fork_source: Optional[int] = None,
            host_primary: Optional[str] = None,
            host_secondary: Optional[str] = None,
            label: Optional[str] = None,
            members: Optional[Mapping[str, str]] = None,
            oldest_restore_time: Optional[str] = None,
            pending_updates: Optional[Sequence[DatabasePostgresqlV2PendingUpdateArgs]] = None,
            platform: Optional[str] = None,
            port: Optional[int] = None,
            region: Optional[str] = None,
            root_password: Optional[str] = None,
            root_username: Optional[str] = None,
            ssl_connection: Optional[bool] = None,
            status: Optional[str] = None,
            timeouts: Optional[DatabasePostgresqlV2TimeoutsArgs] = None,
            type: Optional[str] = None,
            updated: Optional[str] = None,
            updates: Optional[DatabasePostgresqlV2UpdatesArgs] = None,
            version: Optional[str] = None) -> DatabasePostgresqlV2
    func GetDatabasePostgresqlV2(ctx *Context, name string, id IDInput, state *DatabasePostgresqlV2State, opts ...ResourceOption) (*DatabasePostgresqlV2, error)
    public static DatabasePostgresqlV2 Get(string name, Input<string> id, DatabasePostgresqlV2State? state, CustomResourceOptions? opts = null)
    public static DatabasePostgresqlV2 get(String name, Output<String> id, DatabasePostgresqlV2State state, CustomResourceOptions options)
    resources:  _:    type: linode:DatabasePostgresqlV2    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:
    AllowLists List<string>
    A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
    CaCert string
    The base64-encoded SSL CA certificate for the Managed Database.
    ClusterSize int
    The number of Linode Instance nodes deployed to the Managed Database. (default 1)
    Created string
    When this Managed Database was created.
    Encrypted bool
    Whether the Managed Databases is encrypted.
    Engine string
    The Managed Database engine. (e.g. postgresql)
    EngineId string
    The Managed Database engine in engine/version format. (e.g. postgresql/16)
    ForkRestoreTime string
    The database timestamp from which it was restored.
    ForkSource int
    The ID of the database that was forked from.

    • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
    HostPrimary string
    The primary host for the Managed Database.
    HostSecondary string
    The secondary/private host for the managed database.
    Label string
    A unique, user-defined string referring to the Managed Database.
    Members Dictionary<string, string>
    A mapping between IP addresses and strings designating them as primary or failover.
    OldestRestoreTime string
    The oldest time to which a database can be restored.
    PendingUpdates List<DatabasePostgresqlV2PendingUpdate>
    A set of pending updates.
    Platform string
    The back-end platform for relational databases used by the service.
    Port int
    The access port for this Managed Database.
    Region string
    The region to use for the Managed Database.
    RootPassword string
    The randomly-generated root password for the Managed Database instance.
    RootUsername string
    The root username for the Managed Database instance.
    SslConnection bool
    Whether to require SSL credentials to establish a connection to the Managed Database.
    Status string
    The operating status of the Managed Database.
    Timeouts DatabasePostgresqlV2Timeouts
    Type string
    The Linode Instance type used for the nodes of the Managed Database.


    Updated string
    When this Managed Database was last updated.
    Updates DatabasePostgresqlV2Updates
    Configuration settings for automated patch update maintenance for the Managed Database.
    Version string
    The Managed Database engine version. (e.g. 13.2)
    AllowLists []string
    A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
    CaCert string
    The base64-encoded SSL CA certificate for the Managed Database.
    ClusterSize int
    The number of Linode Instance nodes deployed to the Managed Database. (default 1)
    Created string
    When this Managed Database was created.
    Encrypted bool
    Whether the Managed Databases is encrypted.
    Engine string
    The Managed Database engine. (e.g. postgresql)
    EngineId string
    The Managed Database engine in engine/version format. (e.g. postgresql/16)
    ForkRestoreTime string
    The database timestamp from which it was restored.
    ForkSource int
    The ID of the database that was forked from.

    • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
    HostPrimary string
    The primary host for the Managed Database.
    HostSecondary string
    The secondary/private host for the managed database.
    Label string
    A unique, user-defined string referring to the Managed Database.
    Members map[string]string
    A mapping between IP addresses and strings designating them as primary or failover.
    OldestRestoreTime string
    The oldest time to which a database can be restored.
    PendingUpdates []DatabasePostgresqlV2PendingUpdateArgs
    A set of pending updates.
    Platform string
    The back-end platform for relational databases used by the service.
    Port int
    The access port for this Managed Database.
    Region string
    The region to use for the Managed Database.
    RootPassword string
    The randomly-generated root password for the Managed Database instance.
    RootUsername string
    The root username for the Managed Database instance.
    SslConnection bool
    Whether to require SSL credentials to establish a connection to the Managed Database.
    Status string
    The operating status of the Managed Database.
    Timeouts DatabasePostgresqlV2TimeoutsArgs
    Type string
    The Linode Instance type used for the nodes of the Managed Database.


    Updated string
    When this Managed Database was last updated.
    Updates DatabasePostgresqlV2UpdatesArgs
    Configuration settings for automated patch update maintenance for the Managed Database.
    Version string
    The Managed Database engine version. (e.g. 13.2)
    allowLists List<String>
    A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
    caCert String
    The base64-encoded SSL CA certificate for the Managed Database.
    clusterSize Integer
    The number of Linode Instance nodes deployed to the Managed Database. (default 1)
    created String
    When this Managed Database was created.
    encrypted Boolean
    Whether the Managed Databases is encrypted.
    engine String
    The Managed Database engine. (e.g. postgresql)
    engineId String
    The Managed Database engine in engine/version format. (e.g. postgresql/16)
    forkRestoreTime String
    The database timestamp from which it was restored.
    forkSource Integer
    The ID of the database that was forked from.

    • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
    hostPrimary String
    The primary host for the Managed Database.
    hostSecondary String
    The secondary/private host for the managed database.
    label String
    A unique, user-defined string referring to the Managed Database.
    members Map<String,String>
    A mapping between IP addresses and strings designating them as primary or failover.
    oldestRestoreTime String
    The oldest time to which a database can be restored.
    pendingUpdates List<DatabasePostgresqlV2PendingUpdate>
    A set of pending updates.
    platform String
    The back-end platform for relational databases used by the service.
    port Integer
    The access port for this Managed Database.
    region String
    The region to use for the Managed Database.
    rootPassword String
    The randomly-generated root password for the Managed Database instance.
    rootUsername String
    The root username for the Managed Database instance.
    sslConnection Boolean
    Whether to require SSL credentials to establish a connection to the Managed Database.
    status String
    The operating status of the Managed Database.
    timeouts DatabasePostgresqlV2Timeouts
    type String
    The Linode Instance type used for the nodes of the Managed Database.


    updated String
    When this Managed Database was last updated.
    updates DatabasePostgresqlV2Updates
    Configuration settings for automated patch update maintenance for the Managed Database.
    version String
    The Managed Database engine version. (e.g. 13.2)
    allowLists string[]
    A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
    caCert string
    The base64-encoded SSL CA certificate for the Managed Database.
    clusterSize number
    The number of Linode Instance nodes deployed to the Managed Database. (default 1)
    created string
    When this Managed Database was created.
    encrypted boolean
    Whether the Managed Databases is encrypted.
    engine string
    The Managed Database engine. (e.g. postgresql)
    engineId string
    The Managed Database engine in engine/version format. (e.g. postgresql/16)
    forkRestoreTime string
    The database timestamp from which it was restored.
    forkSource number
    The ID of the database that was forked from.

    • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
    hostPrimary string
    The primary host for the Managed Database.
    hostSecondary string
    The secondary/private host for the managed database.
    label string
    A unique, user-defined string referring to the Managed Database.
    members {[key: string]: string}
    A mapping between IP addresses and strings designating them as primary or failover.
    oldestRestoreTime string
    The oldest time to which a database can be restored.
    pendingUpdates DatabasePostgresqlV2PendingUpdate[]
    A set of pending updates.
    platform string
    The back-end platform for relational databases used by the service.
    port number
    The access port for this Managed Database.
    region string
    The region to use for the Managed Database.
    rootPassword string
    The randomly-generated root password for the Managed Database instance.
    rootUsername string
    The root username for the Managed Database instance.
    sslConnection boolean
    Whether to require SSL credentials to establish a connection to the Managed Database.
    status string
    The operating status of the Managed Database.
    timeouts DatabasePostgresqlV2Timeouts
    type string
    The Linode Instance type used for the nodes of the Managed Database.


    updated string
    When this Managed Database was last updated.
    updates DatabasePostgresqlV2Updates
    Configuration settings for automated patch update maintenance for the Managed Database.
    version string
    The Managed Database engine version. (e.g. 13.2)
    allow_lists Sequence[str]
    A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
    ca_cert str
    The base64-encoded SSL CA certificate for the Managed Database.
    cluster_size int
    The number of Linode Instance nodes deployed to the Managed Database. (default 1)
    created str
    When this Managed Database was created.
    encrypted bool
    Whether the Managed Databases is encrypted.
    engine str
    The Managed Database engine. (e.g. postgresql)
    engine_id str
    The Managed Database engine in engine/version format. (e.g. postgresql/16)
    fork_restore_time str
    The database timestamp from which it was restored.
    fork_source int
    The ID of the database that was forked from.

    • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
    host_primary str
    The primary host for the Managed Database.
    host_secondary str
    The secondary/private host for the managed database.
    label str
    A unique, user-defined string referring to the Managed Database.
    members Mapping[str, str]
    A mapping between IP addresses and strings designating them as primary or failover.
    oldest_restore_time str
    The oldest time to which a database can be restored.
    pending_updates Sequence[DatabasePostgresqlV2PendingUpdateArgs]
    A set of pending updates.
    platform str
    The back-end platform for relational databases used by the service.
    port int
    The access port for this Managed Database.
    region str
    The region to use for the Managed Database.
    root_password str
    The randomly-generated root password for the Managed Database instance.
    root_username str
    The root username for the Managed Database instance.
    ssl_connection bool
    Whether to require SSL credentials to establish a connection to the Managed Database.
    status str
    The operating status of the Managed Database.
    timeouts DatabasePostgresqlV2TimeoutsArgs
    type str
    The Linode Instance type used for the nodes of the Managed Database.


    updated str
    When this Managed Database was last updated.
    updates DatabasePostgresqlV2UpdatesArgs
    Configuration settings for automated patch update maintenance for the Managed Database.
    version str
    The Managed Database engine version. (e.g. 13.2)
    allowLists List<String>
    A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
    caCert String
    The base64-encoded SSL CA certificate for the Managed Database.
    clusterSize Number
    The number of Linode Instance nodes deployed to the Managed Database. (default 1)
    created String
    When this Managed Database was created.
    encrypted Boolean
    Whether the Managed Databases is encrypted.
    engine String
    The Managed Database engine. (e.g. postgresql)
    engineId String
    The Managed Database engine in engine/version format. (e.g. postgresql/16)
    forkRestoreTime String
    The database timestamp from which it was restored.
    forkSource Number
    The ID of the database that was forked from.

    • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
    hostPrimary String
    The primary host for the Managed Database.
    hostSecondary String
    The secondary/private host for the managed database.
    label String
    A unique, user-defined string referring to the Managed Database.
    members Map<String>
    A mapping between IP addresses and strings designating them as primary or failover.
    oldestRestoreTime String
    The oldest time to which a database can be restored.
    pendingUpdates List<Property Map>
    A set of pending updates.
    platform String
    The back-end platform for relational databases used by the service.
    port Number
    The access port for this Managed Database.
    region String
    The region to use for the Managed Database.
    rootPassword String
    The randomly-generated root password for the Managed Database instance.
    rootUsername String
    The root username for the Managed Database instance.
    sslConnection Boolean
    Whether to require SSL credentials to establish a connection to the Managed Database.
    status String
    The operating status of the Managed Database.
    timeouts Property Map
    type String
    The Linode Instance type used for the nodes of the Managed Database.


    updated String
    When this Managed Database was last updated.
    updates Property Map
    Configuration settings for automated patch update maintenance for the Managed Database.
    version String
    The Managed Database engine version. (e.g. 13.2)

    Supporting Types

    DatabasePostgresqlV2PendingUpdate, DatabasePostgresqlV2PendingUpdateArgs

    Deadline string
    Description string
    PlannedFor string
    Deadline string
    Description string
    PlannedFor string
    deadline String
    description String
    plannedFor String
    deadline string
    description string
    plannedFor string
    deadline String
    description String
    plannedFor String

    DatabasePostgresqlV2Timeouts, DatabasePostgresqlV2TimeoutsArgs

    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).
    Delete 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). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update 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).
    Delete 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). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update 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).
    delete 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). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update 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).
    delete 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). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update 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).
    delete 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). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update 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).
    delete 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). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update 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).

    DatabasePostgresqlV2Updates, DatabasePostgresqlV2UpdatesArgs

    dayOfWeek Integer
    duration Integer
    frequency String
    hourOfDay Integer
    dayOfWeek number
    duration number
    frequency string
    hourOfDay number
    dayOfWeek Number
    duration Number
    frequency String
    hourOfDay Number

    Import

    Linode PostgreSQL Databases can be imported using the id, e.g.

    $ pulumi import linode:index/databasePostgresqlV2:DatabasePostgresqlV2 foobar 1234567
    

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

    Package Details

    Repository
    Linode pulumi/pulumi-linode
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the linode Terraform Provider.
    linode logo
    Linode v4.32.0 published on Saturday, Jan 25, 2025 by Pulumi