1. Packages
  2. Gcore Provider
  3. API Docs
  4. PostgresCluster
gcore 0.31.1 published on Friday, Oct 24, 2025 by g-core

gcore.PostgresCluster

Get Started
gcore logo
gcore 0.31.1 published on Friday, Oct 24, 2025 by g-core

    Represents a PostgreSQL cluster resource in Gcore Cloud.

    Example Usage

    Basic PostgreSQL Cluster Example

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    // Basic PostgreSQL cluster example
    const basicCluster = new gcore.PostgresCluster("basicCluster", {
        projectId: data.gcore_project.project.id,
        regionId: data.gcore_region.region.id,
        flavor: {
            cpu: 1,
            memory: 2,
        },
        databases: [{
            name: "mydb",
            owner: "pg",
        }],
        network: {
            acls: ["0.0.0.0/0"],
            networkType: "public",
        },
        pgConfig: {
            version: "15",
        },
        storage: {
            size: 20,
            type: "ssd-hiiops",
        },
        users: [{
            name: "pg",
            roleAttributes: [
                "LOGIN",
                "CREATEDB",
                "CREATEROLE",
            ],
        }],
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    # Basic PostgreSQL cluster example
    basic_cluster = gcore.PostgresCluster("basicCluster",
        project_id=data["gcore_project"]["project"]["id"],
        region_id=data["gcore_region"]["region"]["id"],
        flavor={
            "cpu": 1,
            "memory": 2,
        },
        databases=[{
            "name": "mydb",
            "owner": "pg",
        }],
        network={
            "acls": ["0.0.0.0/0"],
            "network_type": "public",
        },
        pg_config={
            "version": "15",
        },
        storage={
            "size": 20,
            "type": "ssd-hiiops",
        },
        users=[{
            "name": "pg",
            "role_attributes": [
                "LOGIN",
                "CREATEDB",
                "CREATEROLE",
            ],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Basic PostgreSQL cluster example
    		_, err := gcore.NewPostgresCluster(ctx, "basicCluster", &gcore.PostgresClusterArgs{
    			ProjectId: pulumi.Any(data.Gcore_project.Project.Id),
    			RegionId:  pulumi.Any(data.Gcore_region.Region.Id),
    			Flavor: &gcore.PostgresClusterFlavorArgs{
    				Cpu:    pulumi.Float64(1),
    				Memory: pulumi.Float64(2),
    			},
    			Databases: gcore.PostgresClusterDatabaseArray{
    				&gcore.PostgresClusterDatabaseArgs{
    					Name:  pulumi.String("mydb"),
    					Owner: pulumi.String("pg"),
    				},
    			},
    			Network: &gcore.PostgresClusterNetworkArgs{
    				Acls: pulumi.StringArray{
    					pulumi.String("0.0.0.0/0"),
    				},
    				NetworkType: pulumi.String("public"),
    			},
    			PgConfig: &gcore.PostgresClusterPgConfigArgs{
    				Version: pulumi.String("15"),
    			},
    			Storage: &gcore.PostgresClusterStorageArgs{
    				Size: pulumi.Float64(20),
    				Type: pulumi.String("ssd-hiiops"),
    			},
    			Users: gcore.PostgresClusterUserArray{
    				&gcore.PostgresClusterUserArgs{
    					Name: pulumi.String("pg"),
    					RoleAttributes: pulumi.StringArray{
    						pulumi.String("LOGIN"),
    						pulumi.String("CREATEDB"),
    						pulumi.String("CREATEROLE"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        // Basic PostgreSQL cluster example
        var basicCluster = new Gcore.PostgresCluster("basicCluster", new()
        {
            ProjectId = data.Gcore_project.Project.Id,
            RegionId = data.Gcore_region.Region.Id,
            Flavor = new Gcore.Inputs.PostgresClusterFlavorArgs
            {
                Cpu = 1,
                Memory = 2,
            },
            Databases = new[]
            {
                new Gcore.Inputs.PostgresClusterDatabaseArgs
                {
                    Name = "mydb",
                    Owner = "pg",
                },
            },
            Network = new Gcore.Inputs.PostgresClusterNetworkArgs
            {
                Acls = new[]
                {
                    "0.0.0.0/0",
                },
                NetworkType = "public",
            },
            PgConfig = new Gcore.Inputs.PostgresClusterPgConfigArgs
            {
                Version = "15",
            },
            Storage = new Gcore.Inputs.PostgresClusterStorageArgs
            {
                Size = 20,
                Type = "ssd-hiiops",
            },
            Users = new[]
            {
                new Gcore.Inputs.PostgresClusterUserArgs
                {
                    Name = "pg",
                    RoleAttributes = new[]
                    {
                        "LOGIN",
                        "CREATEDB",
                        "CREATEROLE",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.PostgresCluster;
    import com.pulumi.gcore.PostgresClusterArgs;
    import com.pulumi.gcore.inputs.PostgresClusterFlavorArgs;
    import com.pulumi.gcore.inputs.PostgresClusterDatabaseArgs;
    import com.pulumi.gcore.inputs.PostgresClusterNetworkArgs;
    import com.pulumi.gcore.inputs.PostgresClusterPgConfigArgs;
    import com.pulumi.gcore.inputs.PostgresClusterStorageArgs;
    import com.pulumi.gcore.inputs.PostgresClusterUserArgs;
    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) {
            // Basic PostgreSQL cluster example
            var basicCluster = new PostgresCluster("basicCluster", PostgresClusterArgs.builder()
                .projectId(data.gcore_project().project().id())
                .regionId(data.gcore_region().region().id())
                .flavor(PostgresClusterFlavorArgs.builder()
                    .cpu(1)
                    .memory(2)
                    .build())
                .databases(PostgresClusterDatabaseArgs.builder()
                    .name("mydb")
                    .owner("pg")
                    .build())
                .network(PostgresClusterNetworkArgs.builder()
                    .acls("0.0.0.0/0")
                    .networkType("public")
                    .build())
                .pgConfig(PostgresClusterPgConfigArgs.builder()
                    .version("15")
                    .build())
                .storage(PostgresClusterStorageArgs.builder()
                    .size(20)
                    .type("ssd-hiiops")
                    .build())
                .users(PostgresClusterUserArgs.builder()
                    .name("pg")
                    .roleAttributes(                
                        "LOGIN",
                        "CREATEDB",
                        "CREATEROLE")
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Basic PostgreSQL cluster example
      basicCluster:
        type: gcore:PostgresCluster
        properties:
          projectId: ${data.gcore_project.project.id}
          regionId: ${data.gcore_region.region.id}
          flavor:
            cpu: 1
            memory: 2
          databases:
            - name: mydb
              owner: pg
          network:
            acls:
              - 0.0.0.0/0
            networkType: public
          pgConfig:
            version: '15'
          storage:
            size: 20
            type: ssd-hiiops
          users:
            - name: pg
              roleAttributes:
                - LOGIN
                - CREATEDB
                - CREATEROLE
    

    Create PostgresCluster Resource

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

    Constructor syntax

    new PostgresCluster(name: string, args: PostgresClusterArgs, opts?: CustomResourceOptions);
    @overload
    def PostgresCluster(resource_name: str,
                        args: PostgresClusterArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def PostgresCluster(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        databases: Optional[Sequence[PostgresClusterDatabaseArgs]] = None,
                        flavor: Optional[PostgresClusterFlavorArgs] = None,
                        users: Optional[Sequence[PostgresClusterUserArgs]] = None,
                        storage: Optional[PostgresClusterStorageArgs] = None,
                        network: Optional[PostgresClusterNetworkArgs] = None,
                        pg_config: Optional[PostgresClusterPgConfigArgs] = None,
                        postgres_cluster_id: Optional[str] = None,
                        project_id: Optional[float] = None,
                        project_name: Optional[str] = None,
                        region_id: Optional[float] = None,
                        region_name: Optional[str] = None,
                        name: Optional[str] = None,
                        timeouts: Optional[PostgresClusterTimeoutsArgs] = None,
                        ha_replication_mode: Optional[str] = None)
    func NewPostgresCluster(ctx *Context, name string, args PostgresClusterArgs, opts ...ResourceOption) (*PostgresCluster, error)
    public PostgresCluster(string name, PostgresClusterArgs args, CustomResourceOptions? opts = null)
    public PostgresCluster(String name, PostgresClusterArgs args)
    public PostgresCluster(String name, PostgresClusterArgs args, CustomResourceOptions options)
    
    type: gcore:PostgresCluster
    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 PostgresClusterArgs
    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 PostgresClusterArgs
    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 PostgresClusterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PostgresClusterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PostgresClusterArgs
    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 postgresClusterResource = new Gcore.PostgresCluster("postgresClusterResource", new()
    {
        Databases = new[]
        {
            new Gcore.Inputs.PostgresClusterDatabaseArgs
            {
                Name = "string",
                Owner = "string",
                Size = 0,
            },
        },
        Flavor = new Gcore.Inputs.PostgresClusterFlavorArgs
        {
            Cpu = 0,
            Memory = 0,
        },
        Users = new[]
        {
            new Gcore.Inputs.PostgresClusterUserArgs
            {
                Name = "string",
                RoleAttributes = new[]
                {
                    "string",
                },
                IsSecretRevealed = false,
            },
        },
        Storage = new Gcore.Inputs.PostgresClusterStorageArgs
        {
            Size = 0,
            Type = "string",
        },
        Network = new Gcore.Inputs.PostgresClusterNetworkArgs
        {
            Acls = new[]
            {
                "string",
            },
            ConnectionString = "string",
            Host = "string",
            NetworkType = "string",
        },
        PgConfig = new Gcore.Inputs.PostgresClusterPgConfigArgs
        {
            Version = "string",
            PgConf = "string",
            PoolerMode = "string",
            PoolerType = "string",
        },
        PostgresClusterId = "string",
        ProjectId = 0,
        ProjectName = "string",
        RegionId = 0,
        RegionName = "string",
        Name = "string",
        Timeouts = new Gcore.Inputs.PostgresClusterTimeoutsArgs
        {
            Create = "string",
            Update = "string",
        },
        HaReplicationMode = "string",
    });
    
    example, err := gcore.NewPostgresCluster(ctx, "postgresClusterResource", &gcore.PostgresClusterArgs{
    	Databases: gcore.PostgresClusterDatabaseArray{
    		&gcore.PostgresClusterDatabaseArgs{
    			Name:  pulumi.String("string"),
    			Owner: pulumi.String("string"),
    			Size:  pulumi.Float64(0),
    		},
    	},
    	Flavor: &gcore.PostgresClusterFlavorArgs{
    		Cpu:    pulumi.Float64(0),
    		Memory: pulumi.Float64(0),
    	},
    	Users: gcore.PostgresClusterUserArray{
    		&gcore.PostgresClusterUserArgs{
    			Name: pulumi.String("string"),
    			RoleAttributes: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			IsSecretRevealed: pulumi.Bool(false),
    		},
    	},
    	Storage: &gcore.PostgresClusterStorageArgs{
    		Size: pulumi.Float64(0),
    		Type: pulumi.String("string"),
    	},
    	Network: &gcore.PostgresClusterNetworkArgs{
    		Acls: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		ConnectionString: pulumi.String("string"),
    		Host:             pulumi.String("string"),
    		NetworkType:      pulumi.String("string"),
    	},
    	PgConfig: &gcore.PostgresClusterPgConfigArgs{
    		Version:    pulumi.String("string"),
    		PgConf:     pulumi.String("string"),
    		PoolerMode: pulumi.String("string"),
    		PoolerType: pulumi.String("string"),
    	},
    	PostgresClusterId: pulumi.String("string"),
    	ProjectId:         pulumi.Float64(0),
    	ProjectName:       pulumi.String("string"),
    	RegionId:          pulumi.Float64(0),
    	RegionName:        pulumi.String("string"),
    	Name:              pulumi.String("string"),
    	Timeouts: &gcore.PostgresClusterTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    	HaReplicationMode: pulumi.String("string"),
    })
    
    var postgresClusterResource = new PostgresCluster("postgresClusterResource", PostgresClusterArgs.builder()
        .databases(PostgresClusterDatabaseArgs.builder()
            .name("string")
            .owner("string")
            .size(0.0)
            .build())
        .flavor(PostgresClusterFlavorArgs.builder()
            .cpu(0.0)
            .memory(0.0)
            .build())
        .users(PostgresClusterUserArgs.builder()
            .name("string")
            .roleAttributes("string")
            .isSecretRevealed(false)
            .build())
        .storage(PostgresClusterStorageArgs.builder()
            .size(0.0)
            .type("string")
            .build())
        .network(PostgresClusterNetworkArgs.builder()
            .acls("string")
            .connectionString("string")
            .host("string")
            .networkType("string")
            .build())
        .pgConfig(PostgresClusterPgConfigArgs.builder()
            .version("string")
            .pgConf("string")
            .poolerMode("string")
            .poolerType("string")
            .build())
        .postgresClusterId("string")
        .projectId(0.0)
        .projectName("string")
        .regionId(0.0)
        .regionName("string")
        .name("string")
        .timeouts(PostgresClusterTimeoutsArgs.builder()
            .create("string")
            .update("string")
            .build())
        .haReplicationMode("string")
        .build());
    
    postgres_cluster_resource = gcore.PostgresCluster("postgresClusterResource",
        databases=[{
            "name": "string",
            "owner": "string",
            "size": 0,
        }],
        flavor={
            "cpu": 0,
            "memory": 0,
        },
        users=[{
            "name": "string",
            "role_attributes": ["string"],
            "is_secret_revealed": False,
        }],
        storage={
            "size": 0,
            "type": "string",
        },
        network={
            "acls": ["string"],
            "connection_string": "string",
            "host": "string",
            "network_type": "string",
        },
        pg_config={
            "version": "string",
            "pg_conf": "string",
            "pooler_mode": "string",
            "pooler_type": "string",
        },
        postgres_cluster_id="string",
        project_id=0,
        project_name="string",
        region_id=0,
        region_name="string",
        name="string",
        timeouts={
            "create": "string",
            "update": "string",
        },
        ha_replication_mode="string")
    
    const postgresClusterResource = new gcore.PostgresCluster("postgresClusterResource", {
        databases: [{
            name: "string",
            owner: "string",
            size: 0,
        }],
        flavor: {
            cpu: 0,
            memory: 0,
        },
        users: [{
            name: "string",
            roleAttributes: ["string"],
            isSecretRevealed: false,
        }],
        storage: {
            size: 0,
            type: "string",
        },
        network: {
            acls: ["string"],
            connectionString: "string",
            host: "string",
            networkType: "string",
        },
        pgConfig: {
            version: "string",
            pgConf: "string",
            poolerMode: "string",
            poolerType: "string",
        },
        postgresClusterId: "string",
        projectId: 0,
        projectName: "string",
        regionId: 0,
        regionName: "string",
        name: "string",
        timeouts: {
            create: "string",
            update: "string",
        },
        haReplicationMode: "string",
    });
    
    type: gcore:PostgresCluster
    properties:
        databases:
            - name: string
              owner: string
              size: 0
        flavor:
            cpu: 0
            memory: 0
        haReplicationMode: string
        name: string
        network:
            acls:
                - string
            connectionString: string
            host: string
            networkType: string
        pgConfig:
            pgConf: string
            poolerMode: string
            poolerType: string
            version: string
        postgresClusterId: string
        projectId: 0
        projectName: string
        regionId: 0
        regionName: string
        storage:
            size: 0
            type: string
        timeouts:
            create: string
            update: string
        users:
            - isSecretRevealed: false
              name: string
              roleAttributes:
                - string
    

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

    Databases List<PostgresClusterDatabase>
    List of databases to create in the cluster.
    Flavor PostgresClusterFlavor
    Flavor of the cluster instance.
    Network PostgresClusterNetwork
    Network configuration.
    PgConfig PostgresClusterPgConfig
    PostgreSQL cluster configuration.
    Storage PostgresClusterStorage
    Storage configuration.
    Users List<PostgresClusterUser>
    List of users to create in the cluster.
    HaReplicationMode string
    Replication mode. Possible values are async and sync.
    Name string
    Cluster name.
    PostgresClusterId string
    The ID of this resource.
    ProjectId double
    ProjectName string
    RegionId double
    RegionName string
    Timeouts PostgresClusterTimeouts
    Databases []PostgresClusterDatabaseArgs
    List of databases to create in the cluster.
    Flavor PostgresClusterFlavorArgs
    Flavor of the cluster instance.
    Network PostgresClusterNetworkArgs
    Network configuration.
    PgConfig PostgresClusterPgConfigArgs
    PostgreSQL cluster configuration.
    Storage PostgresClusterStorageArgs
    Storage configuration.
    Users []PostgresClusterUserArgs
    List of users to create in the cluster.
    HaReplicationMode string
    Replication mode. Possible values are async and sync.
    Name string
    Cluster name.
    PostgresClusterId string
    The ID of this resource.
    ProjectId float64
    ProjectName string
    RegionId float64
    RegionName string
    Timeouts PostgresClusterTimeoutsArgs
    databases List<PostgresClusterDatabase>
    List of databases to create in the cluster.
    flavor PostgresClusterFlavor
    Flavor of the cluster instance.
    network PostgresClusterNetwork
    Network configuration.
    pgConfig PostgresClusterPgConfig
    PostgreSQL cluster configuration.
    storage PostgresClusterStorage
    Storage configuration.
    users List<PostgresClusterUser>
    List of users to create in the cluster.
    haReplicationMode String
    Replication mode. Possible values are async and sync.
    name String
    Cluster name.
    postgresClusterId String
    The ID of this resource.
    projectId Double
    projectName String
    regionId Double
    regionName String
    timeouts PostgresClusterTimeouts
    databases PostgresClusterDatabase[]
    List of databases to create in the cluster.
    flavor PostgresClusterFlavor
    Flavor of the cluster instance.
    network PostgresClusterNetwork
    Network configuration.
    pgConfig PostgresClusterPgConfig
    PostgreSQL cluster configuration.
    storage PostgresClusterStorage
    Storage configuration.
    users PostgresClusterUser[]
    List of users to create in the cluster.
    haReplicationMode string
    Replication mode. Possible values are async and sync.
    name string
    Cluster name.
    postgresClusterId string
    The ID of this resource.
    projectId number
    projectName string
    regionId number
    regionName string
    timeouts PostgresClusterTimeouts
    databases Sequence[PostgresClusterDatabaseArgs]
    List of databases to create in the cluster.
    flavor PostgresClusterFlavorArgs
    Flavor of the cluster instance.
    network PostgresClusterNetworkArgs
    Network configuration.
    pg_config PostgresClusterPgConfigArgs
    PostgreSQL cluster configuration.
    storage PostgresClusterStorageArgs
    Storage configuration.
    users Sequence[PostgresClusterUserArgs]
    List of users to create in the cluster.
    ha_replication_mode str
    Replication mode. Possible values are async and sync.
    name str
    Cluster name.
    postgres_cluster_id str
    The ID of this resource.
    project_id float
    project_name str
    region_id float
    region_name str
    timeouts PostgresClusterTimeoutsArgs
    databases List<Property Map>
    List of databases to create in the cluster.
    flavor Property Map
    Flavor of the cluster instance.
    network Property Map
    Network configuration.
    pgConfig Property Map
    PostgreSQL cluster configuration.
    storage Property Map
    Storage configuration.
    users List<Property Map>
    List of users to create in the cluster.
    haReplicationMode String
    Replication mode. Possible values are async and sync.
    name String
    Cluster name.
    postgresClusterId String
    The ID of this resource.
    projectId Number
    projectName String
    regionId Number
    regionName String
    timeouts Property Map

    Outputs

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

    CreatedAt string
    Cluster creation date.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Current status of the cluster.
    CreatedAt string
    Cluster creation date.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Current status of the cluster.
    createdAt String
    Cluster creation date.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Current status of the cluster.
    createdAt string
    Cluster creation date.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Current status of the cluster.
    created_at str
    Cluster creation date.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Current status of the cluster.
    createdAt String
    Cluster creation date.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Current status of the cluster.

    Look up Existing PostgresCluster Resource

    Get an existing PostgresCluster 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?: PostgresClusterState, opts?: CustomResourceOptions): PostgresCluster
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            databases: Optional[Sequence[PostgresClusterDatabaseArgs]] = None,
            flavor: Optional[PostgresClusterFlavorArgs] = None,
            ha_replication_mode: Optional[str] = None,
            name: Optional[str] = None,
            network: Optional[PostgresClusterNetworkArgs] = None,
            pg_config: Optional[PostgresClusterPgConfigArgs] = None,
            postgres_cluster_id: Optional[str] = None,
            project_id: Optional[float] = None,
            project_name: Optional[str] = None,
            region_id: Optional[float] = None,
            region_name: Optional[str] = None,
            status: Optional[str] = None,
            storage: Optional[PostgresClusterStorageArgs] = None,
            timeouts: Optional[PostgresClusterTimeoutsArgs] = None,
            users: Optional[Sequence[PostgresClusterUserArgs]] = None) -> PostgresCluster
    func GetPostgresCluster(ctx *Context, name string, id IDInput, state *PostgresClusterState, opts ...ResourceOption) (*PostgresCluster, error)
    public static PostgresCluster Get(string name, Input<string> id, PostgresClusterState? state, CustomResourceOptions? opts = null)
    public static PostgresCluster get(String name, Output<String> id, PostgresClusterState state, CustomResourceOptions options)
    resources:  _:    type: gcore:PostgresCluster    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:
    CreatedAt string
    Cluster creation date.
    Databases List<PostgresClusterDatabase>
    List of databases to create in the cluster.
    Flavor PostgresClusterFlavor
    Flavor of the cluster instance.
    HaReplicationMode string
    Replication mode. Possible values are async and sync.
    Name string
    Cluster name.
    Network PostgresClusterNetwork
    Network configuration.
    PgConfig PostgresClusterPgConfig
    PostgreSQL cluster configuration.
    PostgresClusterId string
    The ID of this resource.
    ProjectId double
    ProjectName string
    RegionId double
    RegionName string
    Status string
    Current status of the cluster.
    Storage PostgresClusterStorage
    Storage configuration.
    Timeouts PostgresClusterTimeouts
    Users List<PostgresClusterUser>
    List of users to create in the cluster.
    CreatedAt string
    Cluster creation date.
    Databases []PostgresClusterDatabaseArgs
    List of databases to create in the cluster.
    Flavor PostgresClusterFlavorArgs
    Flavor of the cluster instance.
    HaReplicationMode string
    Replication mode. Possible values are async and sync.
    Name string
    Cluster name.
    Network PostgresClusterNetworkArgs
    Network configuration.
    PgConfig PostgresClusterPgConfigArgs
    PostgreSQL cluster configuration.
    PostgresClusterId string
    The ID of this resource.
    ProjectId float64
    ProjectName string
    RegionId float64
    RegionName string
    Status string
    Current status of the cluster.
    Storage PostgresClusterStorageArgs
    Storage configuration.
    Timeouts PostgresClusterTimeoutsArgs
    Users []PostgresClusterUserArgs
    List of users to create in the cluster.
    createdAt String
    Cluster creation date.
    databases List<PostgresClusterDatabase>
    List of databases to create in the cluster.
    flavor PostgresClusterFlavor
    Flavor of the cluster instance.
    haReplicationMode String
    Replication mode. Possible values are async and sync.
    name String
    Cluster name.
    network PostgresClusterNetwork
    Network configuration.
    pgConfig PostgresClusterPgConfig
    PostgreSQL cluster configuration.
    postgresClusterId String
    The ID of this resource.
    projectId Double
    projectName String
    regionId Double
    regionName String
    status String
    Current status of the cluster.
    storage PostgresClusterStorage
    Storage configuration.
    timeouts PostgresClusterTimeouts
    users List<PostgresClusterUser>
    List of users to create in the cluster.
    createdAt string
    Cluster creation date.
    databases PostgresClusterDatabase[]
    List of databases to create in the cluster.
    flavor PostgresClusterFlavor
    Flavor of the cluster instance.
    haReplicationMode string
    Replication mode. Possible values are async and sync.
    name string
    Cluster name.
    network PostgresClusterNetwork
    Network configuration.
    pgConfig PostgresClusterPgConfig
    PostgreSQL cluster configuration.
    postgresClusterId string
    The ID of this resource.
    projectId number
    projectName string
    regionId number
    regionName string
    status string
    Current status of the cluster.
    storage PostgresClusterStorage
    Storage configuration.
    timeouts PostgresClusterTimeouts
    users PostgresClusterUser[]
    List of users to create in the cluster.
    created_at str
    Cluster creation date.
    databases Sequence[PostgresClusterDatabaseArgs]
    List of databases to create in the cluster.
    flavor PostgresClusterFlavorArgs
    Flavor of the cluster instance.
    ha_replication_mode str
    Replication mode. Possible values are async and sync.
    name str
    Cluster name.
    network PostgresClusterNetworkArgs
    Network configuration.
    pg_config PostgresClusterPgConfigArgs
    PostgreSQL cluster configuration.
    postgres_cluster_id str
    The ID of this resource.
    project_id float
    project_name str
    region_id float
    region_name str
    status str
    Current status of the cluster.
    storage PostgresClusterStorageArgs
    Storage configuration.
    timeouts PostgresClusterTimeoutsArgs
    users Sequence[PostgresClusterUserArgs]
    List of users to create in the cluster.
    createdAt String
    Cluster creation date.
    databases List<Property Map>
    List of databases to create in the cluster.
    flavor Property Map
    Flavor of the cluster instance.
    haReplicationMode String
    Replication mode. Possible values are async and sync.
    name String
    Cluster name.
    network Property Map
    Network configuration.
    pgConfig Property Map
    PostgreSQL cluster configuration.
    postgresClusterId String
    The ID of this resource.
    projectId Number
    projectName String
    regionId Number
    regionName String
    status String
    Current status of the cluster.
    storage Property Map
    Storage configuration.
    timeouts Property Map
    users List<Property Map>
    List of users to create in the cluster.

    Supporting Types

    PostgresClusterDatabase, PostgresClusterDatabaseArgs

    Name string
    Database name.
    Owner string
    Owner of the database. Must be one of the users defined in the users block.
    Size double
    Size of the database in MiB.
    Name string
    Database name.
    Owner string
    Owner of the database. Must be one of the users defined in the users block.
    Size float64
    Size of the database in MiB.
    name String
    Database name.
    owner String
    Owner of the database. Must be one of the users defined in the users block.
    size Double
    Size of the database in MiB.
    name string
    Database name.
    owner string
    Owner of the database. Must be one of the users defined in the users block.
    size number
    Size of the database in MiB.
    name str
    Database name.
    owner str
    Owner of the database. Must be one of the users defined in the users block.
    size float
    Size of the database in MiB.
    name String
    Database name.
    owner String
    Owner of the database. Must be one of the users defined in the users block.
    size Number
    Size of the database in MiB.

    PostgresClusterFlavor, PostgresClusterFlavorArgs

    Cpu double
    Number of CPU cores.
    Memory double
    Amount of RAM in GiB.
    Cpu float64
    Number of CPU cores.
    Memory float64
    Amount of RAM in GiB.
    cpu Double
    Number of CPU cores.
    memory Double
    Amount of RAM in GiB.
    cpu number
    Number of CPU cores.
    memory number
    Amount of RAM in GiB.
    cpu float
    Number of CPU cores.
    memory float
    Amount of RAM in GiB.
    cpu Number
    Number of CPU cores.
    memory Number
    Amount of RAM in GiB.

    PostgresClusterNetwork, PostgresClusterNetworkArgs

    Acls List<string>
    List of IP addresses or CIDR blocks allowed to access the cluster.
    ConnectionString string
    Connection string for the cluster.
    Host string
    Host address for the cluster.
    NetworkType string
    Network type. Currently, only public is supported.
    Acls []string
    List of IP addresses or CIDR blocks allowed to access the cluster.
    ConnectionString string
    Connection string for the cluster.
    Host string
    Host address for the cluster.
    NetworkType string
    Network type. Currently, only public is supported.
    acls List<String>
    List of IP addresses or CIDR blocks allowed to access the cluster.
    connectionString String
    Connection string for the cluster.
    host String
    Host address for the cluster.
    networkType String
    Network type. Currently, only public is supported.
    acls string[]
    List of IP addresses or CIDR blocks allowed to access the cluster.
    connectionString string
    Connection string for the cluster.
    host string
    Host address for the cluster.
    networkType string
    Network type. Currently, only public is supported.
    acls Sequence[str]
    List of IP addresses or CIDR blocks allowed to access the cluster.
    connection_string str
    Connection string for the cluster.
    host str
    Host address for the cluster.
    network_type str
    Network type. Currently, only public is supported.
    acls List<String>
    List of IP addresses or CIDR blocks allowed to access the cluster.
    connectionString String
    Connection string for the cluster.
    host String
    Host address for the cluster.
    networkType String
    Network type. Currently, only public is supported.

    PostgresClusterPgConfig, PostgresClusterPgConfigArgs

    Version string
    PostgreSQL version. Possible values are 13, 14, and 15.
    PgConf string
    PostgreSQL configuration in key=value format, one per line.
    PoolerMode string
    Connection pooler mode. Possible values are session, transaction, and statement. If not set, connection pooler is not enabled.
    PoolerType string
    Connection pooler type. Currently, only pgbouncer is supported.
    Version string
    PostgreSQL version. Possible values are 13, 14, and 15.
    PgConf string
    PostgreSQL configuration in key=value format, one per line.
    PoolerMode string
    Connection pooler mode. Possible values are session, transaction, and statement. If not set, connection pooler is not enabled.
    PoolerType string
    Connection pooler type. Currently, only pgbouncer is supported.
    version String
    PostgreSQL version. Possible values are 13, 14, and 15.
    pgConf String
    PostgreSQL configuration in key=value format, one per line.
    poolerMode String
    Connection pooler mode. Possible values are session, transaction, and statement. If not set, connection pooler is not enabled.
    poolerType String
    Connection pooler type. Currently, only pgbouncer is supported.
    version string
    PostgreSQL version. Possible values are 13, 14, and 15.
    pgConf string
    PostgreSQL configuration in key=value format, one per line.
    poolerMode string
    Connection pooler mode. Possible values are session, transaction, and statement. If not set, connection pooler is not enabled.
    poolerType string
    Connection pooler type. Currently, only pgbouncer is supported.
    version str
    PostgreSQL version. Possible values are 13, 14, and 15.
    pg_conf str
    PostgreSQL configuration in key=value format, one per line.
    pooler_mode str
    Connection pooler mode. Possible values are session, transaction, and statement. If not set, connection pooler is not enabled.
    pooler_type str
    Connection pooler type. Currently, only pgbouncer is supported.
    version String
    PostgreSQL version. Possible values are 13, 14, and 15.
    pgConf String
    PostgreSQL configuration in key=value format, one per line.
    poolerMode String
    Connection pooler mode. Possible values are session, transaction, and statement. If not set, connection pooler is not enabled.
    poolerType String
    Connection pooler type. Currently, only pgbouncer is supported.

    PostgresClusterStorage, PostgresClusterStorageArgs

    Size double
    Storage size in GiB. Must be between 1 and 100.
    Type string
    Storage type.
    Size float64
    Storage size in GiB. Must be between 1 and 100.
    Type string
    Storage type.
    size Double
    Storage size in GiB. Must be between 1 and 100.
    type String
    Storage type.
    size number
    Storage size in GiB. Must be between 1 and 100.
    type string
    Storage type.
    size float
    Storage size in GiB. Must be between 1 and 100.
    type str
    Storage type.
    size Number
    Storage size in GiB. Must be between 1 and 100.
    type String
    Storage type.

    PostgresClusterTimeouts, PostgresClusterTimeoutsArgs

    Create string
    Update string
    Create string
    Update string
    create String
    update String
    create string
    update string
    create str
    update str
    create String
    update String

    PostgresClusterUser, PostgresClusterUserArgs

    Name string
    User name.
    RoleAttributes List<string>
    List of role attributes. Possible values are: BYPASSRLS, CREATEROLE, CREATEDB, INHERIT, LOGIN, NOLOGIN.
    IsSecretRevealed bool
    Whether the password for the default postgres user is revealed.
    Name string
    User name.
    RoleAttributes []string
    List of role attributes. Possible values are: BYPASSRLS, CREATEROLE, CREATEDB, INHERIT, LOGIN, NOLOGIN.
    IsSecretRevealed bool
    Whether the password for the default postgres user is revealed.
    name String
    User name.
    roleAttributes List<String>
    List of role attributes. Possible values are: BYPASSRLS, CREATEROLE, CREATEDB, INHERIT, LOGIN, NOLOGIN.
    isSecretRevealed Boolean
    Whether the password for the default postgres user is revealed.
    name string
    User name.
    roleAttributes string[]
    List of role attributes. Possible values are: BYPASSRLS, CREATEROLE, CREATEDB, INHERIT, LOGIN, NOLOGIN.
    isSecretRevealed boolean
    Whether the password for the default postgres user is revealed.
    name str
    User name.
    role_attributes Sequence[str]
    List of role attributes. Possible values are: BYPASSRLS, CREATEROLE, CREATEDB, INHERIT, LOGIN, NOLOGIN.
    is_secret_revealed bool
    Whether the password for the default postgres user is revealed.
    name String
    User name.
    roleAttributes List<String>
    List of role attributes. Possible values are: BYPASSRLS, CREATEROLE, CREATEDB, INHERIT, LOGIN, NOLOGIN.
    isSecretRevealed Boolean
    Whether the password for the default postgres user is revealed.

    Import

    import using <project_id>:<region_id>:<cluster_name> format

    $ pulumi import gcore:index/postgresCluster:PostgresCluster postgres_cluster 1:76:my-postgres-cluster
    

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

    Package Details

    Repository
    gcore g-core/terraform-provider-gcore
    License
    Notes
    This Pulumi package is based on the gcore Terraform Provider.
    gcore logo
    gcore 0.31.1 published on Friday, Oct 24, 2025 by g-core
      Meet Neo: Your AI Platform Teammate