vkcs.DbCluster
Explore with Pulumi AI
Provides a db cluster resource. This can be used to create, modify and delete db cluster for galera_mysql, postgresql, tarantool datastores.
Example Usage
Basic cluster
import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";
const pgCluster = new vkcs.DbCluster("pgCluster", {
availabilityZone: "GZ1",
datastore: {
type: "postgresql",
version: "16",
},
clusterSize: 3,
flavorId: data.vkcs_compute_flavor.basic.id,
cloudMonitoringEnabled: true,
volumeSize: 10,
volumeType: "ceph-ssd",
networks: [{
uuid: vkcs_networking_network.db.id,
}],
}, {
dependsOn: [vkcs_networking_router_interface.db],
});
const loadbalancer = vkcs.getLbLoadbalancerOutput({
id: pgCluster.loadbalancerId,
});
const loadbalancerPort = loadbalancer.apply(loadbalancer => vkcs.getNetworkingPortOutput({
id: loadbalancer.vipPortId,
}));
export const clusterIps = loadbalancerPort.apply(loadbalancerPort => loadbalancerPort.allFixedIps);
import pulumi
import pulumi_vkcs as vkcs
pg_cluster = vkcs.DbCluster("pgCluster",
availability_zone="GZ1",
datastore={
"type": "postgresql",
"version": "16",
},
cluster_size=3,
flavor_id=data["vkcs_compute_flavor"]["basic"]["id"],
cloud_monitoring_enabled=True,
volume_size=10,
volume_type="ceph-ssd",
networks=[{
"uuid": vkcs_networking_network["db"]["id"],
}],
opts = pulumi.ResourceOptions(depends_on=[vkcs_networking_router_interface["db"]]))
loadbalancer = vkcs.get_lb_loadbalancer_output(id=pg_cluster.loadbalancer_id)
loadbalancer_port = loadbalancer.apply(lambda loadbalancer: vkcs.get_networking_port_output(id=loadbalancer.vip_port_id))
pulumi.export("clusterIps", loadbalancer_port.all_fixed_ips)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
pgCluster, err := vkcs.NewDbCluster(ctx, "pgCluster", &vkcs.DbClusterArgs{
AvailabilityZone: pulumi.String("GZ1"),
Datastore: &vkcs.DbClusterDatastoreArgs{
Type: pulumi.String("postgresql"),
Version: pulumi.String("16"),
},
ClusterSize: pulumi.Float64(3),
FlavorId: pulumi.Any(data.Vkcs_compute_flavor.Basic.Id),
CloudMonitoringEnabled: pulumi.Bool(true),
VolumeSize: pulumi.Float64(10),
VolumeType: pulumi.String("ceph-ssd"),
Networks: vkcs.DbClusterNetworkArray{
&vkcs.DbClusterNetworkArgs{
Uuid: pulumi.Any(vkcs_networking_network.Db.Id),
},
},
}, pulumi.DependsOn([]pulumi.Resource{
vkcs_networking_router_interface.Db,
}))
if err != nil {
return err
}
loadbalancer := vkcs.LookupLbLoadbalancerOutput(ctx, vkcs.GetLbLoadbalancerOutputArgs{
Id: pgCluster.LoadbalancerId,
}, nil);
loadbalancerPort := loadbalancer.ApplyT(func(loadbalancer vkcs.GetLbLoadbalancerResult) (vkcs.GetNetworkingPortResult, error) {
return vkcs.GetNetworkingPortResult(interface{}(vkcs.LookupNetworkingPortOutput(ctx, vkcs.GetNetworkingPortOutputArgs{
Id: loadbalancer.VipPortId,
}, nil))), nil
}).(vkcs.GetNetworkingPortResultOutput)
ctx.Export("clusterIps", loadbalancerPort.ApplyT(func(loadbalancerPort vkcs.GetNetworkingPortResult) (interface{}, error) {
return loadbalancerPort.AllFixedIps, nil
}).(pulumi.Interface{}Output))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;
return await Deployment.RunAsync(() =>
{
var pgCluster = new Vkcs.DbCluster("pgCluster", new()
{
AvailabilityZone = "GZ1",
Datastore = new Vkcs.Inputs.DbClusterDatastoreArgs
{
Type = "postgresql",
Version = "16",
},
ClusterSize = 3,
FlavorId = data.Vkcs_compute_flavor.Basic.Id,
CloudMonitoringEnabled = true,
VolumeSize = 10,
VolumeType = "ceph-ssd",
Networks = new[]
{
new Vkcs.Inputs.DbClusterNetworkArgs
{
Uuid = vkcs_networking_network.Db.Id,
},
},
}, new CustomResourceOptions
{
DependsOn =
{
vkcs_networking_router_interface.Db,
},
});
var loadbalancer = Vkcs.GetLbLoadbalancer.Invoke(new()
{
Id = pgCluster.LoadbalancerId,
});
var loadbalancerPort = Vkcs.GetNetworkingPort.Invoke(new()
{
Id = loadbalancer.Apply(getLbLoadbalancerResult => getLbLoadbalancerResult.VipPortId),
});
return new Dictionary<string, object?>
{
["clusterIps"] = loadbalancerPort.Apply(getNetworkingPortResult => getNetworkingPortResult.AllFixedIps),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.DbCluster;
import com.pulumi.vkcs.DbClusterArgs;
import com.pulumi.vkcs.inputs.DbClusterDatastoreArgs;
import com.pulumi.vkcs.inputs.DbClusterNetworkArgs;
import com.pulumi.vkcs.VkcsFunctions;
import com.pulumi.vkcs.inputs.GetLbLoadbalancerArgs;
import com.pulumi.vkcs.inputs.GetNetworkingPortArgs;
import com.pulumi.resources.CustomResourceOptions;
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 pgCluster = new DbCluster("pgCluster", DbClusterArgs.builder()
.availabilityZone("GZ1")
.datastore(DbClusterDatastoreArgs.builder()
.type("postgresql")
.version("16")
.build())
.clusterSize(3)
.flavorId(data.vkcs_compute_flavor().basic().id())
.cloudMonitoringEnabled(true)
.volumeSize(10)
.volumeType("ceph-ssd")
.networks(DbClusterNetworkArgs.builder()
.uuid(vkcs_networking_network.db().id())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(vkcs_networking_router_interface.db())
.build());
final var loadbalancer = VkcsFunctions.getLbLoadbalancer(GetLbLoadbalancerArgs.builder()
.id(pgCluster.loadbalancerId())
.build());
final var loadbalancerPort = VkcsFunctions.getNetworkingPort(GetNetworkingPortArgs.builder()
.id(loadbalancer.applyValue(getLbLoadbalancerResult -> getLbLoadbalancerResult).applyValue(loadbalancer -> loadbalancer.applyValue(getLbLoadbalancerResult -> getLbLoadbalancerResult.vipPortId())))
.build());
ctx.export("clusterIps", loadbalancerPort.applyValue(getNetworkingPortResult -> getNetworkingPortResult).applyValue(loadbalancerPort -> loadbalancerPort.applyValue(getNetworkingPortResult -> getNetworkingPortResult.allFixedIps())));
}
}
resources:
pgCluster:
type: vkcs:DbCluster
properties:
availabilityZone: GZ1
datastore:
type: postgresql
version: '16'
clusterSize: 3
flavorId: ${data.vkcs_compute_flavor.basic.id}
cloudMonitoringEnabled: true
volumeSize: 10
volumeType: ceph-ssd
networks:
- uuid: ${vkcs_networking_network.db.id}
options:
dependsOn:
- ${vkcs_networking_router_interface.db}
variables:
loadbalancer:
fn::invoke:
function: vkcs:getLbLoadbalancer
arguments:
id: ${pgCluster.loadbalancerId}
loadbalancerPort:
fn::invoke:
function: vkcs:getNetworkingPort
arguments:
id: ${loadbalancer.vipPortId}
outputs:
clusterIps: ${loadbalancerPort.allFixedIps}
Cluster restored from backup
import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";
const mydbCluster = new vkcs.DbCluster("mydbCluster", {
clusterSize: 3,
datastore: {
type: "postgresql",
version: "16",
},
flavorId: "9e931469-1490-489e-88af-29a289681c53",
networks: [{
uuid: "3ee9b184-3311-4d85-840b-7a9c48e7beac",
}],
restorePoint: {
backupId: "backup_id",
},
volumeSize: 10,
volumeType: "ceph-ssd",
});
import pulumi
import pulumi_vkcs as vkcs
mydb_cluster = vkcs.DbCluster("mydbCluster",
cluster_size=3,
datastore={
"type": "postgresql",
"version": "16",
},
flavor_id="9e931469-1490-489e-88af-29a289681c53",
networks=[{
"uuid": "3ee9b184-3311-4d85-840b-7a9c48e7beac",
}],
restore_point={
"backup_id": "backup_id",
},
volume_size=10,
volume_type="ceph-ssd")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vkcs.NewDbCluster(ctx, "mydbCluster", &vkcs.DbClusterArgs{
ClusterSize: pulumi.Float64(3),
Datastore: &vkcs.DbClusterDatastoreArgs{
Type: pulumi.String("postgresql"),
Version: pulumi.String("16"),
},
FlavorId: pulumi.String("9e931469-1490-489e-88af-29a289681c53"),
Networks: vkcs.DbClusterNetworkArray{
&vkcs.DbClusterNetworkArgs{
Uuid: pulumi.String("3ee9b184-3311-4d85-840b-7a9c48e7beac"),
},
},
RestorePoint: &vkcs.DbClusterRestorePointArgs{
BackupId: pulumi.String("backup_id"),
},
VolumeSize: pulumi.Float64(10),
VolumeType: pulumi.String("ceph-ssd"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;
return await Deployment.RunAsync(() =>
{
var mydbCluster = new Vkcs.DbCluster("mydbCluster", new()
{
ClusterSize = 3,
Datastore = new Vkcs.Inputs.DbClusterDatastoreArgs
{
Type = "postgresql",
Version = "16",
},
FlavorId = "9e931469-1490-489e-88af-29a289681c53",
Networks = new[]
{
new Vkcs.Inputs.DbClusterNetworkArgs
{
Uuid = "3ee9b184-3311-4d85-840b-7a9c48e7beac",
},
},
RestorePoint = new Vkcs.Inputs.DbClusterRestorePointArgs
{
BackupId = "backup_id",
},
VolumeSize = 10,
VolumeType = "ceph-ssd",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.DbCluster;
import com.pulumi.vkcs.DbClusterArgs;
import com.pulumi.vkcs.inputs.DbClusterDatastoreArgs;
import com.pulumi.vkcs.inputs.DbClusterNetworkArgs;
import com.pulumi.vkcs.inputs.DbClusterRestorePointArgs;
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 mydbCluster = new DbCluster("mydbCluster", DbClusterArgs.builder()
.clusterSize(3)
.datastore(DbClusterDatastoreArgs.builder()
.type("postgresql")
.version("16")
.build())
.flavorId("9e931469-1490-489e-88af-29a289681c53")
.networks(DbClusterNetworkArgs.builder()
.uuid("3ee9b184-3311-4d85-840b-7a9c48e7beac")
.build())
.restorePoint(DbClusterRestorePointArgs.builder()
.backupId("backup_id")
.build())
.volumeSize(10)
.volumeType("ceph-ssd")
.build());
}
}
resources:
mydbCluster:
type: vkcs:DbCluster
properties:
clusterSize: 3
datastore:
type: postgresql
version: '16'
flavorId: 9e931469-1490-489e-88af-29a289681c53
networks:
- uuid: 3ee9b184-3311-4d85-840b-7a9c48e7beac
restorePoint:
backupId: backup_id
volumeSize: 10
volumeType: ceph-ssd
Cluster with scheduled PITR backup
import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";
const pgWithBackup = new vkcs.DbCluster("pgWithBackup", {
availabilityZone: "GZ1",
datastore: {
type: "postgresql",
version: "16",
},
clusterSize: 3,
flavorId: data.vkcs_compute_flavor.basic.id,
volumeSize: 10,
volumeType: "ceph-ssd",
networks: [{
uuid: vkcs_networking_network.db.id,
}],
backupSchedule: {
name: "three_hours_backup_tf_example",
startHours: 16,
startMinutes: 20,
intervalHours: 3,
keepCount: 3,
},
}, {
dependsOn: [vkcs_networking_router_interface.db],
});
import pulumi
import pulumi_vkcs as vkcs
pg_with_backup = vkcs.DbCluster("pgWithBackup",
availability_zone="GZ1",
datastore={
"type": "postgresql",
"version": "16",
},
cluster_size=3,
flavor_id=data["vkcs_compute_flavor"]["basic"]["id"],
volume_size=10,
volume_type="ceph-ssd",
networks=[{
"uuid": vkcs_networking_network["db"]["id"],
}],
backup_schedule={
"name": "three_hours_backup_tf_example",
"start_hours": 16,
"start_minutes": 20,
"interval_hours": 3,
"keep_count": 3,
},
opts = pulumi.ResourceOptions(depends_on=[vkcs_networking_router_interface["db"]]))
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vkcs.NewDbCluster(ctx, "pgWithBackup", &vkcs.DbClusterArgs{
AvailabilityZone: pulumi.String("GZ1"),
Datastore: &vkcs.DbClusterDatastoreArgs{
Type: pulumi.String("postgresql"),
Version: pulumi.String("16"),
},
ClusterSize: pulumi.Float64(3),
FlavorId: pulumi.Any(data.Vkcs_compute_flavor.Basic.Id),
VolumeSize: pulumi.Float64(10),
VolumeType: pulumi.String("ceph-ssd"),
Networks: vkcs.DbClusterNetworkArray{
&vkcs.DbClusterNetworkArgs{
Uuid: pulumi.Any(vkcs_networking_network.Db.Id),
},
},
BackupSchedule: &vkcs.DbClusterBackupScheduleArgs{
Name: pulumi.String("three_hours_backup_tf_example"),
StartHours: pulumi.Float64(16),
StartMinutes: pulumi.Float64(20),
IntervalHours: pulumi.Float64(3),
KeepCount: pulumi.Float64(3),
},
}, pulumi.DependsOn([]pulumi.Resource{
vkcs_networking_router_interface.Db,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;
return await Deployment.RunAsync(() =>
{
var pgWithBackup = new Vkcs.DbCluster("pgWithBackup", new()
{
AvailabilityZone = "GZ1",
Datastore = new Vkcs.Inputs.DbClusterDatastoreArgs
{
Type = "postgresql",
Version = "16",
},
ClusterSize = 3,
FlavorId = data.Vkcs_compute_flavor.Basic.Id,
VolumeSize = 10,
VolumeType = "ceph-ssd",
Networks = new[]
{
new Vkcs.Inputs.DbClusterNetworkArgs
{
Uuid = vkcs_networking_network.Db.Id,
},
},
BackupSchedule = new Vkcs.Inputs.DbClusterBackupScheduleArgs
{
Name = "three_hours_backup_tf_example",
StartHours = 16,
StartMinutes = 20,
IntervalHours = 3,
KeepCount = 3,
},
}, new CustomResourceOptions
{
DependsOn =
{
vkcs_networking_router_interface.Db,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.DbCluster;
import com.pulumi.vkcs.DbClusterArgs;
import com.pulumi.vkcs.inputs.DbClusterDatastoreArgs;
import com.pulumi.vkcs.inputs.DbClusterNetworkArgs;
import com.pulumi.vkcs.inputs.DbClusterBackupScheduleArgs;
import com.pulumi.resources.CustomResourceOptions;
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 pgWithBackup = new DbCluster("pgWithBackup", DbClusterArgs.builder()
.availabilityZone("GZ1")
.datastore(DbClusterDatastoreArgs.builder()
.type("postgresql")
.version("16")
.build())
.clusterSize(3)
.flavorId(data.vkcs_compute_flavor().basic().id())
.volumeSize(10)
.volumeType("ceph-ssd")
.networks(DbClusterNetworkArgs.builder()
.uuid(vkcs_networking_network.db().id())
.build())
.backupSchedule(DbClusterBackupScheduleArgs.builder()
.name("three_hours_backup_tf_example")
.startHours(16)
.startMinutes(20)
.intervalHours(3)
.keepCount(3)
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(vkcs_networking_router_interface.db())
.build());
}
}
resources:
pgWithBackup:
type: vkcs:DbCluster
properties:
availabilityZone: GZ1
datastore:
type: postgresql
version: '16'
clusterSize: 3
flavorId: ${data.vkcs_compute_flavor.basic.id}
volumeSize: 10
volumeType: ceph-ssd
networks:
- uuid: ${vkcs_networking_network.db.id}
backupSchedule:
name: three_hours_backup_tf_example
startHours: 16
startMinutes: 20
intervalHours: 3
keepCount: 3
options:
dependsOn:
- ${vkcs_networking_router_interface.db}
Multi-zone PostgreSQL cluster
In order to improve reliability and fault tolerance, you can set up a cluster in multiple availability zones. To achieve this, use the specific datastore combined with list of availability zones to deploy into. To get the cluster IP address, use the “vrrp_port_id” attribute.
import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";
const cluster = new vkcs.DbCluster("cluster", {
availabilityZones: [
"GZ1",
"MS1",
],
clusterSize: 3,
flavorId: data.vkcs_compute_flavor.basic.id,
volumeSize: 10,
volumeType: "ceph-ssd",
datastore: {
version: "16",
type: "postgresql_multiaz",
},
networks: [{
uuid: vkcs_networking_network.db.id,
}],
}, {
dependsOn: [vkcs_networking_router_interface.db],
});
const vrrpPort = vkcs.getNetworkingPortOutput({
id: cluster.vrrpPortId,
});
export const clusterIp = vrrpPort.apply(vrrpPort => vrrpPort.allFixedIps?.[0]);
import pulumi
import pulumi_vkcs as vkcs
cluster = vkcs.DbCluster("cluster",
availability_zones=[
"GZ1",
"MS1",
],
cluster_size=3,
flavor_id=data["vkcs_compute_flavor"]["basic"]["id"],
volume_size=10,
volume_type="ceph-ssd",
datastore={
"version": "16",
"type": "postgresql_multiaz",
},
networks=[{
"uuid": vkcs_networking_network["db"]["id"],
}],
opts = pulumi.ResourceOptions(depends_on=[vkcs_networking_router_interface["db"]]))
vrrp_port = vkcs.get_networking_port_output(id=cluster.vrrp_port_id)
pulumi.export("clusterIp", vrrp_port.all_fixed_ips[0])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cluster, err := vkcs.NewDbCluster(ctx, "cluster", &vkcs.DbClusterArgs{
AvailabilityZones: pulumi.StringArray{
pulumi.String("GZ1"),
pulumi.String("MS1"),
},
ClusterSize: pulumi.Float64(3),
FlavorId: pulumi.Any(data.Vkcs_compute_flavor.Basic.Id),
VolumeSize: pulumi.Float64(10),
VolumeType: pulumi.String("ceph-ssd"),
Datastore: &vkcs.DbClusterDatastoreArgs{
Version: pulumi.String("16"),
Type: pulumi.String("postgresql_multiaz"),
},
Networks: vkcs.DbClusterNetworkArray{
&vkcs.DbClusterNetworkArgs{
Uuid: pulumi.Any(vkcs_networking_network.Db.Id),
},
},
}, pulumi.DependsOn([]pulumi.Resource{
vkcs_networking_router_interface.Db,
}))
if err != nil {
return err
}
vrrpPort := vkcs.LookupNetworkingPortOutput(ctx, vkcs.GetNetworkingPortOutputArgs{
Id: cluster.VrrpPortId,
}, nil)
ctx.Export("clusterIp", vrrpPort.ApplyT(func(vrrpPort vkcs.GetNetworkingPortResult) (*string, error) {
return &vrrpPort.AllFixedIps[0], nil
}).(pulumi.StringPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;
return await Deployment.RunAsync(() =>
{
var cluster = new Vkcs.DbCluster("cluster", new()
{
AvailabilityZones = new[]
{
"GZ1",
"MS1",
},
ClusterSize = 3,
FlavorId = data.Vkcs_compute_flavor.Basic.Id,
VolumeSize = 10,
VolumeType = "ceph-ssd",
Datastore = new Vkcs.Inputs.DbClusterDatastoreArgs
{
Version = "16",
Type = "postgresql_multiaz",
},
Networks = new[]
{
new Vkcs.Inputs.DbClusterNetworkArgs
{
Uuid = vkcs_networking_network.Db.Id,
},
},
}, new CustomResourceOptions
{
DependsOn =
{
vkcs_networking_router_interface.Db,
},
});
var vrrpPort = Vkcs.GetNetworkingPort.Invoke(new()
{
Id = cluster.VrrpPortId,
});
return new Dictionary<string, object?>
{
["clusterIp"] = vrrpPort.Apply(getNetworkingPortResult => getNetworkingPortResult.AllFixedIps[0]),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.DbCluster;
import com.pulumi.vkcs.DbClusterArgs;
import com.pulumi.vkcs.inputs.DbClusterDatastoreArgs;
import com.pulumi.vkcs.inputs.DbClusterNetworkArgs;
import com.pulumi.vkcs.VkcsFunctions;
import com.pulumi.vkcs.inputs.GetNetworkingPortArgs;
import com.pulumi.resources.CustomResourceOptions;
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 cluster = new DbCluster("cluster", DbClusterArgs.builder()
.availabilityZones(
"GZ1",
"MS1")
.clusterSize(3)
.flavorId(data.vkcs_compute_flavor().basic().id())
.volumeSize(10)
.volumeType("ceph-ssd")
.datastore(DbClusterDatastoreArgs.builder()
.version("16")
.type("postgresql_multiaz")
.build())
.networks(DbClusterNetworkArgs.builder()
.uuid(vkcs_networking_network.db().id())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(vkcs_networking_router_interface.db())
.build());
final var vrrpPort = VkcsFunctions.getNetworkingPort(GetNetworkingPortArgs.builder()
.id(cluster.vrrpPortId())
.build());
ctx.export("clusterIp", vrrpPort.applyValue(getNetworkingPortResult -> getNetworkingPortResult).applyValue(vrrpPort -> vrrpPort.applyValue(getNetworkingPortResult -> getNetworkingPortResult.allFixedIps()[0])));
}
}
resources:
cluster:
type: vkcs:DbCluster
properties:
availabilityZones:
- GZ1
- MS1
clusterSize: 3
flavorId: ${data.vkcs_compute_flavor.basic.id}
volumeSize: 10
volumeType: ceph-ssd
datastore:
version: '16'
type: postgresql_multiaz
networks:
- uuid: ${vkcs_networking_network.db.id}
options:
dependsOn:
- ${vkcs_networking_router_interface.db}
variables:
vrrpPort:
fn::invoke:
function: vkcs:getNetworkingPort
arguments:
id: ${cluster.vrrpPortId}
outputs:
clusterIp: ${vrrpPort.allFixedIps[0]}
Create DbCluster Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DbCluster(name: string, args: DbClusterArgs, opts?: CustomResourceOptions);
@overload
def DbCluster(resource_name: str,
args: DbClusterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DbCluster(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_size: Optional[float] = None,
volume_type: Optional[str] = None,
volume_size: Optional[float] = None,
flavor_id: Optional[str] = None,
datastore: Optional[DbClusterDatastoreArgs] = None,
keypair: Optional[str] = None,
restore_point: Optional[DbClusterRestorePointArgs] = None,
cloud_monitoring_enabled: Optional[bool] = None,
db_cluster_id: Optional[str] = None,
disk_autoexpand: Optional[DbClusterDiskAutoexpandArgs] = None,
capabilities: Optional[Sequence[DbClusterCapabilityArgs]] = None,
floating_ip_enabled: Optional[bool] = None,
availability_zone: Optional[str] = None,
name: Optional[str] = None,
networks: Optional[Sequence[DbClusterNetworkArgs]] = None,
region: Optional[str] = None,
configuration_id: Optional[str] = None,
root_enabled: Optional[bool] = None,
root_password: Optional[str] = None,
shrink_options: Optional[Sequence[str]] = None,
timeouts: Optional[DbClusterTimeoutsArgs] = None,
vendor_options: Optional[DbClusterVendorOptionsArgs] = None,
backup_schedule: Optional[DbClusterBackupScheduleArgs] = None,
availability_zones: Optional[Sequence[str]] = None,
wal_disk_autoexpand: Optional[DbClusterWalDiskAutoexpandArgs] = None,
wal_volumes: Optional[Sequence[DbClusterWalVolumeArgs]] = None)
func NewDbCluster(ctx *Context, name string, args DbClusterArgs, opts ...ResourceOption) (*DbCluster, error)
public DbCluster(string name, DbClusterArgs args, CustomResourceOptions? opts = null)
public DbCluster(String name, DbClusterArgs args)
public DbCluster(String name, DbClusterArgs args, CustomResourceOptions options)
type: vkcs:DbCluster
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 DbClusterArgs
- 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 DbClusterArgs
- 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 DbClusterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DbClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DbClusterArgs
- 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 dbClusterResource = new Vkcs.DbCluster("dbClusterResource", new()
{
ClusterSize = 0,
VolumeType = "string",
VolumeSize = 0,
FlavorId = "string",
Datastore = new Vkcs.Inputs.DbClusterDatastoreArgs
{
Type = "string",
Version = "string",
},
Keypair = "string",
RestorePoint = new Vkcs.Inputs.DbClusterRestorePointArgs
{
BackupId = "string",
Target = "string",
},
CloudMonitoringEnabled = false,
DbClusterId = "string",
DiskAutoexpand = new Vkcs.Inputs.DbClusterDiskAutoexpandArgs
{
Autoexpand = false,
MaxDiskSize = 0,
},
Capabilities = new[]
{
new Vkcs.Inputs.DbClusterCapabilityArgs
{
Name = "string",
Settings =
{
{ "string", "string" },
},
},
},
FloatingIpEnabled = false,
AvailabilityZone = "string",
Name = "string",
Networks = new[]
{
new Vkcs.Inputs.DbClusterNetworkArgs
{
SecurityGroups = new[]
{
"string",
},
SubnetId = "string",
Uuid = "string",
},
},
Region = "string",
ConfigurationId = "string",
RootEnabled = false,
RootPassword = "string",
ShrinkOptions = new[]
{
"string",
},
Timeouts = new Vkcs.Inputs.DbClusterTimeoutsArgs
{
Create = "string",
Delete = "string",
},
VendorOptions = new Vkcs.Inputs.DbClusterVendorOptionsArgs
{
RestartConfirmed = false,
},
BackupSchedule = new Vkcs.Inputs.DbClusterBackupScheduleArgs
{
IntervalHours = 0,
KeepCount = 0,
Name = "string",
StartHours = 0,
StartMinutes = 0,
},
AvailabilityZones = new[]
{
"string",
},
WalDiskAutoexpand = new Vkcs.Inputs.DbClusterWalDiskAutoexpandArgs
{
Autoexpand = false,
MaxDiskSize = 0,
},
WalVolumes = new[]
{
new Vkcs.Inputs.DbClusterWalVolumeArgs
{
Size = 0,
VolumeType = "string",
},
},
});
example, err := vkcs.NewDbCluster(ctx, "dbClusterResource", &vkcs.DbClusterArgs{
ClusterSize: pulumi.Float64(0),
VolumeType: pulumi.String("string"),
VolumeSize: pulumi.Float64(0),
FlavorId: pulumi.String("string"),
Datastore: &vkcs.DbClusterDatastoreArgs{
Type: pulumi.String("string"),
Version: pulumi.String("string"),
},
Keypair: pulumi.String("string"),
RestorePoint: &vkcs.DbClusterRestorePointArgs{
BackupId: pulumi.String("string"),
Target: pulumi.String("string"),
},
CloudMonitoringEnabled: pulumi.Bool(false),
DbClusterId: pulumi.String("string"),
DiskAutoexpand: &vkcs.DbClusterDiskAutoexpandArgs{
Autoexpand: pulumi.Bool(false),
MaxDiskSize: pulumi.Float64(0),
},
Capabilities: vkcs.DbClusterCapabilityArray{
&vkcs.DbClusterCapabilityArgs{
Name: pulumi.String("string"),
Settings: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
},
FloatingIpEnabled: pulumi.Bool(false),
AvailabilityZone: pulumi.String("string"),
Name: pulumi.String("string"),
Networks: vkcs.DbClusterNetworkArray{
&vkcs.DbClusterNetworkArgs{
SecurityGroups: pulumi.StringArray{
pulumi.String("string"),
},
SubnetId: pulumi.String("string"),
Uuid: pulumi.String("string"),
},
},
Region: pulumi.String("string"),
ConfigurationId: pulumi.String("string"),
RootEnabled: pulumi.Bool(false),
RootPassword: pulumi.String("string"),
ShrinkOptions: pulumi.StringArray{
pulumi.String("string"),
},
Timeouts: &vkcs.DbClusterTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
VendorOptions: &vkcs.DbClusterVendorOptionsArgs{
RestartConfirmed: pulumi.Bool(false),
},
BackupSchedule: &vkcs.DbClusterBackupScheduleArgs{
IntervalHours: pulumi.Float64(0),
KeepCount: pulumi.Float64(0),
Name: pulumi.String("string"),
StartHours: pulumi.Float64(0),
StartMinutes: pulumi.Float64(0),
},
AvailabilityZones: pulumi.StringArray{
pulumi.String("string"),
},
WalDiskAutoexpand: &vkcs.DbClusterWalDiskAutoexpandArgs{
Autoexpand: pulumi.Bool(false),
MaxDiskSize: pulumi.Float64(0),
},
WalVolumes: vkcs.DbClusterWalVolumeArray{
&vkcs.DbClusterWalVolumeArgs{
Size: pulumi.Float64(0),
VolumeType: pulumi.String("string"),
},
},
})
var dbClusterResource = new DbCluster("dbClusterResource", DbClusterArgs.builder()
.clusterSize(0)
.volumeType("string")
.volumeSize(0)
.flavorId("string")
.datastore(DbClusterDatastoreArgs.builder()
.type("string")
.version("string")
.build())
.keypair("string")
.restorePoint(DbClusterRestorePointArgs.builder()
.backupId("string")
.target("string")
.build())
.cloudMonitoringEnabled(false)
.dbClusterId("string")
.diskAutoexpand(DbClusterDiskAutoexpandArgs.builder()
.autoexpand(false)
.maxDiskSize(0)
.build())
.capabilities(DbClusterCapabilityArgs.builder()
.name("string")
.settings(Map.of("string", "string"))
.build())
.floatingIpEnabled(false)
.availabilityZone("string")
.name("string")
.networks(DbClusterNetworkArgs.builder()
.securityGroups("string")
.subnetId("string")
.uuid("string")
.build())
.region("string")
.configurationId("string")
.rootEnabled(false)
.rootPassword("string")
.shrinkOptions("string")
.timeouts(DbClusterTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.vendorOptions(DbClusterVendorOptionsArgs.builder()
.restartConfirmed(false)
.build())
.backupSchedule(DbClusterBackupScheduleArgs.builder()
.intervalHours(0)
.keepCount(0)
.name("string")
.startHours(0)
.startMinutes(0)
.build())
.availabilityZones("string")
.walDiskAutoexpand(DbClusterWalDiskAutoexpandArgs.builder()
.autoexpand(false)
.maxDiskSize(0)
.build())
.walVolumes(DbClusterWalVolumeArgs.builder()
.size(0)
.volumeType("string")
.build())
.build());
db_cluster_resource = vkcs.DbCluster("dbClusterResource",
cluster_size=0,
volume_type="string",
volume_size=0,
flavor_id="string",
datastore={
"type": "string",
"version": "string",
},
keypair="string",
restore_point={
"backup_id": "string",
"target": "string",
},
cloud_monitoring_enabled=False,
db_cluster_id="string",
disk_autoexpand={
"autoexpand": False,
"max_disk_size": 0,
},
capabilities=[{
"name": "string",
"settings": {
"string": "string",
},
}],
floating_ip_enabled=False,
availability_zone="string",
name="string",
networks=[{
"security_groups": ["string"],
"subnet_id": "string",
"uuid": "string",
}],
region="string",
configuration_id="string",
root_enabled=False,
root_password="string",
shrink_options=["string"],
timeouts={
"create": "string",
"delete": "string",
},
vendor_options={
"restart_confirmed": False,
},
backup_schedule={
"interval_hours": 0,
"keep_count": 0,
"name": "string",
"start_hours": 0,
"start_minutes": 0,
},
availability_zones=["string"],
wal_disk_autoexpand={
"autoexpand": False,
"max_disk_size": 0,
},
wal_volumes=[{
"size": 0,
"volume_type": "string",
}])
const dbClusterResource = new vkcs.DbCluster("dbClusterResource", {
clusterSize: 0,
volumeType: "string",
volumeSize: 0,
flavorId: "string",
datastore: {
type: "string",
version: "string",
},
keypair: "string",
restorePoint: {
backupId: "string",
target: "string",
},
cloudMonitoringEnabled: false,
dbClusterId: "string",
diskAutoexpand: {
autoexpand: false,
maxDiskSize: 0,
},
capabilities: [{
name: "string",
settings: {
string: "string",
},
}],
floatingIpEnabled: false,
availabilityZone: "string",
name: "string",
networks: [{
securityGroups: ["string"],
subnetId: "string",
uuid: "string",
}],
region: "string",
configurationId: "string",
rootEnabled: false,
rootPassword: "string",
shrinkOptions: ["string"],
timeouts: {
create: "string",
"delete": "string",
},
vendorOptions: {
restartConfirmed: false,
},
backupSchedule: {
intervalHours: 0,
keepCount: 0,
name: "string",
startHours: 0,
startMinutes: 0,
},
availabilityZones: ["string"],
walDiskAutoexpand: {
autoexpand: false,
maxDiskSize: 0,
},
walVolumes: [{
size: 0,
volumeType: "string",
}],
});
type: vkcs:DbCluster
properties:
availabilityZone: string
availabilityZones:
- string
backupSchedule:
intervalHours: 0
keepCount: 0
name: string
startHours: 0
startMinutes: 0
capabilities:
- name: string
settings:
string: string
cloudMonitoringEnabled: false
clusterSize: 0
configurationId: string
datastore:
type: string
version: string
dbClusterId: string
diskAutoexpand:
autoexpand: false
maxDiskSize: 0
flavorId: string
floatingIpEnabled: false
keypair: string
name: string
networks:
- securityGroups:
- string
subnetId: string
uuid: string
region: string
restorePoint:
backupId: string
target: string
rootEnabled: false
rootPassword: string
shrinkOptions:
- string
timeouts:
create: string
delete: string
vendorOptions:
restartConfirmed: false
volumeSize: 0
volumeType: string
walDiskAutoexpand:
autoexpand: false
maxDiskSize: 0
walVolumes:
- size: 0
volumeType: string
DbCluster 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 DbCluster resource accepts the following input properties:
- Cluster
Size double - required number → The number of instances in the cluster.
- Datastore
Db
Cluster Datastore - required → Object that represents datastore of the cluster. Changing this creates a new cluster.
- Flavor
Id string - required string → The ID of flavor for the cluster.
- Volume
Size double - required number → Size of the cluster instance volume.
- Volume
Type string - required string → The type of the cluster instance volume. Changing this creates a new cluster.
- Availability
Zone string - optional string → The name of the availability zone of the cluster. Changing this creates a new cluster.
- Availability
Zones List<string> - optional string → The names of availability zones for the cluster. Changing this creates a new cluster. Note: Only available in multi-AZ configurationsNew since v0.9.3.
- Backup
Schedule DbCluster Backup Schedule - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- Capabilities
List<Db
Cluster Capability> - optional → Object that represents capability applied to cluster. There can be several instances of this object.
- Cloud
Monitoring boolEnabled - optional boolean → Enable cloud monitoring for the cluster. Changing this for Redis or MongoDB creates a new instance.New since v0.2.0.
- Configuration
Id string - optional string → The id of the configuration attached to cluster.
- Db
Cluster stringId - string → ID of the resource.
- Disk
Autoexpand DbCluster Disk Autoexpand - optional → Object that represents autoresize properties of the cluster.
- Floating
Ip boolEnabled - optional boolean → Indicates whether floating ip is created for cluster. Changing this creates a new cluster.
- Keypair string
- optional string → Name of the keypair to be attached to cluster. Changing this creates a new cluster.
- Name string
- required string → The name of the cluster. Changing this creates a new cluster.
- Networks
List<Db
Cluster Network> - optional → Object that represents network of the cluster. Changing this creates a new cluster.
- Region string
- optional string → Region to create resource in.
- Restore
Point DbCluster Restore Point - optional → Object that represents backup to restore cluster from.New since v0.1.4.
- Root
Enabled bool - optional boolean → Indicates whether root user is enabled for the cluster.
- Root
Password string - optional sensitive string → Password for the root user of the cluster. When enabling root, password is autogenerated, use this field to obtain it.
- Shrink
Options List<string> - optional string → Used only for shrinking cluster. List of IDs of instances that should remain after shrink. If no options are supplied, shrink operation will choose first non-leader instance to delete.
- Timeouts
Db
Cluster Timeouts - Vendor
Options DbCluster Vendor Options - optional → Map of additional vendor-specific options. Supported options are described below.New since v0.4.0.
- Wal
Disk DbAutoexpand Cluster Wal Disk Autoexpand - optional → Object that represents autoresize properties of wal volume of the cluster.
- Wal
Volumes List<DbCluster Wal Volume> - optional → Object that represents wal volume of the cluster. Changing this creates a new cluster.
- Cluster
Size float64 - required number → The number of instances in the cluster.
- Datastore
Db
Cluster Datastore Args - required → Object that represents datastore of the cluster. Changing this creates a new cluster.
- Flavor
Id string - required string → The ID of flavor for the cluster.
- Volume
Size float64 - required number → Size of the cluster instance volume.
- Volume
Type string - required string → The type of the cluster instance volume. Changing this creates a new cluster.
- Availability
Zone string - optional string → The name of the availability zone of the cluster. Changing this creates a new cluster.
- Availability
Zones []string - optional string → The names of availability zones for the cluster. Changing this creates a new cluster. Note: Only available in multi-AZ configurationsNew since v0.9.3.
- Backup
Schedule DbCluster Backup Schedule Args - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- Capabilities
[]Db
Cluster Capability Args - optional → Object that represents capability applied to cluster. There can be several instances of this object.
- Cloud
Monitoring boolEnabled - optional boolean → Enable cloud monitoring for the cluster. Changing this for Redis or MongoDB creates a new instance.New since v0.2.0.
- Configuration
Id string - optional string → The id of the configuration attached to cluster.
- Db
Cluster stringId - string → ID of the resource.
- Disk
Autoexpand DbCluster Disk Autoexpand Args - optional → Object that represents autoresize properties of the cluster.
- Floating
Ip boolEnabled - optional boolean → Indicates whether floating ip is created for cluster. Changing this creates a new cluster.
- Keypair string
- optional string → Name of the keypair to be attached to cluster. Changing this creates a new cluster.
- Name string
- required string → The name of the cluster. Changing this creates a new cluster.
- Networks
[]Db
Cluster Network Args - optional → Object that represents network of the cluster. Changing this creates a new cluster.
- Region string
- optional string → Region to create resource in.
- Restore
Point DbCluster Restore Point Args - optional → Object that represents backup to restore cluster from.New since v0.1.4.
- Root
Enabled bool - optional boolean → Indicates whether root user is enabled for the cluster.
- Root
Password string - optional sensitive string → Password for the root user of the cluster. When enabling root, password is autogenerated, use this field to obtain it.
- Shrink
Options []string - optional string → Used only for shrinking cluster. List of IDs of instances that should remain after shrink. If no options are supplied, shrink operation will choose first non-leader instance to delete.
- Timeouts
Db
Cluster Timeouts Args - Vendor
Options DbCluster Vendor Options Args - optional → Map of additional vendor-specific options. Supported options are described below.New since v0.4.0.
- Wal
Disk DbAutoexpand Cluster Wal Disk Autoexpand Args - optional → Object that represents autoresize properties of wal volume of the cluster.
- Wal
Volumes []DbCluster Wal Volume Args - optional → Object that represents wal volume of the cluster. Changing this creates a new cluster.
- cluster
Size Double - required number → The number of instances in the cluster.
- datastore
Db
Cluster Datastore - required → Object that represents datastore of the cluster. Changing this creates a new cluster.
- flavor
Id String - required string → The ID of flavor for the cluster.
- volume
Size Double - required number → Size of the cluster instance volume.
- volume
Type String - required string → The type of the cluster instance volume. Changing this creates a new cluster.
- availability
Zone String - optional string → The name of the availability zone of the cluster. Changing this creates a new cluster.
- availability
Zones List<String> - optional string → The names of availability zones for the cluster. Changing this creates a new cluster. Note: Only available in multi-AZ configurationsNew since v0.9.3.
- backup
Schedule DbCluster Backup Schedule - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- capabilities
List<Db
Cluster Capability> - optional → Object that represents capability applied to cluster. There can be several instances of this object.
- cloud
Monitoring BooleanEnabled - optional boolean → Enable cloud monitoring for the cluster. Changing this for Redis or MongoDB creates a new instance.New since v0.2.0.
- configuration
Id String - optional string → The id of the configuration attached to cluster.
- db
Cluster StringId - string → ID of the resource.
- disk
Autoexpand DbCluster Disk Autoexpand - optional → Object that represents autoresize properties of the cluster.
- floating
Ip BooleanEnabled - optional boolean → Indicates whether floating ip is created for cluster. Changing this creates a new cluster.
- keypair String
- optional string → Name of the keypair to be attached to cluster. Changing this creates a new cluster.
- name String
- required string → The name of the cluster. Changing this creates a new cluster.
- networks
List<Db
Cluster Network> - optional → Object that represents network of the cluster. Changing this creates a new cluster.
- region String
- optional string → Region to create resource in.
- restore
Point DbCluster Restore Point - optional → Object that represents backup to restore cluster from.New since v0.1.4.
- root
Enabled Boolean - optional boolean → Indicates whether root user is enabled for the cluster.
- root
Password String - optional sensitive string → Password for the root user of the cluster. When enabling root, password is autogenerated, use this field to obtain it.
- shrink
Options List<String> - optional string → Used only for shrinking cluster. List of IDs of instances that should remain after shrink. If no options are supplied, shrink operation will choose first non-leader instance to delete.
- timeouts
Db
Cluster Timeouts - vendor
Options DbCluster Vendor Options - optional → Map of additional vendor-specific options. Supported options are described below.New since v0.4.0.
- wal
Disk DbAutoexpand Cluster Wal Disk Autoexpand - optional → Object that represents autoresize properties of wal volume of the cluster.
- wal
Volumes List<DbCluster Wal Volume> - optional → Object that represents wal volume of the cluster. Changing this creates a new cluster.
- cluster
Size number - required number → The number of instances in the cluster.
- datastore
Db
Cluster Datastore - required → Object that represents datastore of the cluster. Changing this creates a new cluster.
- flavor
Id string - required string → The ID of flavor for the cluster.
- volume
Size number - required number → Size of the cluster instance volume.
- volume
Type string - required string → The type of the cluster instance volume. Changing this creates a new cluster.
- availability
Zone string - optional string → The name of the availability zone of the cluster. Changing this creates a new cluster.
- availability
Zones string[] - optional string → The names of availability zones for the cluster. Changing this creates a new cluster. Note: Only available in multi-AZ configurationsNew since v0.9.3.
- backup
Schedule DbCluster Backup Schedule - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- capabilities
Db
Cluster Capability[] - optional → Object that represents capability applied to cluster. There can be several instances of this object.
- cloud
Monitoring booleanEnabled - optional boolean → Enable cloud monitoring for the cluster. Changing this for Redis or MongoDB creates a new instance.New since v0.2.0.
- configuration
Id string - optional string → The id of the configuration attached to cluster.
- db
Cluster stringId - string → ID of the resource.
- disk
Autoexpand DbCluster Disk Autoexpand - optional → Object that represents autoresize properties of the cluster.
- floating
Ip booleanEnabled - optional boolean → Indicates whether floating ip is created for cluster. Changing this creates a new cluster.
- keypair string
- optional string → Name of the keypair to be attached to cluster. Changing this creates a new cluster.
- name string
- required string → The name of the cluster. Changing this creates a new cluster.
- networks
Db
Cluster Network[] - optional → Object that represents network of the cluster. Changing this creates a new cluster.
- region string
- optional string → Region to create resource in.
- restore
Point DbCluster Restore Point - optional → Object that represents backup to restore cluster from.New since v0.1.4.
- root
Enabled boolean - optional boolean → Indicates whether root user is enabled for the cluster.
- root
Password string - optional sensitive string → Password for the root user of the cluster. When enabling root, password is autogenerated, use this field to obtain it.
- shrink
Options string[] - optional string → Used only for shrinking cluster. List of IDs of instances that should remain after shrink. If no options are supplied, shrink operation will choose first non-leader instance to delete.
- timeouts
Db
Cluster Timeouts - vendor
Options DbCluster Vendor Options - optional → Map of additional vendor-specific options. Supported options are described below.New since v0.4.0.
- wal
Disk DbAutoexpand Cluster Wal Disk Autoexpand - optional → Object that represents autoresize properties of wal volume of the cluster.
- wal
Volumes DbCluster Wal Volume[] - optional → Object that represents wal volume of the cluster. Changing this creates a new cluster.
- cluster_
size float - required number → The number of instances in the cluster.
- datastore
Db
Cluster Datastore Args - required → Object that represents datastore of the cluster. Changing this creates a new cluster.
- flavor_
id str - required string → The ID of flavor for the cluster.
- volume_
size float - required number → Size of the cluster instance volume.
- volume_
type str - required string → The type of the cluster instance volume. Changing this creates a new cluster.
- availability_
zone str - optional string → The name of the availability zone of the cluster. Changing this creates a new cluster.
- availability_
zones Sequence[str] - optional string → The names of availability zones for the cluster. Changing this creates a new cluster. Note: Only available in multi-AZ configurationsNew since v0.9.3.
- backup_
schedule DbCluster Backup Schedule Args - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- capabilities
Sequence[Db
Cluster Capability Args] - optional → Object that represents capability applied to cluster. There can be several instances of this object.
- cloud_
monitoring_ boolenabled - optional boolean → Enable cloud monitoring for the cluster. Changing this for Redis or MongoDB creates a new instance.New since v0.2.0.
- configuration_
id str - optional string → The id of the configuration attached to cluster.
- db_
cluster_ strid - string → ID of the resource.
- disk_
autoexpand DbCluster Disk Autoexpand Args - optional → Object that represents autoresize properties of the cluster.
- floating_
ip_ boolenabled - optional boolean → Indicates whether floating ip is created for cluster. Changing this creates a new cluster.
- keypair str
- optional string → Name of the keypair to be attached to cluster. Changing this creates a new cluster.
- name str
- required string → The name of the cluster. Changing this creates a new cluster.
- networks
Sequence[Db
Cluster Network Args] - optional → Object that represents network of the cluster. Changing this creates a new cluster.
- region str
- optional string → Region to create resource in.
- restore_
point DbCluster Restore Point Args - optional → Object that represents backup to restore cluster from.New since v0.1.4.
- root_
enabled bool - optional boolean → Indicates whether root user is enabled for the cluster.
- root_
password str - optional sensitive string → Password for the root user of the cluster. When enabling root, password is autogenerated, use this field to obtain it.
- shrink_
options Sequence[str] - optional string → Used only for shrinking cluster. List of IDs of instances that should remain after shrink. If no options are supplied, shrink operation will choose first non-leader instance to delete.
- timeouts
Db
Cluster Timeouts Args - vendor_
options DbCluster Vendor Options Args - optional → Map of additional vendor-specific options. Supported options are described below.New since v0.4.0.
- wal_
disk_ Dbautoexpand Cluster Wal Disk Autoexpand Args - optional → Object that represents autoresize properties of wal volume of the cluster.
- wal_
volumes Sequence[DbCluster Wal Volume Args] - optional → Object that represents wal volume of the cluster. Changing this creates a new cluster.
- cluster
Size Number - required number → The number of instances in the cluster.
- datastore Property Map
- required → Object that represents datastore of the cluster. Changing this creates a new cluster.
- flavor
Id String - required string → The ID of flavor for the cluster.
- volume
Size Number - required number → Size of the cluster instance volume.
- volume
Type String - required string → The type of the cluster instance volume. Changing this creates a new cluster.
- availability
Zone String - optional string → The name of the availability zone of the cluster. Changing this creates a new cluster.
- availability
Zones List<String> - optional string → The names of availability zones for the cluster. Changing this creates a new cluster. Note: Only available in multi-AZ configurationsNew since v0.9.3.
- backup
Schedule Property Map - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- capabilities List<Property Map>
- optional → Object that represents capability applied to cluster. There can be several instances of this object.
- cloud
Monitoring BooleanEnabled - optional boolean → Enable cloud monitoring for the cluster. Changing this for Redis or MongoDB creates a new instance.New since v0.2.0.
- configuration
Id String - optional string → The id of the configuration attached to cluster.
- db
Cluster StringId - string → ID of the resource.
- disk
Autoexpand Property Map - optional → Object that represents autoresize properties of the cluster.
- floating
Ip BooleanEnabled - optional boolean → Indicates whether floating ip is created for cluster. Changing this creates a new cluster.
- keypair String
- optional string → Name of the keypair to be attached to cluster. Changing this creates a new cluster.
- name String
- required string → The name of the cluster. Changing this creates a new cluster.
- networks List<Property Map>
- optional → Object that represents network of the cluster. Changing this creates a new cluster.
- region String
- optional string → Region to create resource in.
- restore
Point Property Map - optional → Object that represents backup to restore cluster from.New since v0.1.4.
- root
Enabled Boolean - optional boolean → Indicates whether root user is enabled for the cluster.
- root
Password String - optional sensitive string → Password for the root user of the cluster. When enabling root, password is autogenerated, use this field to obtain it.
- shrink
Options List<String> - optional string → Used only for shrinking cluster. List of IDs of instances that should remain after shrink. If no options are supplied, shrink operation will choose first non-leader instance to delete.
- timeouts Property Map
- vendor
Options Property Map - optional → Map of additional vendor-specific options. Supported options are described below.New since v0.4.0.
- wal
Disk Property MapAutoexpand - optional → Object that represents autoresize properties of wal volume of the cluster.
- wal
Volumes List<Property Map> - optional → Object that represents wal volume of the cluster. Changing this creates a new cluster.
Outputs
All input properties are implicitly available as output properties. Additionally, the DbCluster resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Instances
List<Db
Cluster Instance> - object → Cluster instances info.
- Loadbalancer
Id string - string → The id of the loadbalancer attached to the cluster.New since v0.1.15.
- Vrrp
Port stringId - string → The id of the VRRP port attached to the cluster. Note: Only available in multi-AZ configurations.New since v0.9.3.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instances
[]Db
Cluster Instance - object → Cluster instances info.
- Loadbalancer
Id string - string → The id of the loadbalancer attached to the cluster.New since v0.1.15.
- Vrrp
Port stringId - string → The id of the VRRP port attached to the cluster. Note: Only available in multi-AZ configurations.New since v0.9.3.
- id String
- The provider-assigned unique ID for this managed resource.
- instances
List<Db
Cluster Instance> - object → Cluster instances info.
- loadbalancer
Id String - string → The id of the loadbalancer attached to the cluster.New since v0.1.15.
- vrrp
Port StringId - string → The id of the VRRP port attached to the cluster. Note: Only available in multi-AZ configurations.New since v0.9.3.
- id string
- The provider-assigned unique ID for this managed resource.
- instances
Db
Cluster Instance[] - object → Cluster instances info.
- loadbalancer
Id string - string → The id of the loadbalancer attached to the cluster.New since v0.1.15.
- vrrp
Port stringId - string → The id of the VRRP port attached to the cluster. Note: Only available in multi-AZ configurations.New since v0.9.3.
- id str
- The provider-assigned unique ID for this managed resource.
- instances
Sequence[Db
Cluster Instance] - object → Cluster instances info.
- loadbalancer_
id str - string → The id of the loadbalancer attached to the cluster.New since v0.1.15.
- vrrp_
port_ strid - string → The id of the VRRP port attached to the cluster. Note: Only available in multi-AZ configurations.New since v0.9.3.
- id String
- The provider-assigned unique ID for this managed resource.
- instances List<Property Map>
- object → Cluster instances info.
- loadbalancer
Id String - string → The id of the loadbalancer attached to the cluster.New since v0.1.15.
- vrrp
Port StringId - string → The id of the VRRP port attached to the cluster. Note: Only available in multi-AZ configurations.New since v0.9.3.
Look up Existing DbCluster Resource
Get an existing DbCluster 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?: DbClusterState, opts?: CustomResourceOptions): DbCluster
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
availability_zone: Optional[str] = None,
availability_zones: Optional[Sequence[str]] = None,
backup_schedule: Optional[DbClusterBackupScheduleArgs] = None,
capabilities: Optional[Sequence[DbClusterCapabilityArgs]] = None,
cloud_monitoring_enabled: Optional[bool] = None,
cluster_size: Optional[float] = None,
configuration_id: Optional[str] = None,
datastore: Optional[DbClusterDatastoreArgs] = None,
db_cluster_id: Optional[str] = None,
disk_autoexpand: Optional[DbClusterDiskAutoexpandArgs] = None,
flavor_id: Optional[str] = None,
floating_ip_enabled: Optional[bool] = None,
instances: Optional[Sequence[DbClusterInstanceArgs]] = None,
keypair: Optional[str] = None,
loadbalancer_id: Optional[str] = None,
name: Optional[str] = None,
networks: Optional[Sequence[DbClusterNetworkArgs]] = None,
region: Optional[str] = None,
restore_point: Optional[DbClusterRestorePointArgs] = None,
root_enabled: Optional[bool] = None,
root_password: Optional[str] = None,
shrink_options: Optional[Sequence[str]] = None,
timeouts: Optional[DbClusterTimeoutsArgs] = None,
vendor_options: Optional[DbClusterVendorOptionsArgs] = None,
volume_size: Optional[float] = None,
volume_type: Optional[str] = None,
vrrp_port_id: Optional[str] = None,
wal_disk_autoexpand: Optional[DbClusterWalDiskAutoexpandArgs] = None,
wal_volumes: Optional[Sequence[DbClusterWalVolumeArgs]] = None) -> DbCluster
func GetDbCluster(ctx *Context, name string, id IDInput, state *DbClusterState, opts ...ResourceOption) (*DbCluster, error)
public static DbCluster Get(string name, Input<string> id, DbClusterState? state, CustomResourceOptions? opts = null)
public static DbCluster get(String name, Output<String> id, DbClusterState state, CustomResourceOptions options)
resources: _: type: vkcs:DbCluster 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.
- Availability
Zone string - optional string → The name of the availability zone of the cluster. Changing this creates a new cluster.
- Availability
Zones List<string> - optional string → The names of availability zones for the cluster. Changing this creates a new cluster. Note: Only available in multi-AZ configurationsNew since v0.9.3.
- Backup
Schedule DbCluster Backup Schedule - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- Capabilities
List<Db
Cluster Capability> - optional → Object that represents capability applied to cluster. There can be several instances of this object.
- Cloud
Monitoring boolEnabled - optional boolean → Enable cloud monitoring for the cluster. Changing this for Redis or MongoDB creates a new instance.New since v0.2.0.
- Cluster
Size double - required number → The number of instances in the cluster.
- Configuration
Id string - optional string → The id of the configuration attached to cluster.
- Datastore
Db
Cluster Datastore - required → Object that represents datastore of the cluster. Changing this creates a new cluster.
- Db
Cluster stringId - string → ID of the resource.
- Disk
Autoexpand DbCluster Disk Autoexpand - optional → Object that represents autoresize properties of the cluster.
- Flavor
Id string - required string → The ID of flavor for the cluster.
- Floating
Ip boolEnabled - optional boolean → Indicates whether floating ip is created for cluster. Changing this creates a new cluster.
- Instances
List<Db
Cluster Instance> - object → Cluster instances info.
- Keypair string
- optional string → Name of the keypair to be attached to cluster. Changing this creates a new cluster.
- Loadbalancer
Id string - string → The id of the loadbalancer attached to the cluster.New since v0.1.15.
- Name string
- required string → The name of the cluster. Changing this creates a new cluster.
- Networks
List<Db
Cluster Network> - optional → Object that represents network of the cluster. Changing this creates a new cluster.
- Region string
- optional string → Region to create resource in.
- Restore
Point DbCluster Restore Point - optional → Object that represents backup to restore cluster from.New since v0.1.4.
- Root
Enabled bool - optional boolean → Indicates whether root user is enabled for the cluster.
- Root
Password string - optional sensitive string → Password for the root user of the cluster. When enabling root, password is autogenerated, use this field to obtain it.
- Shrink
Options List<string> - optional string → Used only for shrinking cluster. List of IDs of instances that should remain after shrink. If no options are supplied, shrink operation will choose first non-leader instance to delete.
- Timeouts
Db
Cluster Timeouts - Vendor
Options DbCluster Vendor Options - optional → Map of additional vendor-specific options. Supported options are described below.New since v0.4.0.
- Volume
Size double - required number → Size of the cluster instance volume.
- Volume
Type string - required string → The type of the cluster instance volume. Changing this creates a new cluster.
- Vrrp
Port stringId - string → The id of the VRRP port attached to the cluster. Note: Only available in multi-AZ configurations.New since v0.9.3.
- Wal
Disk DbAutoexpand Cluster Wal Disk Autoexpand - optional → Object that represents autoresize properties of wal volume of the cluster.
- Wal
Volumes List<DbCluster Wal Volume> - optional → Object that represents wal volume of the cluster. Changing this creates a new cluster.
- Availability
Zone string - optional string → The name of the availability zone of the cluster. Changing this creates a new cluster.
- Availability
Zones []string - optional string → The names of availability zones for the cluster. Changing this creates a new cluster. Note: Only available in multi-AZ configurationsNew since v0.9.3.
- Backup
Schedule DbCluster Backup Schedule Args - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- Capabilities
[]Db
Cluster Capability Args - optional → Object that represents capability applied to cluster. There can be several instances of this object.
- Cloud
Monitoring boolEnabled - optional boolean → Enable cloud monitoring for the cluster. Changing this for Redis or MongoDB creates a new instance.New since v0.2.0.
- Cluster
Size float64 - required number → The number of instances in the cluster.
- Configuration
Id string - optional string → The id of the configuration attached to cluster.
- Datastore
Db
Cluster Datastore Args - required → Object that represents datastore of the cluster. Changing this creates a new cluster.
- Db
Cluster stringId - string → ID of the resource.
- Disk
Autoexpand DbCluster Disk Autoexpand Args - optional → Object that represents autoresize properties of the cluster.
- Flavor
Id string - required string → The ID of flavor for the cluster.
- Floating
Ip boolEnabled - optional boolean → Indicates whether floating ip is created for cluster. Changing this creates a new cluster.
- Instances
[]Db
Cluster Instance Args - object → Cluster instances info.
- Keypair string
- optional string → Name of the keypair to be attached to cluster. Changing this creates a new cluster.
- Loadbalancer
Id string - string → The id of the loadbalancer attached to the cluster.New since v0.1.15.
- Name string
- required string → The name of the cluster. Changing this creates a new cluster.
- Networks
[]Db
Cluster Network Args - optional → Object that represents network of the cluster. Changing this creates a new cluster.
- Region string
- optional string → Region to create resource in.
- Restore
Point DbCluster Restore Point Args - optional → Object that represents backup to restore cluster from.New since v0.1.4.
- Root
Enabled bool - optional boolean → Indicates whether root user is enabled for the cluster.
- Root
Password string - optional sensitive string → Password for the root user of the cluster. When enabling root, password is autogenerated, use this field to obtain it.
- Shrink
Options []string - optional string → Used only for shrinking cluster. List of IDs of instances that should remain after shrink. If no options are supplied, shrink operation will choose first non-leader instance to delete.
- Timeouts
Db
Cluster Timeouts Args - Vendor
Options DbCluster Vendor Options Args - optional → Map of additional vendor-specific options. Supported options are described below.New since v0.4.0.
- Volume
Size float64 - required number → Size of the cluster instance volume.
- Volume
Type string - required string → The type of the cluster instance volume. Changing this creates a new cluster.
- Vrrp
Port stringId - string → The id of the VRRP port attached to the cluster. Note: Only available in multi-AZ configurations.New since v0.9.3.
- Wal
Disk DbAutoexpand Cluster Wal Disk Autoexpand Args - optional → Object that represents autoresize properties of wal volume of the cluster.
- Wal
Volumes []DbCluster Wal Volume Args - optional → Object that represents wal volume of the cluster. Changing this creates a new cluster.
- availability
Zone String - optional string → The name of the availability zone of the cluster. Changing this creates a new cluster.
- availability
Zones List<String> - optional string → The names of availability zones for the cluster. Changing this creates a new cluster. Note: Only available in multi-AZ configurationsNew since v0.9.3.
- backup
Schedule DbCluster Backup Schedule - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- capabilities
List<Db
Cluster Capability> - optional → Object that represents capability applied to cluster. There can be several instances of this object.
- cloud
Monitoring BooleanEnabled - optional boolean → Enable cloud monitoring for the cluster. Changing this for Redis or MongoDB creates a new instance.New since v0.2.0.
- cluster
Size Double - required number → The number of instances in the cluster.
- configuration
Id String - optional string → The id of the configuration attached to cluster.
- datastore
Db
Cluster Datastore - required → Object that represents datastore of the cluster. Changing this creates a new cluster.
- db
Cluster StringId - string → ID of the resource.
- disk
Autoexpand DbCluster Disk Autoexpand - optional → Object that represents autoresize properties of the cluster.
- flavor
Id String - required string → The ID of flavor for the cluster.
- floating
Ip BooleanEnabled - optional boolean → Indicates whether floating ip is created for cluster. Changing this creates a new cluster.
- instances
List<Db
Cluster Instance> - object → Cluster instances info.
- keypair String
- optional string → Name of the keypair to be attached to cluster. Changing this creates a new cluster.
- loadbalancer
Id String - string → The id of the loadbalancer attached to the cluster.New since v0.1.15.
- name String
- required string → The name of the cluster. Changing this creates a new cluster.
- networks
List<Db
Cluster Network> - optional → Object that represents network of the cluster. Changing this creates a new cluster.
- region String
- optional string → Region to create resource in.
- restore
Point DbCluster Restore Point - optional → Object that represents backup to restore cluster from.New since v0.1.4.
- root
Enabled Boolean - optional boolean → Indicates whether root user is enabled for the cluster.
- root
Password String - optional sensitive string → Password for the root user of the cluster. When enabling root, password is autogenerated, use this field to obtain it.
- shrink
Options List<String> - optional string → Used only for shrinking cluster. List of IDs of instances that should remain after shrink. If no options are supplied, shrink operation will choose first non-leader instance to delete.
- timeouts
Db
Cluster Timeouts - vendor
Options DbCluster Vendor Options - optional → Map of additional vendor-specific options. Supported options are described below.New since v0.4.0.
- volume
Size Double - required number → Size of the cluster instance volume.
- volume
Type String - required string → The type of the cluster instance volume. Changing this creates a new cluster.
- vrrp
Port StringId - string → The id of the VRRP port attached to the cluster. Note: Only available in multi-AZ configurations.New since v0.9.3.
- wal
Disk DbAutoexpand Cluster Wal Disk Autoexpand - optional → Object that represents autoresize properties of wal volume of the cluster.
- wal
Volumes List<DbCluster Wal Volume> - optional → Object that represents wal volume of the cluster. Changing this creates a new cluster.
- availability
Zone string - optional string → The name of the availability zone of the cluster. Changing this creates a new cluster.
- availability
Zones string[] - optional string → The names of availability zones for the cluster. Changing this creates a new cluster. Note: Only available in multi-AZ configurationsNew since v0.9.3.
- backup
Schedule DbCluster Backup Schedule - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- capabilities
Db
Cluster Capability[] - optional → Object that represents capability applied to cluster. There can be several instances of this object.
- cloud
Monitoring booleanEnabled - optional boolean → Enable cloud monitoring for the cluster. Changing this for Redis or MongoDB creates a new instance.New since v0.2.0.
- cluster
Size number - required number → The number of instances in the cluster.
- configuration
Id string - optional string → The id of the configuration attached to cluster.
- datastore
Db
Cluster Datastore - required → Object that represents datastore of the cluster. Changing this creates a new cluster.
- db
Cluster stringId - string → ID of the resource.
- disk
Autoexpand DbCluster Disk Autoexpand - optional → Object that represents autoresize properties of the cluster.
- flavor
Id string - required string → The ID of flavor for the cluster.
- floating
Ip booleanEnabled - optional boolean → Indicates whether floating ip is created for cluster. Changing this creates a new cluster.
- instances
Db
Cluster Instance[] - object → Cluster instances info.
- keypair string
- optional string → Name of the keypair to be attached to cluster. Changing this creates a new cluster.
- loadbalancer
Id string - string → The id of the loadbalancer attached to the cluster.New since v0.1.15.
- name string
- required string → The name of the cluster. Changing this creates a new cluster.
- networks
Db
Cluster Network[] - optional → Object that represents network of the cluster. Changing this creates a new cluster.
- region string
- optional string → Region to create resource in.
- restore
Point DbCluster Restore Point - optional → Object that represents backup to restore cluster from.New since v0.1.4.
- root
Enabled boolean - optional boolean → Indicates whether root user is enabled for the cluster.
- root
Password string - optional sensitive string → Password for the root user of the cluster. When enabling root, password is autogenerated, use this field to obtain it.
- shrink
Options string[] - optional string → Used only for shrinking cluster. List of IDs of instances that should remain after shrink. If no options are supplied, shrink operation will choose first non-leader instance to delete.
- timeouts
Db
Cluster Timeouts - vendor
Options DbCluster Vendor Options - optional → Map of additional vendor-specific options. Supported options are described below.New since v0.4.0.
- volume
Size number - required number → Size of the cluster instance volume.
- volume
Type string - required string → The type of the cluster instance volume. Changing this creates a new cluster.
- vrrp
Port stringId - string → The id of the VRRP port attached to the cluster. Note: Only available in multi-AZ configurations.New since v0.9.3.
- wal
Disk DbAutoexpand Cluster Wal Disk Autoexpand - optional → Object that represents autoresize properties of wal volume of the cluster.
- wal
Volumes DbCluster Wal Volume[] - optional → Object that represents wal volume of the cluster. Changing this creates a new cluster.
- availability_
zone str - optional string → The name of the availability zone of the cluster. Changing this creates a new cluster.
- availability_
zones Sequence[str] - optional string → The names of availability zones for the cluster. Changing this creates a new cluster. Note: Only available in multi-AZ configurationsNew since v0.9.3.
- backup_
schedule DbCluster Backup Schedule Args - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- capabilities
Sequence[Db
Cluster Capability Args] - optional → Object that represents capability applied to cluster. There can be several instances of this object.
- cloud_
monitoring_ boolenabled - optional boolean → Enable cloud monitoring for the cluster. Changing this for Redis or MongoDB creates a new instance.New since v0.2.0.
- cluster_
size float - required number → The number of instances in the cluster.
- configuration_
id str - optional string → The id of the configuration attached to cluster.
- datastore
Db
Cluster Datastore Args - required → Object that represents datastore of the cluster. Changing this creates a new cluster.
- db_
cluster_ strid - string → ID of the resource.
- disk_
autoexpand DbCluster Disk Autoexpand Args - optional → Object that represents autoresize properties of the cluster.
- flavor_
id str - required string → The ID of flavor for the cluster.
- floating_
ip_ boolenabled - optional boolean → Indicates whether floating ip is created for cluster. Changing this creates a new cluster.
- instances
Sequence[Db
Cluster Instance Args] - object → Cluster instances info.
- keypair str
- optional string → Name of the keypair to be attached to cluster. Changing this creates a new cluster.
- loadbalancer_
id str - string → The id of the loadbalancer attached to the cluster.New since v0.1.15.
- name str
- required string → The name of the cluster. Changing this creates a new cluster.
- networks
Sequence[Db
Cluster Network Args] - optional → Object that represents network of the cluster. Changing this creates a new cluster.
- region str
- optional string → Region to create resource in.
- restore_
point DbCluster Restore Point Args - optional → Object that represents backup to restore cluster from.New since v0.1.4.
- root_
enabled bool - optional boolean → Indicates whether root user is enabled for the cluster.
- root_
password str - optional sensitive string → Password for the root user of the cluster. When enabling root, password is autogenerated, use this field to obtain it.
- shrink_
options Sequence[str] - optional string → Used only for shrinking cluster. List of IDs of instances that should remain after shrink. If no options are supplied, shrink operation will choose first non-leader instance to delete.
- timeouts
Db
Cluster Timeouts Args - vendor_
options DbCluster Vendor Options Args - optional → Map of additional vendor-specific options. Supported options are described below.New since v0.4.0.
- volume_
size float - required number → Size of the cluster instance volume.
- volume_
type str - required string → The type of the cluster instance volume. Changing this creates a new cluster.
- vrrp_
port_ strid - string → The id of the VRRP port attached to the cluster. Note: Only available in multi-AZ configurations.New since v0.9.3.
- wal_
disk_ Dbautoexpand Cluster Wal Disk Autoexpand Args - optional → Object that represents autoresize properties of wal volume of the cluster.
- wal_
volumes Sequence[DbCluster Wal Volume Args] - optional → Object that represents wal volume of the cluster. Changing this creates a new cluster.
- availability
Zone String - optional string → The name of the availability zone of the cluster. Changing this creates a new cluster.
- availability
Zones List<String> - optional string → The names of availability zones for the cluster. Changing this creates a new cluster. Note: Only available in multi-AZ configurationsNew since v0.9.3.
- backup
Schedule Property Map - optional → Object that represents configuration of PITR backup. This functionality is available only for postgres datastore.New since v0.1.4.
- capabilities List<Property Map>
- optional → Object that represents capability applied to cluster. There can be several instances of this object.
- cloud
Monitoring BooleanEnabled - optional boolean → Enable cloud monitoring for the cluster. Changing this for Redis or MongoDB creates a new instance.New since v0.2.0.
- cluster
Size Number - required number → The number of instances in the cluster.
- configuration
Id String - optional string → The id of the configuration attached to cluster.
- datastore Property Map
- required → Object that represents datastore of the cluster. Changing this creates a new cluster.
- db
Cluster StringId - string → ID of the resource.
- disk
Autoexpand Property Map - optional → Object that represents autoresize properties of the cluster.
- flavor
Id String - required string → The ID of flavor for the cluster.
- floating
Ip BooleanEnabled - optional boolean → Indicates whether floating ip is created for cluster. Changing this creates a new cluster.
- instances List<Property Map>
- object → Cluster instances info.
- keypair String
- optional string → Name of the keypair to be attached to cluster. Changing this creates a new cluster.
- loadbalancer
Id String - string → The id of the loadbalancer attached to the cluster.New since v0.1.15.
- name String
- required string → The name of the cluster. Changing this creates a new cluster.
- networks List<Property Map>
- optional → Object that represents network of the cluster. Changing this creates a new cluster.
- region String
- optional string → Region to create resource in.
- restore
Point Property Map - optional → Object that represents backup to restore cluster from.New since v0.1.4.
- root
Enabled Boolean - optional boolean → Indicates whether root user is enabled for the cluster.
- root
Password String - optional sensitive string → Password for the root user of the cluster. When enabling root, password is autogenerated, use this field to obtain it.
- shrink
Options List<String> - optional string → Used only for shrinking cluster. List of IDs of instances that should remain after shrink. If no options are supplied, shrink operation will choose first non-leader instance to delete.
- timeouts Property Map
- vendor
Options Property Map - optional → Map of additional vendor-specific options. Supported options are described below.New since v0.4.0.
- volume
Size Number - required number → Size of the cluster instance volume.
- volume
Type String - required string → The type of the cluster instance volume. Changing this creates a new cluster.
- vrrp
Port StringId - string → The id of the VRRP port attached to the cluster. Note: Only available in multi-AZ configurations.New since v0.9.3.
- wal
Disk Property MapAutoexpand - optional → Object that represents autoresize properties of wal volume of the cluster.
- wal
Volumes List<Property Map> - optional → Object that represents wal volume of the cluster. Changing this creates a new cluster.
Supporting Types
DbClusterBackupSchedule, DbClusterBackupScheduleArgs
- Interval
Hours double - required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
- Keep
Count double - required number → Number of backups to be stored.
- Name string
- required string → Name of the schedule.
- Start
Hours double - required number → Hours part of timestamp of initial backup.
- Start
Minutes double - required number → Minutes part of timestamp of initial backup.
- Interval
Hours float64 - required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
- Keep
Count float64 - required number → Number of backups to be stored.
- Name string
- required string → Name of the schedule.
- Start
Hours float64 - required number → Hours part of timestamp of initial backup.
- Start
Minutes float64 - required number → Minutes part of timestamp of initial backup.
- interval
Hours Double - required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
- keep
Count Double - required number → Number of backups to be stored.
- name String
- required string → Name of the schedule.
- start
Hours Double - required number → Hours part of timestamp of initial backup.
- start
Minutes Double - required number → Minutes part of timestamp of initial backup.
- interval
Hours number - required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
- keep
Count number - required number → Number of backups to be stored.
- name string
- required string → Name of the schedule.
- start
Hours number - required number → Hours part of timestamp of initial backup.
- start
Minutes number - required number → Minutes part of timestamp of initial backup.
- interval_
hours float - required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
- keep_
count float - required number → Number of backups to be stored.
- name str
- required string → Name of the schedule.
- start_
hours float - required number → Hours part of timestamp of initial backup.
- start_
minutes float - required number → Minutes part of timestamp of initial backup.
- interval
Hours Number - required number → Time interval between backups, specified in hours. Available values: 3, 6, 8, 12, 24.
- keep
Count Number - required number → Number of backups to be stored.
- name String
- required string → Name of the schedule.
- start
Hours Number - required number → Hours part of timestamp of initial backup.
- start
Minutes Number - required number → Minutes part of timestamp of initial backup.
DbClusterCapability, DbClusterCapabilityArgs
DbClusterDatastore, DbClusterDatastoreArgs
- Type string
- required string → Type of the datastore. Changing this creates a new cluster. Must be one of:
galera_mysql
,postgresql
,postgresql_multiaz
,tarantool
,postgrespro_enterprise
,postgrespro_enterprise_1c
- Version string
- required string → Version of the datastore. Changing this creates a new cluster.
- Type string
- required string → Type of the datastore. Changing this creates a new cluster. Must be one of:
galera_mysql
,postgresql
,postgresql_multiaz
,tarantool
,postgrespro_enterprise
,postgrespro_enterprise_1c
- Version string
- required string → Version of the datastore. Changing this creates a new cluster.
- type String
- required string → Type of the datastore. Changing this creates a new cluster. Must be one of:
galera_mysql
,postgresql
,postgresql_multiaz
,tarantool
,postgrespro_enterprise
,postgrespro_enterprise_1c
- version String
- required string → Version of the datastore. Changing this creates a new cluster.
- type string
- required string → Type of the datastore. Changing this creates a new cluster. Must be one of:
galera_mysql
,postgresql
,postgresql_multiaz
,tarantool
,postgrespro_enterprise
,postgrespro_enterprise_1c
- version string
- required string → Version of the datastore. Changing this creates a new cluster.
- type String
- required string → Type of the datastore. Changing this creates a new cluster. Must be one of:
galera_mysql
,postgresql
,postgresql_multiaz
,tarantool
,postgrespro_enterprise
,postgrespro_enterprise_1c
- version String
- required string → Version of the datastore. Changing this creates a new cluster.
DbClusterDiskAutoexpand, DbClusterDiskAutoexpandArgs
- Autoexpand bool
- optional boolean → Indicates whether autoresize is enabled.
- Max
Disk doubleSize - optional number → Maximum disk size for autoresize.
- Autoexpand bool
- optional boolean → Indicates whether autoresize is enabled.
- Max
Disk float64Size - optional number → Maximum disk size for autoresize.
- autoexpand Boolean
- optional boolean → Indicates whether autoresize is enabled.
- max
Disk DoubleSize - optional number → Maximum disk size for autoresize.
- autoexpand boolean
- optional boolean → Indicates whether autoresize is enabled.
- max
Disk numberSize - optional number → Maximum disk size for autoresize.
- autoexpand bool
- optional boolean → Indicates whether autoresize is enabled.
- max_
disk_ floatsize - optional number → Maximum disk size for autoresize.
- autoexpand Boolean
- optional boolean → Indicates whether autoresize is enabled.
- max
Disk NumberSize - optional number → Maximum disk size for autoresize.
DbClusterInstance, DbClusterInstanceArgs
- Instance
Id string - Ips List<string>
- Role string
- Instance
Id string - Ips []string
- Role string
- instance
Id String - ips List<String>
- role String
- instance
Id string - ips string[]
- role string
- instance_
id str - ips Sequence[str]
- role str
- instance
Id String - ips List<String>
- role String
DbClusterNetwork, DbClusterNetworkArgs
- Port string
- optional deprecated string → The port id of the network. Changing this creates a new cluster. Deprecated This argument is deprecated, please do not use it.
- Security
Groups List<string> - optional set of string → An array of one or more security group IDs to associate with the cluster instances. Changing this creates a new cluster.New since v0.2.0.
- Subnet
Id string - optional string → The id of the subnet. Changing this creates a new cluster.New since v0.1.15.
- Uuid string
- optional string → The id of the network. Changing this creates a new cluster. Note: Although this argument is marked as optional, it is actually required at the moment. Not setting a value for it may cause an error.
- Port string
- optional deprecated string → The port id of the network. Changing this creates a new cluster. Deprecated This argument is deprecated, please do not use it.
- Security
Groups []string - optional set of string → An array of one or more security group IDs to associate with the cluster instances. Changing this creates a new cluster.New since v0.2.0.
- Subnet
Id string - optional string → The id of the subnet. Changing this creates a new cluster.New since v0.1.15.
- Uuid string
- optional string → The id of the network. Changing this creates a new cluster. Note: Although this argument is marked as optional, it is actually required at the moment. Not setting a value for it may cause an error.
- port String
- optional deprecated string → The port id of the network. Changing this creates a new cluster. Deprecated This argument is deprecated, please do not use it.
- security
Groups List<String> - optional set of string → An array of one or more security group IDs to associate with the cluster instances. Changing this creates a new cluster.New since v0.2.0.
- subnet
Id String - optional string → The id of the subnet. Changing this creates a new cluster.New since v0.1.15.
- uuid String
- optional string → The id of the network. Changing this creates a new cluster. Note: Although this argument is marked as optional, it is actually required at the moment. Not setting a value for it may cause an error.
- port string
- optional deprecated string → The port id of the network. Changing this creates a new cluster. Deprecated This argument is deprecated, please do not use it.
- security
Groups string[] - optional set of string → An array of one or more security group IDs to associate with the cluster instances. Changing this creates a new cluster.New since v0.2.0.
- subnet
Id string - optional string → The id of the subnet. Changing this creates a new cluster.New since v0.1.15.
- uuid string
- optional string → The id of the network. Changing this creates a new cluster. Note: Although this argument is marked as optional, it is actually required at the moment. Not setting a value for it may cause an error.
- port str
- optional deprecated string → The port id of the network. Changing this creates a new cluster. Deprecated This argument is deprecated, please do not use it.
- security_
groups Sequence[str] - optional set of string → An array of one or more security group IDs to associate with the cluster instances. Changing this creates a new cluster.New since v0.2.0.
- subnet_
id str - optional string → The id of the subnet. Changing this creates a new cluster.New since v0.1.15.
- uuid str
- optional string → The id of the network. Changing this creates a new cluster. Note: Although this argument is marked as optional, it is actually required at the moment. Not setting a value for it may cause an error.
- port String
- optional deprecated string → The port id of the network. Changing this creates a new cluster. Deprecated This argument is deprecated, please do not use it.
- security
Groups List<String> - optional set of string → An array of one or more security group IDs to associate with the cluster instances. Changing this creates a new cluster.New since v0.2.0.
- subnet
Id String - optional string → The id of the subnet. Changing this creates a new cluster.New since v0.1.15.
- uuid String
- optional string → The id of the network. Changing this creates a new cluster. Note: Although this argument is marked as optional, it is actually required at the moment. Not setting a value for it may cause an error.
DbClusterRestorePoint, DbClusterRestorePointArgs
DbClusterTimeouts, DbClusterTimeoutsArgs
DbClusterVendorOptions, DbClusterVendorOptionsArgs
- Restart
Confirmed bool - optional boolean → Boolean to confirm autorestart of the cluster's instances if it is required to apply configuration group changes.
- Restart
Confirmed bool - optional boolean → Boolean to confirm autorestart of the cluster's instances if it is required to apply configuration group changes.
- restart
Confirmed Boolean - optional boolean → Boolean to confirm autorestart of the cluster's instances if it is required to apply configuration group changes.
- restart
Confirmed boolean - optional boolean → Boolean to confirm autorestart of the cluster's instances if it is required to apply configuration group changes.
- restart_
confirmed bool - optional boolean → Boolean to confirm autorestart of the cluster's instances if it is required to apply configuration group changes.
- restart
Confirmed Boolean - optional boolean → Boolean to confirm autorestart of the cluster's instances if it is required to apply configuration group changes.
DbClusterWalDiskAutoexpand, DbClusterWalDiskAutoexpandArgs
- Autoexpand bool
- optional boolean → Indicates whether wal volume autoresize is enabled.
- Max
Disk doubleSize - optional number → Maximum disk size for wal volume autoresize.
- Autoexpand bool
- optional boolean → Indicates whether wal volume autoresize is enabled.
- Max
Disk float64Size - optional number → Maximum disk size for wal volume autoresize.
- autoexpand Boolean
- optional boolean → Indicates whether wal volume autoresize is enabled.
- max
Disk DoubleSize - optional number → Maximum disk size for wal volume autoresize.
- autoexpand boolean
- optional boolean → Indicates whether wal volume autoresize is enabled.
- max
Disk numberSize - optional number → Maximum disk size for wal volume autoresize.
- autoexpand bool
- optional boolean → Indicates whether wal volume autoresize is enabled.
- max_
disk_ floatsize - optional number → Maximum disk size for wal volume autoresize.
- autoexpand Boolean
- optional boolean → Indicates whether wal volume autoresize is enabled.
- max
Disk NumberSize - optional number → Maximum disk size for wal volume autoresize.
DbClusterWalVolume, DbClusterWalVolumeArgs
- Size double
- required number → Size of the instance wal volume.
- Volume
Type string - required string → The type of the cluster wal volume. Changing this creates a new cluster.
- Size float64
- required number → Size of the instance wal volume.
- Volume
Type string - required string → The type of the cluster wal volume. Changing this creates a new cluster.
- size Double
- required number → Size of the instance wal volume.
- volume
Type String - required string → The type of the cluster wal volume. Changing this creates a new cluster.
- size number
- required number → Size of the instance wal volume.
- volume
Type string - required string → The type of the cluster wal volume. Changing this creates a new cluster.
- size float
- required number → Size of the instance wal volume.
- volume_
type str - required string → The type of the cluster wal volume. Changing this creates a new cluster.
- size Number
- required number → Size of the instance wal volume.
- volume
Type String - required string → The type of the cluster wal volume. Changing this creates a new cluster.
Import
Clusters can be imported using the id
, e.g.
$ pulumi import vkcs:index/dbCluster:DbCluster mycluster 708a74a1-6b00-4a96-938c-28a8a6d98590
After the import you can use terraform show to view imported fields and write their values to your .tf file.
You should at least add following fields to your .tf file:
name, flavor_id, cluster_size, volume_size, volume_type, datastore
Please, use "IMPORTED"
as value for volume_type
field.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- vkcs vk-cs/terraform-provider-vkcs
- License
- Notes
- This Pulumi package is based on the
vkcs
Terraform Provider.