gcore.PostgresCluster
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<Postgres
Cluster Database> - List of databases to create in the cluster.
- Flavor
Postgres
Cluster Flavor - Flavor of the cluster instance.
- Network
Postgres
Cluster Network - Network configuration.
- Pg
Config PostgresCluster Pg Config - PostgreSQL cluster configuration.
- Storage
Postgres
Cluster Storage - Storage configuration.
- Users
List<Postgres
Cluster User> - List of users to create in the cluster.
- Ha
Replication stringMode - Replication mode. Possible values are
asyncandsync. - Name string
- Cluster name.
- Postgres
Cluster stringId - The ID of this resource.
- Project
Id double - Project
Name string - Region
Id double - Region
Name string - Timeouts
Postgres
Cluster Timeouts
- Databases
[]Postgres
Cluster Database Args - List of databases to create in the cluster.
- Flavor
Postgres
Cluster Flavor Args - Flavor of the cluster instance.
- Network
Postgres
Cluster Network Args - Network configuration.
- Pg
Config PostgresCluster Pg Config Args - PostgreSQL cluster configuration.
- Storage
Postgres
Cluster Storage Args - Storage configuration.
- Users
[]Postgres
Cluster User Args - List of users to create in the cluster.
- Ha
Replication stringMode - Replication mode. Possible values are
asyncandsync. - Name string
- Cluster name.
- Postgres
Cluster stringId - The ID of this resource.
- Project
Id float64 - Project
Name string - Region
Id float64 - Region
Name string - Timeouts
Postgres
Cluster Timeouts Args
- databases
List<Postgres
Cluster Database> - List of databases to create in the cluster.
- flavor
Postgres
Cluster Flavor - Flavor of the cluster instance.
- network
Postgres
Cluster Network - Network configuration.
- pg
Config PostgresCluster Pg Config - PostgreSQL cluster configuration.
- storage
Postgres
Cluster Storage - Storage configuration.
- users
List<Postgres
Cluster User> - List of users to create in the cluster.
- ha
Replication StringMode - Replication mode. Possible values are
asyncandsync. - name String
- Cluster name.
- postgres
Cluster StringId - The ID of this resource.
- project
Id Double - project
Name String - region
Id Double - region
Name String - timeouts
Postgres
Cluster Timeouts
- databases
Postgres
Cluster Database[] - List of databases to create in the cluster.
- flavor
Postgres
Cluster Flavor - Flavor of the cluster instance.
- network
Postgres
Cluster Network - Network configuration.
- pg
Config PostgresCluster Pg Config - PostgreSQL cluster configuration.
- storage
Postgres
Cluster Storage - Storage configuration.
- users
Postgres
Cluster User[] - List of users to create in the cluster.
- ha
Replication stringMode - Replication mode. Possible values are
asyncandsync. - name string
- Cluster name.
- postgres
Cluster stringId - The ID of this resource.
- project
Id number - project
Name string - region
Id number - region
Name string - timeouts
Postgres
Cluster Timeouts
- databases
Sequence[Postgres
Cluster Database Args] - List of databases to create in the cluster.
- flavor
Postgres
Cluster Flavor Args - Flavor of the cluster instance.
- network
Postgres
Cluster Network Args - Network configuration.
- pg_
config PostgresCluster Pg Config Args - PostgreSQL cluster configuration.
- storage
Postgres
Cluster Storage Args - Storage configuration.
- users
Sequence[Postgres
Cluster User Args] - List of users to create in the cluster.
- ha_
replication_ strmode - Replication mode. Possible values are
asyncandsync. - name str
- Cluster name.
- postgres_
cluster_ strid - The ID of this resource.
- project_
id float - project_
name str - region_
id float - region_
name str - timeouts
Postgres
Cluster Timeouts Args
- 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.
- pg
Config Property Map - PostgreSQL cluster configuration.
- storage Property Map
- Storage configuration.
- users List<Property Map>
- List of users to create in the cluster.
- ha
Replication StringMode - Replication mode. Possible values are
asyncandsync. - name String
- Cluster name.
- postgres
Cluster StringId - The ID of this resource.
- project
Id Number - project
Name String - region
Id Number - region
Name String - timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresCluster resource produces the following output properties:
- created_
at str - Cluster creation date.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- 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) -> PostgresClusterfunc 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.
- Created
At string - Cluster creation date.
- Databases
List<Postgres
Cluster Database> - List of databases to create in the cluster.
- Flavor
Postgres
Cluster Flavor - Flavor of the cluster instance.
- Ha
Replication stringMode - Replication mode. Possible values are
asyncandsync. - Name string
- Cluster name.
- Network
Postgres
Cluster Network - Network configuration.
- Pg
Config PostgresCluster Pg Config - PostgreSQL cluster configuration.
- Postgres
Cluster stringId - The ID of this resource.
- Project
Id double - Project
Name string - Region
Id double - Region
Name string - Status string
- Current status of the cluster.
- Storage
Postgres
Cluster Storage - Storage configuration.
- Timeouts
Postgres
Cluster Timeouts - Users
List<Postgres
Cluster User> - List of users to create in the cluster.
- Created
At string - Cluster creation date.
- Databases
[]Postgres
Cluster Database Args - List of databases to create in the cluster.
- Flavor
Postgres
Cluster Flavor Args - Flavor of the cluster instance.
- Ha
Replication stringMode - Replication mode. Possible values are
asyncandsync. - Name string
- Cluster name.
- Network
Postgres
Cluster Network Args - Network configuration.
- Pg
Config PostgresCluster Pg Config Args - PostgreSQL cluster configuration.
- Postgres
Cluster stringId - The ID of this resource.
- Project
Id float64 - Project
Name string - Region
Id float64 - Region
Name string - Status string
- Current status of the cluster.
- Storage
Postgres
Cluster Storage Args - Storage configuration.
- Timeouts
Postgres
Cluster Timeouts Args - Users
[]Postgres
Cluster User Args - List of users to create in the cluster.
- created
At String - Cluster creation date.
- databases
List<Postgres
Cluster Database> - List of databases to create in the cluster.
- flavor
Postgres
Cluster Flavor - Flavor of the cluster instance.
- ha
Replication StringMode - Replication mode. Possible values are
asyncandsync. - name String
- Cluster name.
- network
Postgres
Cluster Network - Network configuration.
- pg
Config PostgresCluster Pg Config - PostgreSQL cluster configuration.
- postgres
Cluster StringId - The ID of this resource.
- project
Id Double - project
Name String - region
Id Double - region
Name String - status String
- Current status of the cluster.
- storage
Postgres
Cluster Storage - Storage configuration.
- timeouts
Postgres
Cluster Timeouts - users
List<Postgres
Cluster User> - List of users to create in the cluster.
- created
At string - Cluster creation date.
- databases
Postgres
Cluster Database[] - List of databases to create in the cluster.
- flavor
Postgres
Cluster Flavor - Flavor of the cluster instance.
- ha
Replication stringMode - Replication mode. Possible values are
asyncandsync. - name string
- Cluster name.
- network
Postgres
Cluster Network - Network configuration.
- pg
Config PostgresCluster Pg Config - PostgreSQL cluster configuration.
- postgres
Cluster stringId - The ID of this resource.
- project
Id number - project
Name string - region
Id number - region
Name string - status string
- Current status of the cluster.
- storage
Postgres
Cluster Storage - Storage configuration.
- timeouts
Postgres
Cluster Timeouts - users
Postgres
Cluster User[] - List of users to create in the cluster.
- created_
at str - Cluster creation date.
- databases
Sequence[Postgres
Cluster Database Args] - List of databases to create in the cluster.
- flavor
Postgres
Cluster Flavor Args - Flavor of the cluster instance.
- ha_
replication_ strmode - Replication mode. Possible values are
asyncandsync. - name str
- Cluster name.
- network
Postgres
Cluster Network Args - Network configuration.
- pg_
config PostgresCluster Pg Config Args - PostgreSQL cluster configuration.
- postgres_
cluster_ strid - 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
Postgres
Cluster Storage Args - Storage configuration.
- timeouts
Postgres
Cluster Timeouts Args - users
Sequence[Postgres
Cluster User Args] - List of users to create in the cluster.
- created
At String - Cluster creation date.
- databases List<Property Map>
- List of databases to create in the cluster.
- flavor Property Map
- Flavor of the cluster instance.
- ha
Replication StringMode - Replication mode. Possible values are
asyncandsync. - name String
- Cluster name.
- network Property Map
- Network configuration.
- pg
Config Property Map - PostgreSQL cluster configuration.
- postgres
Cluster StringId - The ID of this resource.
- project
Id Number - project
Name String - region
Id Number - region
Name 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
PostgresClusterFlavor, PostgresClusterFlavorArgs
PostgresClusterNetwork, PostgresClusterNetworkArgs
- Acls List<string>
- List of IP addresses or CIDR blocks allowed to access the cluster.
- Connection
String string - Connection string for the cluster.
- Host string
- Host address for the cluster.
- Network
Type string - Network type. Currently, only
publicis supported.
- Acls []string
- List of IP addresses or CIDR blocks allowed to access the cluster.
- Connection
String string - Connection string for the cluster.
- Host string
- Host address for the cluster.
- Network
Type string - Network type. Currently, only
publicis supported.
- acls List<String>
- List of IP addresses or CIDR blocks allowed to access the cluster.
- connection
String String - Connection string for the cluster.
- host String
- Host address for the cluster.
- network
Type String - Network type. Currently, only
publicis supported.
- acls string[]
- List of IP addresses or CIDR blocks allowed to access the cluster.
- connection
String string - Connection string for the cluster.
- host string
- Host address for the cluster.
- network
Type string - Network type. Currently, only
publicis 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
publicis supported.
- acls List<String>
- List of IP addresses or CIDR blocks allowed to access the cluster.
- connection
String String - Connection string for the cluster.
- host String
- Host address for the cluster.
- network
Type String - Network type. Currently, only
publicis supported.
PostgresClusterPgConfig, PostgresClusterPgConfigArgs
- Version string
- PostgreSQL version. Possible values are
13,14, and15. - Pg
Conf string - PostgreSQL configuration in
key=valueformat, one per line. - Pooler
Mode string - Connection pooler mode. Possible values are
session,transaction, andstatement. If not set, connection pooler is not enabled. - Pooler
Type string - Connection pooler type. Currently, only
pgbounceris supported.
- Version string
- PostgreSQL version. Possible values are
13,14, and15. - Pg
Conf string - PostgreSQL configuration in
key=valueformat, one per line. - Pooler
Mode string - Connection pooler mode. Possible values are
session,transaction, andstatement. If not set, connection pooler is not enabled. - Pooler
Type string - Connection pooler type. Currently, only
pgbounceris supported.
- version String
- PostgreSQL version. Possible values are
13,14, and15. - pg
Conf String - PostgreSQL configuration in
key=valueformat, one per line. - pooler
Mode String - Connection pooler mode. Possible values are
session,transaction, andstatement. If not set, connection pooler is not enabled. - pooler
Type String - Connection pooler type. Currently, only
pgbounceris supported.
- version string
- PostgreSQL version. Possible values are
13,14, and15. - pg
Conf string - PostgreSQL configuration in
key=valueformat, one per line. - pooler
Mode string - Connection pooler mode. Possible values are
session,transaction, andstatement. If not set, connection pooler is not enabled. - pooler
Type string - Connection pooler type. Currently, only
pgbounceris supported.
- version str
- PostgreSQL version. Possible values are
13,14, and15. - pg_
conf str - PostgreSQL configuration in
key=valueformat, one per line. - pooler_
mode str - Connection pooler mode. Possible values are
session,transaction, andstatement. If not set, connection pooler is not enabled. - pooler_
type str - Connection pooler type. Currently, only
pgbounceris supported.
- version String
- PostgreSQL version. Possible values are
13,14, and15. - pg
Conf String - PostgreSQL configuration in
key=valueformat, one per line. - pooler
Mode String - Connection pooler mode. Possible values are
session,transaction, andstatement. If not set, connection pooler is not enabled. - pooler
Type String - Connection pooler type. Currently, only
pgbounceris supported.
PostgresClusterStorage, PostgresClusterStorageArgs
PostgresClusterTimeouts, PostgresClusterTimeoutsArgs
PostgresClusterUser, PostgresClusterUserArgs
- Name string
- User name.
- Role
Attributes List<string> - List of role attributes. Possible values are: BYPASSRLS, CREATEROLE, CREATEDB, INHERIT, LOGIN, NOLOGIN.
- Is
Secret boolRevealed - Whether the password for the default
postgresuser is revealed.
- Name string
- User name.
- Role
Attributes []string - List of role attributes. Possible values are: BYPASSRLS, CREATEROLE, CREATEDB, INHERIT, LOGIN, NOLOGIN.
- Is
Secret boolRevealed - Whether the password for the default
postgresuser is revealed.
- name String
- User name.
- role
Attributes List<String> - List of role attributes. Possible values are: BYPASSRLS, CREATEROLE, CREATEDB, INHERIT, LOGIN, NOLOGIN.
- is
Secret BooleanRevealed - Whether the password for the default
postgresuser is revealed.
- name string
- User name.
- role
Attributes string[] - List of role attributes. Possible values are: BYPASSRLS, CREATEROLE, CREATEDB, INHERIT, LOGIN, NOLOGIN.
- is
Secret booleanRevealed - Whether the password for the default
postgresuser 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_ boolrevealed - Whether the password for the default
postgresuser is revealed.
- name String
- User name.
- role
Attributes List<String> - List of role attributes. Possible values are: BYPASSRLS, CREATEROLE, CREATEDB, INHERIT, LOGIN, NOLOGIN.
- is
Secret BooleanRevealed - Whether the password for the default
postgresuser 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
gcoreTerraform Provider.
