ibm.Database
Explore with Pulumi AI
Example Usage
To find an example for configuring a virtual server instance that connects to a PostgreSQL database, see here.
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
<yourDatabase>:
type: ibm:Database
properties:
plan: standard
location: eu-gb
service: databases-for-etcd
resourceGroupId: ${group.id}
tags:
- tag1
- tag2
adminpassword: password12345678
groups:
- groupId: member
memory:
allocationMb: 14336
disk:
allocationMb: 20480
cpu:
allocationCount: 3
users:
- name: user123
password: password12345678
type: database
allowlists:
- address: 172.168.1.1/32
description: desc
variables:
group:
fn::invoke:
function: ibm:getResourceGroup
arguments:
name: <your_group>
outputs:
iCD Etcd database connection string: http://${ibm_database.test_acc.ibm_database_connection.icd_conn}
Sample database instance by using group
attributes
An example to configure and deploy database by using group
attributes.
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
<yourDatabase>:
type: ibm:Database
properties:
plan: standard
location: eu-gb
service: databases-for-etcd
resourceGroupId: ${group.id}
tags:
- tag1
- tag2
adminpassword: password12345678
groups:
- groupId: member
memory:
allocationMb: 10240
disk:
allocationMb: 256000
cpu:
allocationCount: 3
users:
- name: user123
password: password12345678
allowlists:
- address: 172.168.1.1/32
description: desc
variables:
group:
fn::invoke:
function: ibm:getResourceGroup
arguments:
name: <your_group>
outputs:
iCD Etcd database connection string: http://${ibm_database.test_acc.ibm_database_connection.icd_conn}
Sample database instance by using host_flavor
attribute
An example to configure and deploy database by using host_flavor
attribute.
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
<yourDatabase>:
type: ibm:Database
properties:
plan: standard
location: eu-gb
service: databases-for-etcd
resourceGroupId: ${group.id}
tags:
- tag1
- tag2
adminpassword: password12
groups:
- groupId: member
hostFlavor:
id: b3c.8x32.encrypted
disk:
allocationMb: 256000
users:
- name: user123
password: password12
allowlists:
- address: 172.168.1.1/32
description: desc
variables:
group:
fn::invoke:
function: ibm:getResourceGroup
arguments:
name: <your_group>
outputs:
iCD Etcd database connection string: http://${ibm_database.test_acc.ibm_database_connection.icd_conn}
Sample database instance by using point_in_time_recovery
An example for configuring point_in_time_recovery
time by using ibm.Database
resource.
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const group = ibm.getResourceGroup({
name: "<your_group>",
});
const testAcc = new ibm.Database("testAcc", {
resourceGroupId: group.then(group => group.id),
service: "databases-for-postgresql",
plan: "standard",
location: "eu-gb",
pointInTimeRecoveryTime: "2020-04-20T05:27:36Z",
pointInTimeRecoveryDeploymentId: "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/4448261269a14562b839e0a3019ed980:0b8c37b0-0f01-421a-bb32-056c6565b461::",
});
import pulumi
import pulumi_ibm as ibm
group = ibm.get_resource_group(name="<your_group>")
test_acc = ibm.Database("testAcc",
resource_group_id=group.id,
service="databases-for-postgresql",
plan="standard",
location="eu-gb",
point_in_time_recovery_time="2020-04-20T05:27:36Z",
point_in_time_recovery_deployment_id="crn:v1:bluemix:public:databases-for-postgresql:us-south:a/4448261269a14562b839e0a3019ed980:0b8c37b0-0f01-421a-bb32-056c6565b461::")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
group, err := ibm.LookupResourceGroup(ctx, &ibm.LookupResourceGroupArgs{
Name: pulumi.StringRef("<your_group>"),
}, nil)
if err != nil {
return err
}
_, err = ibm.NewDatabase(ctx, "testAcc", &ibm.DatabaseArgs{
ResourceGroupId: pulumi.String(group.Id),
Service: pulumi.String("databases-for-postgresql"),
Plan: pulumi.String("standard"),
Location: pulumi.String("eu-gb"),
PointInTimeRecoveryTime: pulumi.String("2020-04-20T05:27:36Z"),
PointInTimeRecoveryDeploymentId: pulumi.String("crn:v1:bluemix:public:databases-for-postgresql:us-south:a/4448261269a14562b839e0a3019ed980:0b8c37b0-0f01-421a-bb32-056c6565b461::"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var @group = Ibm.GetResourceGroup.Invoke(new()
{
Name = "<your_group>",
});
var testAcc = new Ibm.Database("testAcc", new()
{
ResourceGroupId = @group.Apply(@group => @group.Apply(getResourceGroupResult => getResourceGroupResult.Id)),
Service = "databases-for-postgresql",
Plan = "standard",
Location = "eu-gb",
PointInTimeRecoveryTime = "2020-04-20T05:27:36Z",
PointInTimeRecoveryDeploymentId = "crn:v1:bluemix:public:databases-for-postgresql:us-south:a/4448261269a14562b839e0a3019ed980:0b8c37b0-0f01-421a-bb32-056c6565b461::",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetResourceGroupArgs;
import com.pulumi.ibm.Database;
import com.pulumi.ibm.DatabaseArgs;
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) {
final var group = IbmFunctions.getResourceGroup(GetResourceGroupArgs.builder()
.name("<your_group>")
.build());
var testAcc = new Database("testAcc", DatabaseArgs.builder()
.resourceGroupId(group.applyValue(getResourceGroupResult -> getResourceGroupResult.id()))
.service("databases-for-postgresql")
.plan("standard")
.location("eu-gb")
.pointInTimeRecoveryTime("2020-04-20T05:27:36Z")
.pointInTimeRecoveryDeploymentId("crn:v1:bluemix:public:databases-for-postgresql:us-south:a/4448261269a14562b839e0a3019ed980:0b8c37b0-0f01-421a-bb32-056c6565b461::")
.build());
}
}
resources:
testAcc:
type: ibm:Database
properties:
resourceGroupId: ${group.id}
service: databases-for-postgresql
plan: standard
location: eu-gb
pointInTimeRecoveryTime: 2020-04-20T05:27:36Z
pointInTimeRecoveryDeploymentId: 'crn:v1:bluemix:public:databases-for-postgresql:us-south:a/4448261269a14562b839e0a3019ed980:0b8c37b0-0f01-421a-bb32-056c6565b461::'
variables:
group:
fn::invoke:
function: ibm:getResourceGroup
arguments:
name: <your_group>
Sample database instance by using auto_scaling
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const autoscale = new ibm.Database("autoscale", {
resourceGroupId: data.ibm_resource_group.group.id,
service: "databases-for-redis",
plan: "standard",
location: "us-south",
serviceEndpoints: "private",
autoScaling: {
disk: {
capacityEnabled: true,
freeSpaceLessThanPercent: 15,
ioAbovePercent: 85,
ioEnabled: true,
ioOverPeriod: "15m",
rateIncreasePercent: 15,
rateLimitMbPerMember: 3670016,
ratePeriodSeconds: 900,
rateUnits: "mb",
},
memory: {
ioAbovePercent: 90,
ioEnabled: true,
ioOverPeriod: "15m",
rateIncreasePercent: 10,
rateLimitMbPerMember: 114688,
ratePeriodSeconds: 900,
rateUnits: "mb",
},
},
});
import pulumi
import pulumi_ibm as ibm
autoscale = ibm.Database("autoscale",
resource_group_id=data["ibm_resource_group"]["group"]["id"],
service="databases-for-redis",
plan="standard",
location="us-south",
service_endpoints="private",
auto_scaling={
"disk": {
"capacity_enabled": True,
"free_space_less_than_percent": 15,
"io_above_percent": 85,
"io_enabled": True,
"io_over_period": "15m",
"rate_increase_percent": 15,
"rate_limit_mb_per_member": 3670016,
"rate_period_seconds": 900,
"rate_units": "mb",
},
"memory": {
"io_above_percent": 90,
"io_enabled": True,
"io_over_period": "15m",
"rate_increase_percent": 10,
"rate_limit_mb_per_member": 114688,
"rate_period_seconds": 900,
"rate_units": "mb",
},
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.NewDatabase(ctx, "autoscale", &ibm.DatabaseArgs{
ResourceGroupId: pulumi.Any(data.Ibm_resource_group.Group.Id),
Service: pulumi.String("databases-for-redis"),
Plan: pulumi.String("standard"),
Location: pulumi.String("us-south"),
ServiceEndpoints: pulumi.String("private"),
AutoScaling: &ibm.DatabaseAutoScalingArgs{
Disk: &ibm.DatabaseAutoScalingDiskArgs{
CapacityEnabled: pulumi.Bool(true),
FreeSpaceLessThanPercent: pulumi.Float64(15),
IoAbovePercent: pulumi.Float64(85),
IoEnabled: pulumi.Bool(true),
IoOverPeriod: pulumi.String("15m"),
RateIncreasePercent: pulumi.Float64(15),
RateLimitMbPerMember: pulumi.Float64(3670016),
RatePeriodSeconds: pulumi.Float64(900),
RateUnits: pulumi.String("mb"),
},
Memory: &ibm.DatabaseAutoScalingMemoryArgs{
IoAbovePercent: pulumi.Float64(90),
IoEnabled: pulumi.Bool(true),
IoOverPeriod: pulumi.String("15m"),
RateIncreasePercent: pulumi.Float64(10),
RateLimitMbPerMember: pulumi.Float64(114688),
RatePeriodSeconds: pulumi.Float64(900),
RateUnits: pulumi.String("mb"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var autoscale = new Ibm.Database("autoscale", new()
{
ResourceGroupId = data.Ibm_resource_group.Group.Id,
Service = "databases-for-redis",
Plan = "standard",
Location = "us-south",
ServiceEndpoints = "private",
AutoScaling = new Ibm.Inputs.DatabaseAutoScalingArgs
{
Disk = new Ibm.Inputs.DatabaseAutoScalingDiskArgs
{
CapacityEnabled = true,
FreeSpaceLessThanPercent = 15,
IoAbovePercent = 85,
IoEnabled = true,
IoOverPeriod = "15m",
RateIncreasePercent = 15,
RateLimitMbPerMember = 3670016,
RatePeriodSeconds = 900,
RateUnits = "mb",
},
Memory = new Ibm.Inputs.DatabaseAutoScalingMemoryArgs
{
IoAbovePercent = 90,
IoEnabled = true,
IoOverPeriod = "15m",
RateIncreasePercent = 10,
RateLimitMbPerMember = 114688,
RatePeriodSeconds = 900,
RateUnits = "mb",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.Database;
import com.pulumi.ibm.DatabaseArgs;
import com.pulumi.ibm.inputs.DatabaseAutoScalingArgs;
import com.pulumi.ibm.inputs.DatabaseAutoScalingDiskArgs;
import com.pulumi.ibm.inputs.DatabaseAutoScalingMemoryArgs;
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 autoscale = new Database("autoscale", DatabaseArgs.builder()
.resourceGroupId(data.ibm_resource_group().group().id())
.service("databases-for-redis")
.plan("standard")
.location("us-south")
.serviceEndpoints("private")
.autoScaling(DatabaseAutoScalingArgs.builder()
.disk(DatabaseAutoScalingDiskArgs.builder()
.capacityEnabled(true)
.freeSpaceLessThanPercent(15)
.ioAbovePercent(85)
.ioEnabled(true)
.ioOverPeriod("15m")
.rateIncreasePercent(15)
.rateLimitMbPerMember(3670016)
.ratePeriodSeconds(900)
.rateUnits("mb")
.build())
.memory(DatabaseAutoScalingMemoryArgs.builder()
.ioAbovePercent(90)
.ioEnabled(true)
.ioOverPeriod("15m")
.rateIncreasePercent(10)
.rateLimitMbPerMember(114688)
.ratePeriodSeconds(900)
.rateUnits("mb")
.build())
.build())
.build());
}
}
resources:
autoscale:
type: ibm:Database
properties:
resourceGroupId: ${data.ibm_resource_group.group.id}
service: databases-for-redis
plan: standard
location: us-south
serviceEndpoints: private
autoScaling:
disk:
capacityEnabled: true
freeSpaceLessThanPercent: 15
ioAbovePercent: 85
ioEnabled: true
ioOverPeriod: 15m
rateIncreasePercent: 15
rateLimitMbPerMember: 3.670016e+06
ratePeriodSeconds: 900
rateUnits: mb
memory:
ioAbovePercent: 90
ioEnabled: true
ioOverPeriod: 15m
rateIncreasePercent: 10
rateLimitMbPerMember: 114688
ratePeriodSeconds: 900
rateUnits: mb
Sample MongoDB Enterprise database instance
- MongoDB Enterprise provisioning may require more time than the default timeout. A longer timeout value can be set with using the
timeouts
attribute. - Please make sure your resources meet minimum requirements of scaling. Please refer docs for more info.
service_endpoints
cannot be updated on this instance.
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
mongodb:
type: ibm:Database
properties:
resourceGroupId: ${testAcc.id}
service: databases-for-mongodb
plan: enterprise
location: us-south
adminpassword: password12345678
groups:
- groupId: member
memory:
allocationMb: 24576
disk:
allocationMb: 122880
cpu:
allocationCount: 6
tags:
- one:two
users:
- name: dbuser
password: password12345678
type: database
- name: opsmanageruser
password: $ecurepa$$word12
type: ops_manager
role: group_read_only
allowlists:
- address: 172.168.1.2/32
description: desc1
timeouts:
- create: 120m
update: 120m
delete: 15m
variables:
testAcc:
fn::invoke:
function: ibm:getResourceGroup
arguments:
isDefault: true
Sample EDB instance
EDB takes more time than expected. It is always advisible to extend timeouts using timeouts block
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
edb:
type: ibm:Database
properties:
resourceGroupId: ${testAcc.id}
service: databases-for-enterprisedb
plan: standard
location: us-south
adminpassword: password12345678
groups:
- groupId: member
memory:
allocationMb: 12288
disk:
allocationMb: 131072
cpu:
allocationCount: 3
tags:
- one:two
users:
- name: user123
password: password12345678
type: database
allowlists:
- address: 172.168.1.2/32
description: desc1
timeouts:
- create: 120m
update: 120m
delete: 15m
variables:
testAcc:
fn::invoke:
function: ibm:getResourceGroup
arguments:
isDefault: true
Sample Elasticsearch Enterprise instance
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
es:
type: ibm:Database
properties:
resourceGroupId: ${testAcc.id}
service: databases-for-elasticsearch
plan: enterprise
location: eu-gb
adminpassword: password12345678
version: '7.17'
groups:
- groupId: member
members:
allocationCount: 3
memory:
allocationMb: 1024
disk:
allocationMb: 5120
cpu:
allocationCount: 3
users:
- name: user123
password: password12345678
allowlists:
- address: 172.168.1.2/32
description: desc1
timeouts:
- create: 120m
update: 120m
delete: 15m
variables:
testAcc:
fn::invoke:
function: ibm:getResourceGroup
arguments:
isDefault: true
Sample Elasticsearch Platinum instance
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
es:
type: ibm:Database
properties:
resourceGroupId: ${testAcc.id}
service: databases-for-elasticsearch
plan: platinum
location: eu-gb
adminpassword: password12345678
groups:
- groupId: member
members:
allocationCount: 3
memory:
allocationMb: 1024
disk:
allocationMb: 5120
cpu:
allocationCount: 3
users:
- name: user123
password: password12345678
allowlists:
- address: 172.168.1.2/32
description: desc1
timeouts:
- create: 120m
update: 120m
delete: 15m
variables:
testAcc:
fn::invoke:
function: ibm:getResourceGroup
arguments:
isDefault: true
Updating configuration for postgres database
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
db:
type: ibm:Database
properties:
configuration: " {\n \"max_connections\": 400\n }\n \n"
groups:
- cpu:
allocationCount: 3
disk:
allocationMb: 131072
groupId: member
memory:
allocationMb: 12288
location: us-east
plan: standard
service: databases-for-postgresql
variables:
testAcc:
fn::invoke:
function: ibm:getResourceGroup
arguments:
isDefault: true
Creating logical replication slot for postgres database
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const testAcc = ibm.getResourceGroup({
isDefault: true,
});
const db = new ibm.Database("db", {
configuration: ` {
"wal_level": "logical",
"max_replication_slots": 21,
"max_wal_senders": 21
}
`,
location: "us-east",
logicalReplicationSlots: [{
databaseName: "ibmclouddb",
name: "wj123",
pluginType: "wal2json",
}],
plan: "standard",
service: "databases-for-postgresql",
users: [{
name: "repl",
password: "repl12345password",
}],
});
import pulumi
import pulumi_ibm as ibm
test_acc = ibm.get_resource_group(is_default=True)
db = ibm.Database("db",
configuration=""" {
"wal_level": "logical",
"max_replication_slots": 21,
"max_wal_senders": 21
}
""",
location="us-east",
logical_replication_slots=[{
"database_name": "ibmclouddb",
"name": "wj123",
"plugin_type": "wal2json",
}],
plan="standard",
service="databases-for-postgresql",
users=[{
"name": "repl",
"password": "repl12345password",
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.LookupResourceGroup(ctx, &ibm.LookupResourceGroupArgs{
IsDefault: pulumi.BoolRef(true),
}, nil)
if err != nil {
return err
}
_, err = ibm.NewDatabase(ctx, "db", &ibm.DatabaseArgs{
Configuration: pulumi.String(` {
"wal_level": "logical",
"max_replication_slots": 21,
"max_wal_senders": 21
}
`),
Location: pulumi.String("us-east"),
LogicalReplicationSlots: ibm.DatabaseLogicalReplicationSlotArray{
&ibm.DatabaseLogicalReplicationSlotArgs{
DatabaseName: pulumi.String("ibmclouddb"),
Name: pulumi.String("wj123"),
PluginType: pulumi.String("wal2json"),
},
},
Plan: pulumi.String("standard"),
Service: pulumi.String("databases-for-postgresql"),
Users: ibm.DatabaseUserArray{
&ibm.DatabaseUserArgs{
Name: pulumi.String("repl"),
Password: pulumi.String("repl12345password"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var testAcc = Ibm.GetResourceGroup.Invoke(new()
{
IsDefault = true,
});
var db = new Ibm.Database("db", new()
{
Configuration = @" {
""wal_level"": ""logical"",
""max_replication_slots"": 21,
""max_wal_senders"": 21
}
",
Location = "us-east",
LogicalReplicationSlots = new[]
{
new Ibm.Inputs.DatabaseLogicalReplicationSlotArgs
{
DatabaseName = "ibmclouddb",
Name = "wj123",
PluginType = "wal2json",
},
},
Plan = "standard",
Service = "databases-for-postgresql",
Users = new[]
{
new Ibm.Inputs.DatabaseUserArgs
{
Name = "repl",
Password = "repl12345password",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetResourceGroupArgs;
import com.pulumi.ibm.Database;
import com.pulumi.ibm.DatabaseArgs;
import com.pulumi.ibm.inputs.DatabaseLogicalReplicationSlotArgs;
import com.pulumi.ibm.inputs.DatabaseUserArgs;
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) {
final var testAcc = IbmFunctions.getResourceGroup(GetResourceGroupArgs.builder()
.isDefault(true)
.build());
var db = new Database("db", DatabaseArgs.builder()
.configuration("""
{
"wal_level": "logical",
"max_replication_slots": 21,
"max_wal_senders": 21
}
""")
.location("us-east")
.logicalReplicationSlots(DatabaseLogicalReplicationSlotArgs.builder()
.databaseName("ibmclouddb")
.name("wj123")
.pluginType("wal2json")
.build())
.plan("standard")
.service("databases-for-postgresql")
.users(DatabaseUserArgs.builder()
.name("repl")
.password("repl12345password")
.build())
.build());
}
}
resources:
db:
type: ibm:Database
properties:
configuration: " {\n \"wal_level\": \"logical\",\n \"max_replication_slots\": 21,\n \"max_wal_senders\": 21\n }\n \n"
location: us-east
logicalReplicationSlots:
- databaseName: ibmclouddb
name: wj123
pluginType: wal2json
plan: standard
service: databases-for-postgresql
users:
- name: repl
password: repl12345password
variables:
testAcc:
fn::invoke:
function: ibm:getResourceGroup
arguments:
isDefault: true
provider.tf
Please make sure to target right region in the provider block, If database is created in region other than us-south
import * as pulumi from "@pulumi/pulumi";
import pulumi
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
return await Deployment.RunAsync(() =>
{
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
}
}
{}
For more information, about an example that are related to a VSI configuration to connect to a PostgreSQL database, refer to VSI configured connection.
Create Database Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);
@overload
def Database(resource_name: str,
args: DatabaseArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Database(resource_name: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
service_endpoints: Optional[str] = None,
service: Optional[str] = None,
plan: Optional[str] = None,
logical_replication_slots: Optional[Sequence[DatabaseLogicalReplicationSlotArgs]] = None,
backup_encryption_key_crn: Optional[str] = None,
database_id: Optional[str] = None,
deletion_protection: Optional[bool] = None,
group: Optional[Sequence[DatabaseGroupArgs]] = None,
key_protect_instance: Optional[str] = None,
key_protect_key: Optional[str] = None,
backup_id: Optional[str] = None,
adminpassword: Optional[str] = None,
name: Optional[str] = None,
offline_restore: Optional[bool] = None,
configuration: Optional[str] = None,
point_in_time_recovery_deployment_id: Optional[str] = None,
point_in_time_recovery_time: Optional[str] = None,
remote_leader_id: Optional[str] = None,
resource_group_id: Optional[str] = None,
auto_scaling: Optional[DatabaseAutoScalingArgs] = None,
allowlists: Optional[Sequence[DatabaseAllowlistArgs]] = None,
skip_initial_backup: Optional[bool] = None,
tags: Optional[Sequence[str]] = None,
timeouts: Optional[DatabaseTimeoutsArgs] = None,
users: Optional[Sequence[DatabaseUserArgs]] = None,
version: Optional[str] = None)
func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)
public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)
public Database(String name, DatabaseArgs args)
public Database(String name, DatabaseArgs args, CustomResourceOptions options)
type: ibm:Database
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 DatabaseArgs
- 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 DatabaseArgs
- 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 DatabaseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DatabaseArgs
- 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 databaseResource = new Ibm.Database("databaseResource", new()
{
Location = "string",
ServiceEndpoints = "string",
Service = "string",
Plan = "string",
LogicalReplicationSlots = new[]
{
new Ibm.Inputs.DatabaseLogicalReplicationSlotArgs
{
DatabaseName = "string",
Name = "string",
PluginType = "string",
},
},
BackupEncryptionKeyCrn = "string",
DatabaseId = "string",
DeletionProtection = false,
Group = new[]
{
new Ibm.Inputs.DatabaseGroupArgs
{
Count = 0,
Cpus = new[]
{
new Ibm.Inputs.DatabaseGroupCpusArgs
{
AllocationCount = 0,
CanScaleDown = false,
IsAdjustable = false,
MinimumCount = 0,
StepSizeCount = 0,
Units = "string",
},
},
Disks = new[]
{
new Ibm.Inputs.DatabaseGroupDiskArgs
{
AllocationMb = 0,
CanScaleDown = false,
IsAdjustable = false,
MinimumMb = 0,
StepSizeMb = 0,
Units = "string",
},
},
GroupId = "string",
HostFlavors = new[]
{
new Ibm.Inputs.DatabaseGroupHostFlavorArgs
{
HostingSize = "string",
Id = "string",
Name = "string",
},
},
Memories = new[]
{
new Ibm.Inputs.DatabaseGroupMemoryArgs
{
AllocationMb = 0,
CanScaleDown = false,
CpuEnforcementRatioCeilingMb = 0,
CpuEnforcementRatioMb = 0,
IsAdjustable = false,
MinimumMb = 0,
StepSizeMb = 0,
Units = "string",
},
},
},
},
KeyProtectInstance = "string",
KeyProtectKey = "string",
BackupId = "string",
Adminpassword = "string",
Name = "string",
OfflineRestore = false,
Configuration = "string",
PointInTimeRecoveryDeploymentId = "string",
PointInTimeRecoveryTime = "string",
RemoteLeaderId = "string",
ResourceGroupId = "string",
AutoScaling = new Ibm.Inputs.DatabaseAutoScalingArgs
{
Disk = new Ibm.Inputs.DatabaseAutoScalingDiskArgs
{
CapacityEnabled = false,
FreeSpaceLessThanPercent = 0,
IoAbovePercent = 0,
IoEnabled = false,
IoOverPeriod = "string",
RateIncreasePercent = 0,
RateLimitMbPerMember = 0,
RatePeriodSeconds = 0,
RateUnits = "string",
},
Memory = new Ibm.Inputs.DatabaseAutoScalingMemoryArgs
{
IoAbovePercent = 0,
IoEnabled = false,
IoOverPeriod = "string",
RateIncreasePercent = 0,
RateLimitMbPerMember = 0,
RatePeriodSeconds = 0,
RateUnits = "string",
},
},
Allowlists = new[]
{
new Ibm.Inputs.DatabaseAllowlistArgs
{
Address = "string",
Description = "string",
},
},
SkipInitialBackup = false,
Tags = new[]
{
"string",
},
Timeouts = new Ibm.Inputs.DatabaseTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
Users = new[]
{
new Ibm.Inputs.DatabaseUserArgs
{
Name = "string",
Password = "string",
Role = "string",
Type = "string",
},
},
Version = "string",
});
example, err := ibm.NewDatabase(ctx, "databaseResource", &ibm.DatabaseArgs{
Location: pulumi.String("string"),
ServiceEndpoints: pulumi.String("string"),
Service: pulumi.String("string"),
Plan: pulumi.String("string"),
LogicalReplicationSlots: ibm.DatabaseLogicalReplicationSlotArray{
&ibm.DatabaseLogicalReplicationSlotArgs{
DatabaseName: pulumi.String("string"),
Name: pulumi.String("string"),
PluginType: pulumi.String("string"),
},
},
BackupEncryptionKeyCrn: pulumi.String("string"),
DatabaseId: pulumi.String("string"),
DeletionProtection: pulumi.Bool(false),
Group: ibm.DatabaseGroupArray{
&ibm.DatabaseGroupArgs{
Count: pulumi.Float64(0),
Cpus: ibm.DatabaseGroupCpusArray{
&ibm.DatabaseGroupCpusArgs{
AllocationCount: pulumi.Float64(0),
CanScaleDown: pulumi.Bool(false),
IsAdjustable: pulumi.Bool(false),
MinimumCount: pulumi.Float64(0),
StepSizeCount: pulumi.Float64(0),
Units: pulumi.String("string"),
},
},
Disks: ibm.DatabaseGroupDiskArray{
&ibm.DatabaseGroupDiskArgs{
AllocationMb: pulumi.Float64(0),
CanScaleDown: pulumi.Bool(false),
IsAdjustable: pulumi.Bool(false),
MinimumMb: pulumi.Float64(0),
StepSizeMb: pulumi.Float64(0),
Units: pulumi.String("string"),
},
},
GroupId: pulumi.String("string"),
HostFlavors: ibm.DatabaseGroupHostFlavorArray{
&ibm.DatabaseGroupHostFlavorArgs{
HostingSize: pulumi.String("string"),
Id: pulumi.String("string"),
Name: pulumi.String("string"),
},
},
Memories: ibm.DatabaseGroupMemoryArray{
&ibm.DatabaseGroupMemoryArgs{
AllocationMb: pulumi.Float64(0),
CanScaleDown: pulumi.Bool(false),
CpuEnforcementRatioCeilingMb: pulumi.Float64(0),
CpuEnforcementRatioMb: pulumi.Float64(0),
IsAdjustable: pulumi.Bool(false),
MinimumMb: pulumi.Float64(0),
StepSizeMb: pulumi.Float64(0),
Units: pulumi.String("string"),
},
},
},
},
KeyProtectInstance: pulumi.String("string"),
KeyProtectKey: pulumi.String("string"),
BackupId: pulumi.String("string"),
Adminpassword: pulumi.String("string"),
Name: pulumi.String("string"),
OfflineRestore: pulumi.Bool(false),
Configuration: pulumi.String("string"),
PointInTimeRecoveryDeploymentId: pulumi.String("string"),
PointInTimeRecoveryTime: pulumi.String("string"),
RemoteLeaderId: pulumi.String("string"),
ResourceGroupId: pulumi.String("string"),
AutoScaling: &ibm.DatabaseAutoScalingArgs{
Disk: &ibm.DatabaseAutoScalingDiskArgs{
CapacityEnabled: pulumi.Bool(false),
FreeSpaceLessThanPercent: pulumi.Float64(0),
IoAbovePercent: pulumi.Float64(0),
IoEnabled: pulumi.Bool(false),
IoOverPeriod: pulumi.String("string"),
RateIncreasePercent: pulumi.Float64(0),
RateLimitMbPerMember: pulumi.Float64(0),
RatePeriodSeconds: pulumi.Float64(0),
RateUnits: pulumi.String("string"),
},
Memory: &ibm.DatabaseAutoScalingMemoryArgs{
IoAbovePercent: pulumi.Float64(0),
IoEnabled: pulumi.Bool(false),
IoOverPeriod: pulumi.String("string"),
RateIncreasePercent: pulumi.Float64(0),
RateLimitMbPerMember: pulumi.Float64(0),
RatePeriodSeconds: pulumi.Float64(0),
RateUnits: pulumi.String("string"),
},
},
Allowlists: ibm.DatabaseAllowlistArray{
&ibm.DatabaseAllowlistArgs{
Address: pulumi.String("string"),
Description: pulumi.String("string"),
},
},
SkipInitialBackup: pulumi.Bool(false),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
Timeouts: &ibm.DatabaseTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
Users: ibm.DatabaseUserArray{
&ibm.DatabaseUserArgs{
Name: pulumi.String("string"),
Password: pulumi.String("string"),
Role: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
Version: pulumi.String("string"),
})
var databaseResource = new Database("databaseResource", DatabaseArgs.builder()
.location("string")
.serviceEndpoints("string")
.service("string")
.plan("string")
.logicalReplicationSlots(DatabaseLogicalReplicationSlotArgs.builder()
.databaseName("string")
.name("string")
.pluginType("string")
.build())
.backupEncryptionKeyCrn("string")
.databaseId("string")
.deletionProtection(false)
.group(DatabaseGroupArgs.builder()
.count(0)
.cpus(DatabaseGroupCpusArgs.builder()
.allocationCount(0)
.canScaleDown(false)
.isAdjustable(false)
.minimumCount(0)
.stepSizeCount(0)
.units("string")
.build())
.disks(DatabaseGroupDiskArgs.builder()
.allocationMb(0)
.canScaleDown(false)
.isAdjustable(false)
.minimumMb(0)
.stepSizeMb(0)
.units("string")
.build())
.groupId("string")
.hostFlavors(DatabaseGroupHostFlavorArgs.builder()
.hostingSize("string")
.id("string")
.name("string")
.build())
.memories(DatabaseGroupMemoryArgs.builder()
.allocationMb(0)
.canScaleDown(false)
.cpuEnforcementRatioCeilingMb(0)
.cpuEnforcementRatioMb(0)
.isAdjustable(false)
.minimumMb(0)
.stepSizeMb(0)
.units("string")
.build())
.build())
.keyProtectInstance("string")
.keyProtectKey("string")
.backupId("string")
.adminpassword("string")
.name("string")
.offlineRestore(false)
.configuration("string")
.pointInTimeRecoveryDeploymentId("string")
.pointInTimeRecoveryTime("string")
.remoteLeaderId("string")
.resourceGroupId("string")
.autoScaling(DatabaseAutoScalingArgs.builder()
.disk(DatabaseAutoScalingDiskArgs.builder()
.capacityEnabled(false)
.freeSpaceLessThanPercent(0)
.ioAbovePercent(0)
.ioEnabled(false)
.ioOverPeriod("string")
.rateIncreasePercent(0)
.rateLimitMbPerMember(0)
.ratePeriodSeconds(0)
.rateUnits("string")
.build())
.memory(DatabaseAutoScalingMemoryArgs.builder()
.ioAbovePercent(0)
.ioEnabled(false)
.ioOverPeriod("string")
.rateIncreasePercent(0)
.rateLimitMbPerMember(0)
.ratePeriodSeconds(0)
.rateUnits("string")
.build())
.build())
.allowlists(DatabaseAllowlistArgs.builder()
.address("string")
.description("string")
.build())
.skipInitialBackup(false)
.tags("string")
.timeouts(DatabaseTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.users(DatabaseUserArgs.builder()
.name("string")
.password("string")
.role("string")
.type("string")
.build())
.version("string")
.build());
database_resource = ibm.Database("databaseResource",
location="string",
service_endpoints="string",
service="string",
plan="string",
logical_replication_slots=[{
"database_name": "string",
"name": "string",
"plugin_type": "string",
}],
backup_encryption_key_crn="string",
database_id="string",
deletion_protection=False,
group=[{
"count": 0,
"cpus": [{
"allocation_count": 0,
"can_scale_down": False,
"is_adjustable": False,
"minimum_count": 0,
"step_size_count": 0,
"units": "string",
}],
"disks": [{
"allocation_mb": 0,
"can_scale_down": False,
"is_adjustable": False,
"minimum_mb": 0,
"step_size_mb": 0,
"units": "string",
}],
"group_id": "string",
"host_flavors": [{
"hosting_size": "string",
"id": "string",
"name": "string",
}],
"memories": [{
"allocation_mb": 0,
"can_scale_down": False,
"cpu_enforcement_ratio_ceiling_mb": 0,
"cpu_enforcement_ratio_mb": 0,
"is_adjustable": False,
"minimum_mb": 0,
"step_size_mb": 0,
"units": "string",
}],
}],
key_protect_instance="string",
key_protect_key="string",
backup_id="string",
adminpassword="string",
name="string",
offline_restore=False,
configuration="string",
point_in_time_recovery_deployment_id="string",
point_in_time_recovery_time="string",
remote_leader_id="string",
resource_group_id="string",
auto_scaling={
"disk": {
"capacity_enabled": False,
"free_space_less_than_percent": 0,
"io_above_percent": 0,
"io_enabled": False,
"io_over_period": "string",
"rate_increase_percent": 0,
"rate_limit_mb_per_member": 0,
"rate_period_seconds": 0,
"rate_units": "string",
},
"memory": {
"io_above_percent": 0,
"io_enabled": False,
"io_over_period": "string",
"rate_increase_percent": 0,
"rate_limit_mb_per_member": 0,
"rate_period_seconds": 0,
"rate_units": "string",
},
},
allowlists=[{
"address": "string",
"description": "string",
}],
skip_initial_backup=False,
tags=["string"],
timeouts={
"create": "string",
"delete": "string",
"update": "string",
},
users=[{
"name": "string",
"password": "string",
"role": "string",
"type": "string",
}],
version="string")
const databaseResource = new ibm.Database("databaseResource", {
location: "string",
serviceEndpoints: "string",
service: "string",
plan: "string",
logicalReplicationSlots: [{
databaseName: "string",
name: "string",
pluginType: "string",
}],
backupEncryptionKeyCrn: "string",
databaseId: "string",
deletionProtection: false,
group: [{
count: 0,
cpus: [{
allocationCount: 0,
canScaleDown: false,
isAdjustable: false,
minimumCount: 0,
stepSizeCount: 0,
units: "string",
}],
disks: [{
allocationMb: 0,
canScaleDown: false,
isAdjustable: false,
minimumMb: 0,
stepSizeMb: 0,
units: "string",
}],
groupId: "string",
hostFlavors: [{
hostingSize: "string",
id: "string",
name: "string",
}],
memories: [{
allocationMb: 0,
canScaleDown: false,
cpuEnforcementRatioCeilingMb: 0,
cpuEnforcementRatioMb: 0,
isAdjustable: false,
minimumMb: 0,
stepSizeMb: 0,
units: "string",
}],
}],
keyProtectInstance: "string",
keyProtectKey: "string",
backupId: "string",
adminpassword: "string",
name: "string",
offlineRestore: false,
configuration: "string",
pointInTimeRecoveryDeploymentId: "string",
pointInTimeRecoveryTime: "string",
remoteLeaderId: "string",
resourceGroupId: "string",
autoScaling: {
disk: {
capacityEnabled: false,
freeSpaceLessThanPercent: 0,
ioAbovePercent: 0,
ioEnabled: false,
ioOverPeriod: "string",
rateIncreasePercent: 0,
rateLimitMbPerMember: 0,
ratePeriodSeconds: 0,
rateUnits: "string",
},
memory: {
ioAbovePercent: 0,
ioEnabled: false,
ioOverPeriod: "string",
rateIncreasePercent: 0,
rateLimitMbPerMember: 0,
ratePeriodSeconds: 0,
rateUnits: "string",
},
},
allowlists: [{
address: "string",
description: "string",
}],
skipInitialBackup: false,
tags: ["string"],
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
users: [{
name: "string",
password: "string",
role: "string",
type: "string",
}],
version: "string",
});
type: ibm:Database
properties:
adminpassword: string
allowlists:
- address: string
description: string
autoScaling:
disk:
capacityEnabled: false
freeSpaceLessThanPercent: 0
ioAbovePercent: 0
ioEnabled: false
ioOverPeriod: string
rateIncreasePercent: 0
rateLimitMbPerMember: 0
ratePeriodSeconds: 0
rateUnits: string
memory:
ioAbovePercent: 0
ioEnabled: false
ioOverPeriod: string
rateIncreasePercent: 0
rateLimitMbPerMember: 0
ratePeriodSeconds: 0
rateUnits: string
backupEncryptionKeyCrn: string
backupId: string
configuration: string
databaseId: string
deletionProtection: false
group:
- count: 0
cpus:
- allocationCount: 0
canScaleDown: false
isAdjustable: false
minimumCount: 0
stepSizeCount: 0
units: string
disks:
- allocationMb: 0
canScaleDown: false
isAdjustable: false
minimumMb: 0
stepSizeMb: 0
units: string
groupId: string
hostFlavors:
- hostingSize: string
id: string
name: string
memories:
- allocationMb: 0
canScaleDown: false
cpuEnforcementRatioCeilingMb: 0
cpuEnforcementRatioMb: 0
isAdjustable: false
minimumMb: 0
stepSizeMb: 0
units: string
keyProtectInstance: string
keyProtectKey: string
location: string
logicalReplicationSlots:
- databaseName: string
name: string
pluginType: string
name: string
offlineRestore: false
plan: string
pointInTimeRecoveryDeploymentId: string
pointInTimeRecoveryTime: string
remoteLeaderId: string
resourceGroupId: string
service: string
serviceEndpoints: string
skipInitialBackup: false
tags:
- string
timeouts:
create: string
delete: string
update: string
users:
- name: string
password: string
role: string
type: string
version: string
Database 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 Database resource accepts the following input properties:
- Location string
- The location or the region in which Database instance exists
- Plan string
- The name of the service plan that you choose for your instance. All databases use
standard
.enterprise
is supported only for elasticsearch (databases-for-elasticsearch
), and mongodb(databases-for-mongodb
).platinum
is supported for elasticsearch (databases-for-elasticsearch
). - Service string
- The type of Cloud Databases that you want to create. Only the following services are currently accepted:
databases-for-etcd
,databases-for-postgresql
,databases-for-redis
,databases-for-elasticsearch
,messages-for-rabbitmq
,databases-for-mongodb
,databases-for-mysql
, anddatabases-for-enterprisedb
. - Service
Endpoints string - Specify whether you want to enable the public, private, or both service endpoints. Supported values are
public
,private
, orpublic-and-private
. - Adminpassword string
- The password for the database administrator. Password must be between 15 and 32 characters in length and contain a letter and a number. The only special characters allowed are
-_
. - Allowlists
List<Database
Allowlist> A list of allowed IP addresses for the database. Multiple blocks are allowed.
Nested scheme for
allowlist
:- Auto
Scaling DatabaseAuto Scaling - Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.
- Nested scheme for
auto_scaling
:
- Nested scheme for
- Backup
Encryption stringKey Crn - The CRN of a key protect key, that you want to use for encrypting disk that holds deployment backups. A key protect CRN is in the format
crn:v1:<...>:key:
. Backup_encryption_key_crn can be added only at the time of creation and no update support are available. - Backup
Id string - The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format
crn:v1:<…>:backup:
. If omitted, the database is provisioned empty. - Configuration string
- Database Configuration in JSON format. Supported services:
databases-for-postgresql
,databases-for-redis
,databases-for-mysql
,messages-for-rabbitmq
anddatabases-for-enterprisedb
. For valid values please refer API docs. - Database
Id string - (String) The CRN of the database instance.
- Deletion
Protection bool - Group
List<Database
Group> - A set of group scaling values for the database. Multiple blocks are allowed. Can only be performed on is_adjustable=true groups. Values set are per-member. Values must be greater than or equal to the minimum size and must be a multiple of the step size.
- Nested scheme for
group
:
- Nested scheme for
- Key
Protect stringInstance - The instance CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. An instance CRN is in the format
crn:v1:<…>::
. - Key
Protect stringKey - The root key CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. A key CRN is in the format
crn:v1:<…>:key:
. You can specify the root key during the database creation only. After the database is created, you cannot update the root key. For more information, refer Disk encryption documentation. - Logical
Replication List<DatabaseSlots Logical Replication Slot> A list of logical replication slots that you want to create on the database. Multiple blocks are allowed. This is only available for
databases-for-postgresql
.Nested scheme for
logical_replication_slot
:- Name string
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- Offline
Restore bool - Enable or disable the Offline Restore option while performing a Point-in-time Recovery for MongoDB EE in a disaster recovery scenario when the source region is unavailable, see Point-in-time Recovery
- Point
In stringTime Recovery Deployment Id - The ID of the source deployment that you want to recover back to.
- Point
In stringTime Recovery Time - The timestamp in UTC format that you want to restore to. To retrieve the timestamp, run the
ibmcloud cdb postgresql earliest-pitr-timestamp <deployment name or CRN>
command. To restore to the latest available time, use a blank string""
as the timestamp. For more information, see Point-in-time Recovery. - Remote
Leader stringId - A CRN of the leader database to make the replica(read-only) deployment. The leader database is created by a database deployment with the same service ID. A read-only replica is set up to replicate all of your data from the leader deployment to the replica deployment by using asynchronous replication. Removing the
remote_leader_id
attribute from an existing read-only replica will promote the deployment to a standalone deployment. The deployment will restart and break its connection with the leader. This will disable all database users associated with this deployment. For more information, see Configuring Read-only Replicas. - Resource
Group stringId - The ID of the resource group where you want to create the instance. To retrieve this value, run
ibmcloud resource groups
or use theibm.ResourceGroup
data source. If no value is provided, thedefault
resource group is used. - Skip
Initial boolBackup - Should only be set when promoting a read-only replica. By setting this value to
true
, you skip the initial backup that would normally be taken upon promotion. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. The default isfalse
. For more information, see [Configuring Read-only Replicas] - List<string>
- A list of tags that you want to add to your instance.
- Timeouts
Database
Timeouts - Users
List<Database
User> A list of users that you want to create on the database. Multiple blocks are allowed.
Nested scheme for
users
:- Version string
- The version of the database to be provisioned. If omitted, the database is created with the most recent major and minor version.
- Location string
- The location or the region in which Database instance exists
- Plan string
- The name of the service plan that you choose for your instance. All databases use
standard
.enterprise
is supported only for elasticsearch (databases-for-elasticsearch
), and mongodb(databases-for-mongodb
).platinum
is supported for elasticsearch (databases-for-elasticsearch
). - Service string
- The type of Cloud Databases that you want to create. Only the following services are currently accepted:
databases-for-etcd
,databases-for-postgresql
,databases-for-redis
,databases-for-elasticsearch
,messages-for-rabbitmq
,databases-for-mongodb
,databases-for-mysql
, anddatabases-for-enterprisedb
. - Service
Endpoints string - Specify whether you want to enable the public, private, or both service endpoints. Supported values are
public
,private
, orpublic-and-private
. - Adminpassword string
- The password for the database administrator. Password must be between 15 and 32 characters in length and contain a letter and a number. The only special characters allowed are
-_
. - Allowlists
[]Database
Allowlist Args A list of allowed IP addresses for the database. Multiple blocks are allowed.
Nested scheme for
allowlist
:- Auto
Scaling DatabaseAuto Scaling Args - Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.
- Nested scheme for
auto_scaling
:
- Nested scheme for
- Backup
Encryption stringKey Crn - The CRN of a key protect key, that you want to use for encrypting disk that holds deployment backups. A key protect CRN is in the format
crn:v1:<...>:key:
. Backup_encryption_key_crn can be added only at the time of creation and no update support are available. - Backup
Id string - The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format
crn:v1:<…>:backup:
. If omitted, the database is provisioned empty. - Configuration string
- Database Configuration in JSON format. Supported services:
databases-for-postgresql
,databases-for-redis
,databases-for-mysql
,messages-for-rabbitmq
anddatabases-for-enterprisedb
. For valid values please refer API docs. - Database
Id string - (String) The CRN of the database instance.
- Deletion
Protection bool - Group
[]Database
Group Args - A set of group scaling values for the database. Multiple blocks are allowed. Can only be performed on is_adjustable=true groups. Values set are per-member. Values must be greater than or equal to the minimum size and must be a multiple of the step size.
- Nested scheme for
group
:
- Nested scheme for
- Key
Protect stringInstance - The instance CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. An instance CRN is in the format
crn:v1:<…>::
. - Key
Protect stringKey - The root key CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. A key CRN is in the format
crn:v1:<…>:key:
. You can specify the root key during the database creation only. After the database is created, you cannot update the root key. For more information, refer Disk encryption documentation. - Logical
Replication []DatabaseSlots Logical Replication Slot Args A list of logical replication slots that you want to create on the database. Multiple blocks are allowed. This is only available for
databases-for-postgresql
.Nested scheme for
logical_replication_slot
:- Name string
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- Offline
Restore bool - Enable or disable the Offline Restore option while performing a Point-in-time Recovery for MongoDB EE in a disaster recovery scenario when the source region is unavailable, see Point-in-time Recovery
- Point
In stringTime Recovery Deployment Id - The ID of the source deployment that you want to recover back to.
- Point
In stringTime Recovery Time - The timestamp in UTC format that you want to restore to. To retrieve the timestamp, run the
ibmcloud cdb postgresql earliest-pitr-timestamp <deployment name or CRN>
command. To restore to the latest available time, use a blank string""
as the timestamp. For more information, see Point-in-time Recovery. - Remote
Leader stringId - A CRN of the leader database to make the replica(read-only) deployment. The leader database is created by a database deployment with the same service ID. A read-only replica is set up to replicate all of your data from the leader deployment to the replica deployment by using asynchronous replication. Removing the
remote_leader_id
attribute from an existing read-only replica will promote the deployment to a standalone deployment. The deployment will restart and break its connection with the leader. This will disable all database users associated with this deployment. For more information, see Configuring Read-only Replicas. - Resource
Group stringId - The ID of the resource group where you want to create the instance. To retrieve this value, run
ibmcloud resource groups
or use theibm.ResourceGroup
data source. If no value is provided, thedefault
resource group is used. - Skip
Initial boolBackup - Should only be set when promoting a read-only replica. By setting this value to
true
, you skip the initial backup that would normally be taken upon promotion. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. The default isfalse
. For more information, see [Configuring Read-only Replicas] - []string
- A list of tags that you want to add to your instance.
- Timeouts
Database
Timeouts Args - Users
[]Database
User Args A list of users that you want to create on the database. Multiple blocks are allowed.
Nested scheme for
users
:- Version string
- The version of the database to be provisioned. If omitted, the database is created with the most recent major and minor version.
- location String
- The location or the region in which Database instance exists
- plan String
- The name of the service plan that you choose for your instance. All databases use
standard
.enterprise
is supported only for elasticsearch (databases-for-elasticsearch
), and mongodb(databases-for-mongodb
).platinum
is supported for elasticsearch (databases-for-elasticsearch
). - service String
- The type of Cloud Databases that you want to create. Only the following services are currently accepted:
databases-for-etcd
,databases-for-postgresql
,databases-for-redis
,databases-for-elasticsearch
,messages-for-rabbitmq
,databases-for-mongodb
,databases-for-mysql
, anddatabases-for-enterprisedb
. - service
Endpoints String - Specify whether you want to enable the public, private, or both service endpoints. Supported values are
public
,private
, orpublic-and-private
. - adminpassword String
- The password for the database administrator. Password must be between 15 and 32 characters in length and contain a letter and a number. The only special characters allowed are
-_
. - allowlists
List<Database
Allowlist> A list of allowed IP addresses for the database. Multiple blocks are allowed.
Nested scheme for
allowlist
:- auto
Scaling DatabaseAuto Scaling - Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.
- Nested scheme for
auto_scaling
:
- Nested scheme for
- backup
Encryption StringKey Crn - The CRN of a key protect key, that you want to use for encrypting disk that holds deployment backups. A key protect CRN is in the format
crn:v1:<...>:key:
. Backup_encryption_key_crn can be added only at the time of creation and no update support are available. - backup
Id String - The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format
crn:v1:<…>:backup:
. If omitted, the database is provisioned empty. - configuration String
- Database Configuration in JSON format. Supported services:
databases-for-postgresql
,databases-for-redis
,databases-for-mysql
,messages-for-rabbitmq
anddatabases-for-enterprisedb
. For valid values please refer API docs. - database
Id String - (String) The CRN of the database instance.
- deletion
Protection Boolean - group
List<Database
Group> - A set of group scaling values for the database. Multiple blocks are allowed. Can only be performed on is_adjustable=true groups. Values set are per-member. Values must be greater than or equal to the minimum size and must be a multiple of the step size.
- Nested scheme for
group
:
- Nested scheme for
- key
Protect StringInstance - The instance CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. An instance CRN is in the format
crn:v1:<…>::
. - key
Protect StringKey - The root key CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. A key CRN is in the format
crn:v1:<…>:key:
. You can specify the root key during the database creation only. After the database is created, you cannot update the root key. For more information, refer Disk encryption documentation. - logical
Replication List<DatabaseSlots Logical Replication Slot> A list of logical replication slots that you want to create on the database. Multiple blocks are allowed. This is only available for
databases-for-postgresql
.Nested scheme for
logical_replication_slot
:- name String
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- offline
Restore Boolean - Enable or disable the Offline Restore option while performing a Point-in-time Recovery for MongoDB EE in a disaster recovery scenario when the source region is unavailable, see Point-in-time Recovery
- point
In StringTime Recovery Deployment Id - The ID of the source deployment that you want to recover back to.
- point
In StringTime Recovery Time - The timestamp in UTC format that you want to restore to. To retrieve the timestamp, run the
ibmcloud cdb postgresql earliest-pitr-timestamp <deployment name or CRN>
command. To restore to the latest available time, use a blank string""
as the timestamp. For more information, see Point-in-time Recovery. - remote
Leader StringId - A CRN of the leader database to make the replica(read-only) deployment. The leader database is created by a database deployment with the same service ID. A read-only replica is set up to replicate all of your data from the leader deployment to the replica deployment by using asynchronous replication. Removing the
remote_leader_id
attribute from an existing read-only replica will promote the deployment to a standalone deployment. The deployment will restart and break its connection with the leader. This will disable all database users associated with this deployment. For more information, see Configuring Read-only Replicas. - resource
Group StringId - The ID of the resource group where you want to create the instance. To retrieve this value, run
ibmcloud resource groups
or use theibm.ResourceGroup
data source. If no value is provided, thedefault
resource group is used. - skip
Initial BooleanBackup - Should only be set when promoting a read-only replica. By setting this value to
true
, you skip the initial backup that would normally be taken upon promotion. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. The default isfalse
. For more information, see [Configuring Read-only Replicas] - List<String>
- A list of tags that you want to add to your instance.
- timeouts
Database
Timeouts - users
List<Database
User> A list of users that you want to create on the database. Multiple blocks are allowed.
Nested scheme for
users
:- version String
- The version of the database to be provisioned. If omitted, the database is created with the most recent major and minor version.
- location string
- The location or the region in which Database instance exists
- plan string
- The name of the service plan that you choose for your instance. All databases use
standard
.enterprise
is supported only for elasticsearch (databases-for-elasticsearch
), and mongodb(databases-for-mongodb
).platinum
is supported for elasticsearch (databases-for-elasticsearch
). - service string
- The type of Cloud Databases that you want to create. Only the following services are currently accepted:
databases-for-etcd
,databases-for-postgresql
,databases-for-redis
,databases-for-elasticsearch
,messages-for-rabbitmq
,databases-for-mongodb
,databases-for-mysql
, anddatabases-for-enterprisedb
. - service
Endpoints string - Specify whether you want to enable the public, private, or both service endpoints. Supported values are
public
,private
, orpublic-and-private
. - adminpassword string
- The password for the database administrator. Password must be between 15 and 32 characters in length and contain a letter and a number. The only special characters allowed are
-_
. - allowlists
Database
Allowlist[] A list of allowed IP addresses for the database. Multiple blocks are allowed.
Nested scheme for
allowlist
:- auto
Scaling DatabaseAuto Scaling - Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.
- Nested scheme for
auto_scaling
:
- Nested scheme for
- backup
Encryption stringKey Crn - The CRN of a key protect key, that you want to use for encrypting disk that holds deployment backups. A key protect CRN is in the format
crn:v1:<...>:key:
. Backup_encryption_key_crn can be added only at the time of creation and no update support are available. - backup
Id string - The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format
crn:v1:<…>:backup:
. If omitted, the database is provisioned empty. - configuration string
- Database Configuration in JSON format. Supported services:
databases-for-postgresql
,databases-for-redis
,databases-for-mysql
,messages-for-rabbitmq
anddatabases-for-enterprisedb
. For valid values please refer API docs. - database
Id string - (String) The CRN of the database instance.
- deletion
Protection boolean - group
Database
Group[] - A set of group scaling values for the database. Multiple blocks are allowed. Can only be performed on is_adjustable=true groups. Values set are per-member. Values must be greater than or equal to the minimum size and must be a multiple of the step size.
- Nested scheme for
group
:
- Nested scheme for
- key
Protect stringInstance - The instance CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. An instance CRN is in the format
crn:v1:<…>::
. - key
Protect stringKey - The root key CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. A key CRN is in the format
crn:v1:<…>:key:
. You can specify the root key during the database creation only. After the database is created, you cannot update the root key. For more information, refer Disk encryption documentation. - logical
Replication DatabaseSlots Logical Replication Slot[] A list of logical replication slots that you want to create on the database. Multiple blocks are allowed. This is only available for
databases-for-postgresql
.Nested scheme for
logical_replication_slot
:- name string
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- offline
Restore boolean - Enable or disable the Offline Restore option while performing a Point-in-time Recovery for MongoDB EE in a disaster recovery scenario when the source region is unavailable, see Point-in-time Recovery
- point
In stringTime Recovery Deployment Id - The ID of the source deployment that you want to recover back to.
- point
In stringTime Recovery Time - The timestamp in UTC format that you want to restore to. To retrieve the timestamp, run the
ibmcloud cdb postgresql earliest-pitr-timestamp <deployment name or CRN>
command. To restore to the latest available time, use a blank string""
as the timestamp. For more information, see Point-in-time Recovery. - remote
Leader stringId - A CRN of the leader database to make the replica(read-only) deployment. The leader database is created by a database deployment with the same service ID. A read-only replica is set up to replicate all of your data from the leader deployment to the replica deployment by using asynchronous replication. Removing the
remote_leader_id
attribute from an existing read-only replica will promote the deployment to a standalone deployment. The deployment will restart and break its connection with the leader. This will disable all database users associated with this deployment. For more information, see Configuring Read-only Replicas. - resource
Group stringId - The ID of the resource group where you want to create the instance. To retrieve this value, run
ibmcloud resource groups
or use theibm.ResourceGroup
data source. If no value is provided, thedefault
resource group is used. - skip
Initial booleanBackup - Should only be set when promoting a read-only replica. By setting this value to
true
, you skip the initial backup that would normally be taken upon promotion. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. The default isfalse
. For more information, see [Configuring Read-only Replicas] - string[]
- A list of tags that you want to add to your instance.
- timeouts
Database
Timeouts - users
Database
User[] A list of users that you want to create on the database. Multiple blocks are allowed.
Nested scheme for
users
:- version string
- The version of the database to be provisioned. If omitted, the database is created with the most recent major and minor version.
- location str
- The location or the region in which Database instance exists
- plan str
- The name of the service plan that you choose for your instance. All databases use
standard
.enterprise
is supported only for elasticsearch (databases-for-elasticsearch
), and mongodb(databases-for-mongodb
).platinum
is supported for elasticsearch (databases-for-elasticsearch
). - service str
- The type of Cloud Databases that you want to create. Only the following services are currently accepted:
databases-for-etcd
,databases-for-postgresql
,databases-for-redis
,databases-for-elasticsearch
,messages-for-rabbitmq
,databases-for-mongodb
,databases-for-mysql
, anddatabases-for-enterprisedb
. - service_
endpoints str - Specify whether you want to enable the public, private, or both service endpoints. Supported values are
public
,private
, orpublic-and-private
. - adminpassword str
- The password for the database administrator. Password must be between 15 and 32 characters in length and contain a letter and a number. The only special characters allowed are
-_
. - allowlists
Sequence[Database
Allowlist Args] A list of allowed IP addresses for the database. Multiple blocks are allowed.
Nested scheme for
allowlist
:- auto_
scaling DatabaseAuto Scaling Args - Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.
- Nested scheme for
auto_scaling
:
- Nested scheme for
- backup_
encryption_ strkey_ crn - The CRN of a key protect key, that you want to use for encrypting disk that holds deployment backups. A key protect CRN is in the format
crn:v1:<...>:key:
. Backup_encryption_key_crn can be added only at the time of creation and no update support are available. - backup_
id str - The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format
crn:v1:<…>:backup:
. If omitted, the database is provisioned empty. - configuration str
- Database Configuration in JSON format. Supported services:
databases-for-postgresql
,databases-for-redis
,databases-for-mysql
,messages-for-rabbitmq
anddatabases-for-enterprisedb
. For valid values please refer API docs. - database_
id str - (String) The CRN of the database instance.
- deletion_
protection bool - group
Sequence[Database
Group Args] - A set of group scaling values for the database. Multiple blocks are allowed. Can only be performed on is_adjustable=true groups. Values set are per-member. Values must be greater than or equal to the minimum size and must be a multiple of the step size.
- Nested scheme for
group
:
- Nested scheme for
- key_
protect_ strinstance - The instance CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. An instance CRN is in the format
crn:v1:<…>::
. - key_
protect_ strkey - The root key CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. A key CRN is in the format
crn:v1:<…>:key:
. You can specify the root key during the database creation only. After the database is created, you cannot update the root key. For more information, refer Disk encryption documentation. - logical_
replication_ Sequence[Databaseslots Logical Replication Slot Args] A list of logical replication slots that you want to create on the database. Multiple blocks are allowed. This is only available for
databases-for-postgresql
.Nested scheme for
logical_replication_slot
:- name str
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- offline_
restore bool - Enable or disable the Offline Restore option while performing a Point-in-time Recovery for MongoDB EE in a disaster recovery scenario when the source region is unavailable, see Point-in-time Recovery
- point_
in_ strtime_ recovery_ deployment_ id - The ID of the source deployment that you want to recover back to.
- point_
in_ strtime_ recovery_ time - The timestamp in UTC format that you want to restore to. To retrieve the timestamp, run the
ibmcloud cdb postgresql earliest-pitr-timestamp <deployment name or CRN>
command. To restore to the latest available time, use a blank string""
as the timestamp. For more information, see Point-in-time Recovery. - remote_
leader_ strid - A CRN of the leader database to make the replica(read-only) deployment. The leader database is created by a database deployment with the same service ID. A read-only replica is set up to replicate all of your data from the leader deployment to the replica deployment by using asynchronous replication. Removing the
remote_leader_id
attribute from an existing read-only replica will promote the deployment to a standalone deployment. The deployment will restart and break its connection with the leader. This will disable all database users associated with this deployment. For more information, see Configuring Read-only Replicas. - resource_
group_ strid - The ID of the resource group where you want to create the instance. To retrieve this value, run
ibmcloud resource groups
or use theibm.ResourceGroup
data source. If no value is provided, thedefault
resource group is used. - skip_
initial_ boolbackup - Should only be set when promoting a read-only replica. By setting this value to
true
, you skip the initial backup that would normally be taken upon promotion. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. The default isfalse
. For more information, see [Configuring Read-only Replicas] - Sequence[str]
- A list of tags that you want to add to your instance.
- timeouts
Database
Timeouts Args - users
Sequence[Database
User Args] A list of users that you want to create on the database. Multiple blocks are allowed.
Nested scheme for
users
:- version str
- The version of the database to be provisioned. If omitted, the database is created with the most recent major and minor version.
- location String
- The location or the region in which Database instance exists
- plan String
- The name of the service plan that you choose for your instance. All databases use
standard
.enterprise
is supported only for elasticsearch (databases-for-elasticsearch
), and mongodb(databases-for-mongodb
).platinum
is supported for elasticsearch (databases-for-elasticsearch
). - service String
- The type of Cloud Databases that you want to create. Only the following services are currently accepted:
databases-for-etcd
,databases-for-postgresql
,databases-for-redis
,databases-for-elasticsearch
,messages-for-rabbitmq
,databases-for-mongodb
,databases-for-mysql
, anddatabases-for-enterprisedb
. - service
Endpoints String - Specify whether you want to enable the public, private, or both service endpoints. Supported values are
public
,private
, orpublic-and-private
. - adminpassword String
- The password for the database administrator. Password must be between 15 and 32 characters in length and contain a letter and a number. The only special characters allowed are
-_
. - allowlists List<Property Map>
A list of allowed IP addresses for the database. Multiple blocks are allowed.
Nested scheme for
allowlist
:- auto
Scaling Property Map - Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.
- Nested scheme for
auto_scaling
:
- Nested scheme for
- backup
Encryption StringKey Crn - The CRN of a key protect key, that you want to use for encrypting disk that holds deployment backups. A key protect CRN is in the format
crn:v1:<...>:key:
. Backup_encryption_key_crn can be added only at the time of creation and no update support are available. - backup
Id String - The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format
crn:v1:<…>:backup:
. If omitted, the database is provisioned empty. - configuration String
- Database Configuration in JSON format. Supported services:
databases-for-postgresql
,databases-for-redis
,databases-for-mysql
,messages-for-rabbitmq
anddatabases-for-enterprisedb
. For valid values please refer API docs. - database
Id String - (String) The CRN of the database instance.
- deletion
Protection Boolean - group List<Property Map>
- A set of group scaling values for the database. Multiple blocks are allowed. Can only be performed on is_adjustable=true groups. Values set are per-member. Values must be greater than or equal to the minimum size and must be a multiple of the step size.
- Nested scheme for
group
:
- Nested scheme for
- key
Protect StringInstance - The instance CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. An instance CRN is in the format
crn:v1:<…>::
. - key
Protect StringKey - The root key CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. A key CRN is in the format
crn:v1:<…>:key:
. You can specify the root key during the database creation only. After the database is created, you cannot update the root key. For more information, refer Disk encryption documentation. - logical
Replication List<Property Map>Slots A list of logical replication slots that you want to create on the database. Multiple blocks are allowed. This is only available for
databases-for-postgresql
.Nested scheme for
logical_replication_slot
:- name String
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- offline
Restore Boolean - Enable or disable the Offline Restore option while performing a Point-in-time Recovery for MongoDB EE in a disaster recovery scenario when the source region is unavailable, see Point-in-time Recovery
- point
In StringTime Recovery Deployment Id - The ID of the source deployment that you want to recover back to.
- point
In StringTime Recovery Time - The timestamp in UTC format that you want to restore to. To retrieve the timestamp, run the
ibmcloud cdb postgresql earliest-pitr-timestamp <deployment name or CRN>
command. To restore to the latest available time, use a blank string""
as the timestamp. For more information, see Point-in-time Recovery. - remote
Leader StringId - A CRN of the leader database to make the replica(read-only) deployment. The leader database is created by a database deployment with the same service ID. A read-only replica is set up to replicate all of your data from the leader deployment to the replica deployment by using asynchronous replication. Removing the
remote_leader_id
attribute from an existing read-only replica will promote the deployment to a standalone deployment. The deployment will restart and break its connection with the leader. This will disable all database users associated with this deployment. For more information, see Configuring Read-only Replicas. - resource
Group StringId - The ID of the resource group where you want to create the instance. To retrieve this value, run
ibmcloud resource groups
or use theibm.ResourceGroup
data source. If no value is provided, thedefault
resource group is used. - skip
Initial BooleanBackup - Should only be set when promoting a read-only replica. By setting this value to
true
, you skip the initial backup that would normally be taken upon promotion. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. The default isfalse
. For more information, see [Configuring Read-only Replicas] - List<String>
- A list of tags that you want to add to your instance.
- timeouts Property Map
- users List<Property Map>
A list of users that you want to create on the database. Multiple blocks are allowed.
Nested scheme for
users
:- version String
- The version of the database to be provisioned. If omitted, the database is created with the most recent major and minor version.
Outputs
All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:
- Adminuser string
- (String) The user ID of the database administrator. Example,
admin
orroot
. - Configuration
Schema string - (String) Database Configuration Schema in JSON format.
- Groups
List<Database
Group> - Guid string
- The unique identifier of the database instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Resource
Controller stringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
- Resource
Crn string - The crn of the resource
- Resource
Group stringName - The resource group name in which resource is provisioned
- Resource
Name string - The name of the resource
- Resource
Status string - The status of the resource
- Status string
- (String) The status of the instance.
- Adminuser string
- (String) The user ID of the database administrator. Example,
admin
orroot
. - Configuration
Schema string - (String) Database Configuration Schema in JSON format.
- Groups
[]Database
Group - Guid string
- The unique identifier of the database instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Resource
Controller stringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
- Resource
Crn string - The crn of the resource
- Resource
Group stringName - The resource group name in which resource is provisioned
- Resource
Name string - The name of the resource
- Resource
Status string - The status of the resource
- Status string
- (String) The status of the instance.
- adminuser String
- (String) The user ID of the database administrator. Example,
admin
orroot
. - configuration
Schema String - (String) Database Configuration Schema in JSON format.
- groups
List<Database
Group> - guid String
- The unique identifier of the database instance.
- id String
- The provider-assigned unique ID for this managed resource.
- resource
Controller StringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
- resource
Crn String - The crn of the resource
- resource
Group StringName - The resource group name in which resource is provisioned
- resource
Name String - The name of the resource
- resource
Status String - The status of the resource
- status String
- (String) The status of the instance.
- adminuser string
- (String) The user ID of the database administrator. Example,
admin
orroot
. - configuration
Schema string - (String) Database Configuration Schema in JSON format.
- groups
Database
Group[] - guid string
- The unique identifier of the database instance.
- id string
- The provider-assigned unique ID for this managed resource.
- resource
Controller stringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
- resource
Crn string - The crn of the resource
- resource
Group stringName - The resource group name in which resource is provisioned
- resource
Name string - The name of the resource
- resource
Status string - The status of the resource
- status string
- (String) The status of the instance.
- adminuser str
- (String) The user ID of the database administrator. Example,
admin
orroot
. - configuration_
schema str - (String) Database Configuration Schema in JSON format.
- groups
Sequence[Database
Group] - guid str
- The unique identifier of the database instance.
- id str
- The provider-assigned unique ID for this managed resource.
- resource_
controller_ strurl - The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
- resource_
crn str - The crn of the resource
- resource_
group_ strname - The resource group name in which resource is provisioned
- resource_
name str - The name of the resource
- resource_
status str - The status of the resource
- status str
- (String) The status of the instance.
- adminuser String
- (String) The user ID of the database administrator. Example,
admin
orroot
. - configuration
Schema String - (String) Database Configuration Schema in JSON format.
- groups List<Property Map>
- guid String
- The unique identifier of the database instance.
- id String
- The provider-assigned unique ID for this managed resource.
- resource
Controller StringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
- resource
Crn String - The crn of the resource
- resource
Group StringName - The resource group name in which resource is provisioned
- resource
Name String - The name of the resource
- resource
Status String - The status of the resource
- status String
- (String) The status of the instance.
Look up Existing Database Resource
Get an existing Database 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?: DatabaseState, opts?: CustomResourceOptions): Database
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
adminpassword: Optional[str] = None,
adminuser: Optional[str] = None,
allowlists: Optional[Sequence[DatabaseAllowlistArgs]] = None,
auto_scaling: Optional[DatabaseAutoScalingArgs] = None,
backup_encryption_key_crn: Optional[str] = None,
backup_id: Optional[str] = None,
configuration: Optional[str] = None,
configuration_schema: Optional[str] = None,
database_id: Optional[str] = None,
deletion_protection: Optional[bool] = None,
group: Optional[Sequence[DatabaseGroupArgs]] = None,
groups: Optional[Sequence[DatabaseGroupArgs]] = None,
guid: Optional[str] = None,
key_protect_instance: Optional[str] = None,
key_protect_key: Optional[str] = None,
location: Optional[str] = None,
logical_replication_slots: Optional[Sequence[DatabaseLogicalReplicationSlotArgs]] = None,
name: Optional[str] = None,
offline_restore: Optional[bool] = None,
plan: Optional[str] = None,
point_in_time_recovery_deployment_id: Optional[str] = None,
point_in_time_recovery_time: Optional[str] = None,
remote_leader_id: Optional[str] = None,
resource_controller_url: Optional[str] = None,
resource_crn: Optional[str] = None,
resource_group_id: Optional[str] = None,
resource_group_name: Optional[str] = None,
resource_name: Optional[str] = None,
resource_status: Optional[str] = None,
service: Optional[str] = None,
service_endpoints: Optional[str] = None,
skip_initial_backup: Optional[bool] = None,
status: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
timeouts: Optional[DatabaseTimeoutsArgs] = None,
users: Optional[Sequence[DatabaseUserArgs]] = None,
version: Optional[str] = None) -> Database
func GetDatabase(ctx *Context, name string, id IDInput, state *DatabaseState, opts ...ResourceOption) (*Database, error)
public static Database Get(string name, Input<string> id, DatabaseState? state, CustomResourceOptions? opts = null)
public static Database get(String name, Output<String> id, DatabaseState state, CustomResourceOptions options)
resources: _: type: ibm:Database 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.
- Adminpassword string
- The password for the database administrator. Password must be between 15 and 32 characters in length and contain a letter and a number. The only special characters allowed are
-_
. - Adminuser string
- (String) The user ID of the database administrator. Example,
admin
orroot
. - Allowlists
List<Database
Allowlist> A list of allowed IP addresses for the database. Multiple blocks are allowed.
Nested scheme for
allowlist
:- Auto
Scaling DatabaseAuto Scaling - Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.
- Nested scheme for
auto_scaling
:
- Nested scheme for
- Backup
Encryption stringKey Crn - The CRN of a key protect key, that you want to use for encrypting disk that holds deployment backups. A key protect CRN is in the format
crn:v1:<...>:key:
. Backup_encryption_key_crn can be added only at the time of creation and no update support are available. - Backup
Id string - The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format
crn:v1:<…>:backup:
. If omitted, the database is provisioned empty. - Configuration string
- Database Configuration in JSON format. Supported services:
databases-for-postgresql
,databases-for-redis
,databases-for-mysql
,messages-for-rabbitmq
anddatabases-for-enterprisedb
. For valid values please refer API docs. - Configuration
Schema string - (String) Database Configuration Schema in JSON format.
- Database
Id string - (String) The CRN of the database instance.
- Deletion
Protection bool - Group
List<Database
Group> - A set of group scaling values for the database. Multiple blocks are allowed. Can only be performed on is_adjustable=true groups. Values set are per-member. Values must be greater than or equal to the minimum size and must be a multiple of the step size.
- Nested scheme for
group
:
- Nested scheme for
- Groups
List<Database
Group> - Guid string
- The unique identifier of the database instance.
- Key
Protect stringInstance - The instance CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. An instance CRN is in the format
crn:v1:<…>::
. - Key
Protect stringKey - The root key CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. A key CRN is in the format
crn:v1:<…>:key:
. You can specify the root key during the database creation only. After the database is created, you cannot update the root key. For more information, refer Disk encryption documentation. - Location string
- The location or the region in which Database instance exists
- Logical
Replication List<DatabaseSlots Logical Replication Slot> A list of logical replication slots that you want to create on the database. Multiple blocks are allowed. This is only available for
databases-for-postgresql
.Nested scheme for
logical_replication_slot
:- Name string
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- Offline
Restore bool - Enable or disable the Offline Restore option while performing a Point-in-time Recovery for MongoDB EE in a disaster recovery scenario when the source region is unavailable, see Point-in-time Recovery
- Plan string
- The name of the service plan that you choose for your instance. All databases use
standard
.enterprise
is supported only for elasticsearch (databases-for-elasticsearch
), and mongodb(databases-for-mongodb
).platinum
is supported for elasticsearch (databases-for-elasticsearch
). - Point
In stringTime Recovery Deployment Id - The ID of the source deployment that you want to recover back to.
- Point
In stringTime Recovery Time - The timestamp in UTC format that you want to restore to. To retrieve the timestamp, run the
ibmcloud cdb postgresql earliest-pitr-timestamp <deployment name or CRN>
command. To restore to the latest available time, use a blank string""
as the timestamp. For more information, see Point-in-time Recovery. - Remote
Leader stringId - A CRN of the leader database to make the replica(read-only) deployment. The leader database is created by a database deployment with the same service ID. A read-only replica is set up to replicate all of your data from the leader deployment to the replica deployment by using asynchronous replication. Removing the
remote_leader_id
attribute from an existing read-only replica will promote the deployment to a standalone deployment. The deployment will restart and break its connection with the leader. This will disable all database users associated with this deployment. For more information, see Configuring Read-only Replicas. - Resource
Controller stringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
- Resource
Crn string - The crn of the resource
- Resource
Group stringId - The ID of the resource group where you want to create the instance. To retrieve this value, run
ibmcloud resource groups
or use theibm.ResourceGroup
data source. If no value is provided, thedefault
resource group is used. - Resource
Group stringName - The resource group name in which resource is provisioned
- Resource
Name string - The name of the resource
- Resource
Status string - The status of the resource
- Service string
- The type of Cloud Databases that you want to create. Only the following services are currently accepted:
databases-for-etcd
,databases-for-postgresql
,databases-for-redis
,databases-for-elasticsearch
,messages-for-rabbitmq
,databases-for-mongodb
,databases-for-mysql
, anddatabases-for-enterprisedb
. - Service
Endpoints string - Specify whether you want to enable the public, private, or both service endpoints. Supported values are
public
,private
, orpublic-and-private
. - Skip
Initial boolBackup - Should only be set when promoting a read-only replica. By setting this value to
true
, you skip the initial backup that would normally be taken upon promotion. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. The default isfalse
. For more information, see [Configuring Read-only Replicas] - Status string
- (String) The status of the instance.
- List<string>
- A list of tags that you want to add to your instance.
- Timeouts
Database
Timeouts - Users
List<Database
User> A list of users that you want to create on the database. Multiple blocks are allowed.
Nested scheme for
users
:- Version string
- The version of the database to be provisioned. If omitted, the database is created with the most recent major and minor version.
- Adminpassword string
- The password for the database administrator. Password must be between 15 and 32 characters in length and contain a letter and a number. The only special characters allowed are
-_
. - Adminuser string
- (String) The user ID of the database administrator. Example,
admin
orroot
. - Allowlists
[]Database
Allowlist Args A list of allowed IP addresses for the database. Multiple blocks are allowed.
Nested scheme for
allowlist
:- Auto
Scaling DatabaseAuto Scaling Args - Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.
- Nested scheme for
auto_scaling
:
- Nested scheme for
- Backup
Encryption stringKey Crn - The CRN of a key protect key, that you want to use for encrypting disk that holds deployment backups. A key protect CRN is in the format
crn:v1:<...>:key:
. Backup_encryption_key_crn can be added only at the time of creation and no update support are available. - Backup
Id string - The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format
crn:v1:<…>:backup:
. If omitted, the database is provisioned empty. - Configuration string
- Database Configuration in JSON format. Supported services:
databases-for-postgresql
,databases-for-redis
,databases-for-mysql
,messages-for-rabbitmq
anddatabases-for-enterprisedb
. For valid values please refer API docs. - Configuration
Schema string - (String) Database Configuration Schema in JSON format.
- Database
Id string - (String) The CRN of the database instance.
- Deletion
Protection bool - Group
[]Database
Group Args - A set of group scaling values for the database. Multiple blocks are allowed. Can only be performed on is_adjustable=true groups. Values set are per-member. Values must be greater than or equal to the minimum size and must be a multiple of the step size.
- Nested scheme for
group
:
- Nested scheme for
- Groups
[]Database
Group Args - Guid string
- The unique identifier of the database instance.
- Key
Protect stringInstance - The instance CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. An instance CRN is in the format
crn:v1:<…>::
. - Key
Protect stringKey - The root key CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. A key CRN is in the format
crn:v1:<…>:key:
. You can specify the root key during the database creation only. After the database is created, you cannot update the root key. For more information, refer Disk encryption documentation. - Location string
- The location or the region in which Database instance exists
- Logical
Replication []DatabaseSlots Logical Replication Slot Args A list of logical replication slots that you want to create on the database. Multiple blocks are allowed. This is only available for
databases-for-postgresql
.Nested scheme for
logical_replication_slot
:- Name string
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- Offline
Restore bool - Enable or disable the Offline Restore option while performing a Point-in-time Recovery for MongoDB EE in a disaster recovery scenario when the source region is unavailable, see Point-in-time Recovery
- Plan string
- The name of the service plan that you choose for your instance. All databases use
standard
.enterprise
is supported only for elasticsearch (databases-for-elasticsearch
), and mongodb(databases-for-mongodb
).platinum
is supported for elasticsearch (databases-for-elasticsearch
). - Point
In stringTime Recovery Deployment Id - The ID of the source deployment that you want to recover back to.
- Point
In stringTime Recovery Time - The timestamp in UTC format that you want to restore to. To retrieve the timestamp, run the
ibmcloud cdb postgresql earliest-pitr-timestamp <deployment name or CRN>
command. To restore to the latest available time, use a blank string""
as the timestamp. For more information, see Point-in-time Recovery. - Remote
Leader stringId - A CRN of the leader database to make the replica(read-only) deployment. The leader database is created by a database deployment with the same service ID. A read-only replica is set up to replicate all of your data from the leader deployment to the replica deployment by using asynchronous replication. Removing the
remote_leader_id
attribute from an existing read-only replica will promote the deployment to a standalone deployment. The deployment will restart and break its connection with the leader. This will disable all database users associated with this deployment. For more information, see Configuring Read-only Replicas. - Resource
Controller stringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
- Resource
Crn string - The crn of the resource
- Resource
Group stringId - The ID of the resource group where you want to create the instance. To retrieve this value, run
ibmcloud resource groups
or use theibm.ResourceGroup
data source. If no value is provided, thedefault
resource group is used. - Resource
Group stringName - The resource group name in which resource is provisioned
- Resource
Name string - The name of the resource
- Resource
Status string - The status of the resource
- Service string
- The type of Cloud Databases that you want to create. Only the following services are currently accepted:
databases-for-etcd
,databases-for-postgresql
,databases-for-redis
,databases-for-elasticsearch
,messages-for-rabbitmq
,databases-for-mongodb
,databases-for-mysql
, anddatabases-for-enterprisedb
. - Service
Endpoints string - Specify whether you want to enable the public, private, or both service endpoints. Supported values are
public
,private
, orpublic-and-private
. - Skip
Initial boolBackup - Should only be set when promoting a read-only replica. By setting this value to
true
, you skip the initial backup that would normally be taken upon promotion. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. The default isfalse
. For more information, see [Configuring Read-only Replicas] - Status string
- (String) The status of the instance.
- []string
- A list of tags that you want to add to your instance.
- Timeouts
Database
Timeouts Args - Users
[]Database
User Args A list of users that you want to create on the database. Multiple blocks are allowed.
Nested scheme for
users
:- Version string
- The version of the database to be provisioned. If omitted, the database is created with the most recent major and minor version.
- adminpassword String
- The password for the database administrator. Password must be between 15 and 32 characters in length and contain a letter and a number. The only special characters allowed are
-_
. - adminuser String
- (String) The user ID of the database administrator. Example,
admin
orroot
. - allowlists
List<Database
Allowlist> A list of allowed IP addresses for the database. Multiple blocks are allowed.
Nested scheme for
allowlist
:- auto
Scaling DatabaseAuto Scaling - Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.
- Nested scheme for
auto_scaling
:
- Nested scheme for
- backup
Encryption StringKey Crn - The CRN of a key protect key, that you want to use for encrypting disk that holds deployment backups. A key protect CRN is in the format
crn:v1:<...>:key:
. Backup_encryption_key_crn can be added only at the time of creation and no update support are available. - backup
Id String - The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format
crn:v1:<…>:backup:
. If omitted, the database is provisioned empty. - configuration String
- Database Configuration in JSON format. Supported services:
databases-for-postgresql
,databases-for-redis
,databases-for-mysql
,messages-for-rabbitmq
anddatabases-for-enterprisedb
. For valid values please refer API docs. - configuration
Schema String - (String) Database Configuration Schema in JSON format.
- database
Id String - (String) The CRN of the database instance.
- deletion
Protection Boolean - group
List<Database
Group> - A set of group scaling values for the database. Multiple blocks are allowed. Can only be performed on is_adjustable=true groups. Values set are per-member. Values must be greater than or equal to the minimum size and must be a multiple of the step size.
- Nested scheme for
group
:
- Nested scheme for
- groups
List<Database
Group> - guid String
- The unique identifier of the database instance.
- key
Protect StringInstance - The instance CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. An instance CRN is in the format
crn:v1:<…>::
. - key
Protect StringKey - The root key CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. A key CRN is in the format
crn:v1:<…>:key:
. You can specify the root key during the database creation only. After the database is created, you cannot update the root key. For more information, refer Disk encryption documentation. - location String
- The location or the region in which Database instance exists
- logical
Replication List<DatabaseSlots Logical Replication Slot> A list of logical replication slots that you want to create on the database. Multiple blocks are allowed. This is only available for
databases-for-postgresql
.Nested scheme for
logical_replication_slot
:- name String
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- offline
Restore Boolean - Enable or disable the Offline Restore option while performing a Point-in-time Recovery for MongoDB EE in a disaster recovery scenario when the source region is unavailable, see Point-in-time Recovery
- plan String
- The name of the service plan that you choose for your instance. All databases use
standard
.enterprise
is supported only for elasticsearch (databases-for-elasticsearch
), and mongodb(databases-for-mongodb
).platinum
is supported for elasticsearch (databases-for-elasticsearch
). - point
In StringTime Recovery Deployment Id - The ID of the source deployment that you want to recover back to.
- point
In StringTime Recovery Time - The timestamp in UTC format that you want to restore to. To retrieve the timestamp, run the
ibmcloud cdb postgresql earliest-pitr-timestamp <deployment name or CRN>
command. To restore to the latest available time, use a blank string""
as the timestamp. For more information, see Point-in-time Recovery. - remote
Leader StringId - A CRN of the leader database to make the replica(read-only) deployment. The leader database is created by a database deployment with the same service ID. A read-only replica is set up to replicate all of your data from the leader deployment to the replica deployment by using asynchronous replication. Removing the
remote_leader_id
attribute from an existing read-only replica will promote the deployment to a standalone deployment. The deployment will restart and break its connection with the leader. This will disable all database users associated with this deployment. For more information, see Configuring Read-only Replicas. - resource
Controller StringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
- resource
Crn String - The crn of the resource
- resource
Group StringId - The ID of the resource group where you want to create the instance. To retrieve this value, run
ibmcloud resource groups
or use theibm.ResourceGroup
data source. If no value is provided, thedefault
resource group is used. - resource
Group StringName - The resource group name in which resource is provisioned
- resource
Name String - The name of the resource
- resource
Status String - The status of the resource
- service String
- The type of Cloud Databases that you want to create. Only the following services are currently accepted:
databases-for-etcd
,databases-for-postgresql
,databases-for-redis
,databases-for-elasticsearch
,messages-for-rabbitmq
,databases-for-mongodb
,databases-for-mysql
, anddatabases-for-enterprisedb
. - service
Endpoints String - Specify whether you want to enable the public, private, or both service endpoints. Supported values are
public
,private
, orpublic-and-private
. - skip
Initial BooleanBackup - Should only be set when promoting a read-only replica. By setting this value to
true
, you skip the initial backup that would normally be taken upon promotion. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. The default isfalse
. For more information, see [Configuring Read-only Replicas] - status String
- (String) The status of the instance.
- List<String>
- A list of tags that you want to add to your instance.
- timeouts
Database
Timeouts - users
List<Database
User> A list of users that you want to create on the database. Multiple blocks are allowed.
Nested scheme for
users
:- version String
- The version of the database to be provisioned. If omitted, the database is created with the most recent major and minor version.
- adminpassword string
- The password for the database administrator. Password must be between 15 and 32 characters in length and contain a letter and a number. The only special characters allowed are
-_
. - adminuser string
- (String) The user ID of the database administrator. Example,
admin
orroot
. - allowlists
Database
Allowlist[] A list of allowed IP addresses for the database. Multiple blocks are allowed.
Nested scheme for
allowlist
:- auto
Scaling DatabaseAuto Scaling - Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.
- Nested scheme for
auto_scaling
:
- Nested scheme for
- backup
Encryption stringKey Crn - The CRN of a key protect key, that you want to use for encrypting disk that holds deployment backups. A key protect CRN is in the format
crn:v1:<...>:key:
. Backup_encryption_key_crn can be added only at the time of creation and no update support are available. - backup
Id string - The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format
crn:v1:<…>:backup:
. If omitted, the database is provisioned empty. - configuration string
- Database Configuration in JSON format. Supported services:
databases-for-postgresql
,databases-for-redis
,databases-for-mysql
,messages-for-rabbitmq
anddatabases-for-enterprisedb
. For valid values please refer API docs. - configuration
Schema string - (String) Database Configuration Schema in JSON format.
- database
Id string - (String) The CRN of the database instance.
- deletion
Protection boolean - group
Database
Group[] - A set of group scaling values for the database. Multiple blocks are allowed. Can only be performed on is_adjustable=true groups. Values set are per-member. Values must be greater than or equal to the minimum size and must be a multiple of the step size.
- Nested scheme for
group
:
- Nested scheme for
- groups
Database
Group[] - guid string
- The unique identifier of the database instance.
- key
Protect stringInstance - The instance CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. An instance CRN is in the format
crn:v1:<…>::
. - key
Protect stringKey - The root key CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. A key CRN is in the format
crn:v1:<…>:key:
. You can specify the root key during the database creation only. After the database is created, you cannot update the root key. For more information, refer Disk encryption documentation. - location string
- The location or the region in which Database instance exists
- logical
Replication DatabaseSlots Logical Replication Slot[] A list of logical replication slots that you want to create on the database. Multiple blocks are allowed. This is only available for
databases-for-postgresql
.Nested scheme for
logical_replication_slot
:- name string
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- offline
Restore boolean - Enable or disable the Offline Restore option while performing a Point-in-time Recovery for MongoDB EE in a disaster recovery scenario when the source region is unavailable, see Point-in-time Recovery
- plan string
- The name of the service plan that you choose for your instance. All databases use
standard
.enterprise
is supported only for elasticsearch (databases-for-elasticsearch
), and mongodb(databases-for-mongodb
).platinum
is supported for elasticsearch (databases-for-elasticsearch
). - point
In stringTime Recovery Deployment Id - The ID of the source deployment that you want to recover back to.
- point
In stringTime Recovery Time - The timestamp in UTC format that you want to restore to. To retrieve the timestamp, run the
ibmcloud cdb postgresql earliest-pitr-timestamp <deployment name or CRN>
command. To restore to the latest available time, use a blank string""
as the timestamp. For more information, see Point-in-time Recovery. - remote
Leader stringId - A CRN of the leader database to make the replica(read-only) deployment. The leader database is created by a database deployment with the same service ID. A read-only replica is set up to replicate all of your data from the leader deployment to the replica deployment by using asynchronous replication. Removing the
remote_leader_id
attribute from an existing read-only replica will promote the deployment to a standalone deployment. The deployment will restart and break its connection with the leader. This will disable all database users associated with this deployment. For more information, see Configuring Read-only Replicas. - resource
Controller stringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
- resource
Crn string - The crn of the resource
- resource
Group stringId - The ID of the resource group where you want to create the instance. To retrieve this value, run
ibmcloud resource groups
or use theibm.ResourceGroup
data source. If no value is provided, thedefault
resource group is used. - resource
Group stringName - The resource group name in which resource is provisioned
- resource
Name string - The name of the resource
- resource
Status string - The status of the resource
- service string
- The type of Cloud Databases that you want to create. Only the following services are currently accepted:
databases-for-etcd
,databases-for-postgresql
,databases-for-redis
,databases-for-elasticsearch
,messages-for-rabbitmq
,databases-for-mongodb
,databases-for-mysql
, anddatabases-for-enterprisedb
. - service
Endpoints string - Specify whether you want to enable the public, private, or both service endpoints. Supported values are
public
,private
, orpublic-and-private
. - skip
Initial booleanBackup - Should only be set when promoting a read-only replica. By setting this value to
true
, you skip the initial backup that would normally be taken upon promotion. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. The default isfalse
. For more information, see [Configuring Read-only Replicas] - status string
- (String) The status of the instance.
- string[]
- A list of tags that you want to add to your instance.
- timeouts
Database
Timeouts - users
Database
User[] A list of users that you want to create on the database. Multiple blocks are allowed.
Nested scheme for
users
:- version string
- The version of the database to be provisioned. If omitted, the database is created with the most recent major and minor version.
- adminpassword str
- The password for the database administrator. Password must be between 15 and 32 characters in length and contain a letter and a number. The only special characters allowed are
-_
. - adminuser str
- (String) The user ID of the database administrator. Example,
admin
orroot
. - allowlists
Sequence[Database
Allowlist Args] A list of allowed IP addresses for the database. Multiple blocks are allowed.
Nested scheme for
allowlist
:- auto_
scaling DatabaseAuto Scaling Args - Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.
- Nested scheme for
auto_scaling
:
- Nested scheme for
- backup_
encryption_ strkey_ crn - The CRN of a key protect key, that you want to use for encrypting disk that holds deployment backups. A key protect CRN is in the format
crn:v1:<...>:key:
. Backup_encryption_key_crn can be added only at the time of creation and no update support are available. - backup_
id str - The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format
crn:v1:<…>:backup:
. If omitted, the database is provisioned empty. - configuration str
- Database Configuration in JSON format. Supported services:
databases-for-postgresql
,databases-for-redis
,databases-for-mysql
,messages-for-rabbitmq
anddatabases-for-enterprisedb
. For valid values please refer API docs. - configuration_
schema str - (String) Database Configuration Schema in JSON format.
- database_
id str - (String) The CRN of the database instance.
- deletion_
protection bool - group
Sequence[Database
Group Args] - A set of group scaling values for the database. Multiple blocks are allowed. Can only be performed on is_adjustable=true groups. Values set are per-member. Values must be greater than or equal to the minimum size and must be a multiple of the step size.
- Nested scheme for
group
:
- Nested scheme for
- groups
Sequence[Database
Group Args] - guid str
- The unique identifier of the database instance.
- key_
protect_ strinstance - The instance CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. An instance CRN is in the format
crn:v1:<…>::
. - key_
protect_ strkey - The root key CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. A key CRN is in the format
crn:v1:<…>:key:
. You can specify the root key during the database creation only. After the database is created, you cannot update the root key. For more information, refer Disk encryption documentation. - location str
- The location or the region in which Database instance exists
- logical_
replication_ Sequence[Databaseslots Logical Replication Slot Args] A list of logical replication slots that you want to create on the database. Multiple blocks are allowed. This is only available for
databases-for-postgresql
.Nested scheme for
logical_replication_slot
:- name str
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- offline_
restore bool - Enable or disable the Offline Restore option while performing a Point-in-time Recovery for MongoDB EE in a disaster recovery scenario when the source region is unavailable, see Point-in-time Recovery
- plan str
- The name of the service plan that you choose for your instance. All databases use
standard
.enterprise
is supported only for elasticsearch (databases-for-elasticsearch
), and mongodb(databases-for-mongodb
).platinum
is supported for elasticsearch (databases-for-elasticsearch
). - point_
in_ strtime_ recovery_ deployment_ id - The ID of the source deployment that you want to recover back to.
- point_
in_ strtime_ recovery_ time - The timestamp in UTC format that you want to restore to. To retrieve the timestamp, run the
ibmcloud cdb postgresql earliest-pitr-timestamp <deployment name or CRN>
command. To restore to the latest available time, use a blank string""
as the timestamp. For more information, see Point-in-time Recovery. - remote_
leader_ strid - A CRN of the leader database to make the replica(read-only) deployment. The leader database is created by a database deployment with the same service ID. A read-only replica is set up to replicate all of your data from the leader deployment to the replica deployment by using asynchronous replication. Removing the
remote_leader_id
attribute from an existing read-only replica will promote the deployment to a standalone deployment. The deployment will restart and break its connection with the leader. This will disable all database users associated with this deployment. For more information, see Configuring Read-only Replicas. - resource_
controller_ strurl - The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
- resource_
crn str - The crn of the resource
- resource_
group_ strid - The ID of the resource group where you want to create the instance. To retrieve this value, run
ibmcloud resource groups
or use theibm.ResourceGroup
data source. If no value is provided, thedefault
resource group is used. - resource_
group_ strname - The resource group name in which resource is provisioned
- resource_
name str - The name of the resource
- resource_
status str - The status of the resource
- service str
- The type of Cloud Databases that you want to create. Only the following services are currently accepted:
databases-for-etcd
,databases-for-postgresql
,databases-for-redis
,databases-for-elasticsearch
,messages-for-rabbitmq
,databases-for-mongodb
,databases-for-mysql
, anddatabases-for-enterprisedb
. - service_
endpoints str - Specify whether you want to enable the public, private, or both service endpoints. Supported values are
public
,private
, orpublic-and-private
. - skip_
initial_ boolbackup - Should only be set when promoting a read-only replica. By setting this value to
true
, you skip the initial backup that would normally be taken upon promotion. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. The default isfalse
. For more information, see [Configuring Read-only Replicas] - status str
- (String) The status of the instance.
- Sequence[str]
- A list of tags that you want to add to your instance.
- timeouts
Database
Timeouts Args - users
Sequence[Database
User Args] A list of users that you want to create on the database. Multiple blocks are allowed.
Nested scheme for
users
:- version str
- The version of the database to be provisioned. If omitted, the database is created with the most recent major and minor version.
- adminpassword String
- The password for the database administrator. Password must be between 15 and 32 characters in length and contain a letter and a number. The only special characters allowed are
-_
. - adminuser String
- (String) The user ID of the database administrator. Example,
admin
orroot
. - allowlists List<Property Map>
A list of allowed IP addresses for the database. Multiple blocks are allowed.
Nested scheme for
allowlist
:- auto
Scaling Property Map - Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.
- Nested scheme for
auto_scaling
:
- Nested scheme for
- backup
Encryption StringKey Crn - The CRN of a key protect key, that you want to use for encrypting disk that holds deployment backups. A key protect CRN is in the format
crn:v1:<...>:key:
. Backup_encryption_key_crn can be added only at the time of creation and no update support are available. - backup
Id String - The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format
crn:v1:<…>:backup:
. If omitted, the database is provisioned empty. - configuration String
- Database Configuration in JSON format. Supported services:
databases-for-postgresql
,databases-for-redis
,databases-for-mysql
,messages-for-rabbitmq
anddatabases-for-enterprisedb
. For valid values please refer API docs. - configuration
Schema String - (String) Database Configuration Schema in JSON format.
- database
Id String - (String) The CRN of the database instance.
- deletion
Protection Boolean - group List<Property Map>
- A set of group scaling values for the database. Multiple blocks are allowed. Can only be performed on is_adjustable=true groups. Values set are per-member. Values must be greater than or equal to the minimum size and must be a multiple of the step size.
- Nested scheme for
group
:
- Nested scheme for
- groups List<Property Map>
- guid String
- The unique identifier of the database instance.
- key
Protect StringInstance - The instance CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. An instance CRN is in the format
crn:v1:<…>::
. - key
Protect StringKey - The root key CRN of a Key Management Services like Key Protect or Hyper Protect Crypto Service (HPCS) that you want to use for disk encryption. A key CRN is in the format
crn:v1:<…>:key:
. You can specify the root key during the database creation only. After the database is created, you cannot update the root key. For more information, refer Disk encryption documentation. - location String
- The location or the region in which Database instance exists
- logical
Replication List<Property Map>Slots A list of logical replication slots that you want to create on the database. Multiple blocks are allowed. This is only available for
databases-for-postgresql
.Nested scheme for
logical_replication_slot
:- name String
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- offline
Restore Boolean - Enable or disable the Offline Restore option while performing a Point-in-time Recovery for MongoDB EE in a disaster recovery scenario when the source region is unavailable, see Point-in-time Recovery
- plan String
- The name of the service plan that you choose for your instance. All databases use
standard
.enterprise
is supported only for elasticsearch (databases-for-elasticsearch
), and mongodb(databases-for-mongodb
).platinum
is supported for elasticsearch (databases-for-elasticsearch
). - point
In StringTime Recovery Deployment Id - The ID of the source deployment that you want to recover back to.
- point
In StringTime Recovery Time - The timestamp in UTC format that you want to restore to. To retrieve the timestamp, run the
ibmcloud cdb postgresql earliest-pitr-timestamp <deployment name or CRN>
command. To restore to the latest available time, use a blank string""
as the timestamp. For more information, see Point-in-time Recovery. - remote
Leader StringId - A CRN of the leader database to make the replica(read-only) deployment. The leader database is created by a database deployment with the same service ID. A read-only replica is set up to replicate all of your data from the leader deployment to the replica deployment by using asynchronous replication. Removing the
remote_leader_id
attribute from an existing read-only replica will promote the deployment to a standalone deployment. The deployment will restart and break its connection with the leader. This will disable all database users associated with this deployment. For more information, see Configuring Read-only Replicas. - resource
Controller StringUrl - The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
- resource
Crn String - The crn of the resource
- resource
Group StringId - The ID of the resource group where you want to create the instance. To retrieve this value, run
ibmcloud resource groups
or use theibm.ResourceGroup
data source. If no value is provided, thedefault
resource group is used. - resource
Group StringName - The resource group name in which resource is provisioned
- resource
Name String - The name of the resource
- resource
Status String - The status of the resource
- service String
- The type of Cloud Databases that you want to create. Only the following services are currently accepted:
databases-for-etcd
,databases-for-postgresql
,databases-for-redis
,databases-for-elasticsearch
,messages-for-rabbitmq
,databases-for-mongodb
,databases-for-mysql
, anddatabases-for-enterprisedb
. - service
Endpoints String - Specify whether you want to enable the public, private, or both service endpoints. Supported values are
public
,private
, orpublic-and-private
. - skip
Initial BooleanBackup - Should only be set when promoting a read-only replica. By setting this value to
true
, you skip the initial backup that would normally be taken upon promotion. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. The default isfalse
. For more information, see [Configuring Read-only Replicas] - status String
- (String) The status of the instance.
- List<String>
- A list of tags that you want to add to your instance.
- timeouts Property Map
- users List<Property Map>
A list of users that you want to create on the database. Multiple blocks are allowed.
Nested scheme for
users
:- version String
- The version of the database to be provisioned. If omitted, the database is created with the most recent major and minor version.
Supporting Types
DatabaseAllowlist, DatabaseAllowlistArgs
- Address string
- The IP address or range of database client addresses to be allowlisted in CIDR format. Example,
172.168.1.2/32
. - Description string
- A description for the allowed IP addresses range.
- Address string
- The IP address or range of database client addresses to be allowlisted in CIDR format. Example,
172.168.1.2/32
. - Description string
- A description for the allowed IP addresses range.
- address String
- The IP address or range of database client addresses to be allowlisted in CIDR format. Example,
172.168.1.2/32
. - description String
- A description for the allowed IP addresses range.
- address string
- The IP address or range of database client addresses to be allowlisted in CIDR format. Example,
172.168.1.2/32
. - description string
- A description for the allowed IP addresses range.
- address str
- The IP address or range of database client addresses to be allowlisted in CIDR format. Example,
172.168.1.2/32
. - description str
- A description for the allowed IP addresses range.
- address String
- The IP address or range of database client addresses to be allowlisted in CIDR format. Example,
172.168.1.2/32
. - description String
- A description for the allowed IP addresses range.
DatabaseAutoScaling, DatabaseAutoScalingArgs
- Cpu
Database
Auto Scaling Cpu - CPU Auto Scaling
- Disk
Database
Auto Scaling Disk - Single block of disk is allowed at once in disk auto scaling.
- Nested scheme for
disk
:
- Nested scheme for
- Memory
Database
Auto Scaling Memory - Memory Auto Scaling in single block of memory is allowed at once.
- Nested scheme for
memory
:
- Nested scheme for
- Cpu
Database
Auto Scaling Cpu - CPU Auto Scaling
- Disk
Database
Auto Scaling Disk - Single block of disk is allowed at once in disk auto scaling.
- Nested scheme for
disk
:
- Nested scheme for
- Memory
Database
Auto Scaling Memory - Memory Auto Scaling in single block of memory is allowed at once.
- Nested scheme for
memory
:
- Nested scheme for
- cpu
Database
Auto Scaling Cpu - CPU Auto Scaling
- disk
Database
Auto Scaling Disk - Single block of disk is allowed at once in disk auto scaling.
- Nested scheme for
disk
:
- Nested scheme for
- memory
Database
Auto Scaling Memory - Memory Auto Scaling in single block of memory is allowed at once.
- Nested scheme for
memory
:
- Nested scheme for
- cpu
Database
Auto Scaling Cpu - CPU Auto Scaling
- disk
Database
Auto Scaling Disk - Single block of disk is allowed at once in disk auto scaling.
- Nested scheme for
disk
:
- Nested scheme for
- memory
Database
Auto Scaling Memory - Memory Auto Scaling in single block of memory is allowed at once.
- Nested scheme for
memory
:
- Nested scheme for
- cpu
Database
Auto Scaling Cpu - CPU Auto Scaling
- disk
Database
Auto Scaling Disk - Single block of disk is allowed at once in disk auto scaling.
- Nested scheme for
disk
:
- Nested scheme for
- memory
Database
Auto Scaling Memory - Memory Auto Scaling in single block of memory is allowed at once.
- Nested scheme for
memory
:
- Nested scheme for
- cpu Property Map
- CPU Auto Scaling
- disk Property Map
- Single block of disk is allowed at once in disk auto scaling.
- Nested scheme for
disk
:
- Nested scheme for
- memory Property Map
- Memory Auto Scaling in single block of memory is allowed at once.
- Nested scheme for
memory
:
- Nested scheme for
DatabaseAutoScalingCpu, DatabaseAutoScalingCpuArgs
- Rate
Increase doublePercent - Auto Scaling Rate: Increase Percent
- Rate
Limit doubleCount Per Member - Auto Scaling Rate: Limit count per number
- Rate
Period doubleSeconds - Auto Scaling Rate: Period Seconds
- Rate
Units string - Auto Scaling Rate: Units
- Rate
Increase float64Percent - Auto Scaling Rate: Increase Percent
- Rate
Limit float64Count Per Member - Auto Scaling Rate: Limit count per number
- Rate
Period float64Seconds - Auto Scaling Rate: Period Seconds
- Rate
Units string - Auto Scaling Rate: Units
- rate
Increase DoublePercent - Auto Scaling Rate: Increase Percent
- rate
Limit DoubleCount Per Member - Auto Scaling Rate: Limit count per number
- rate
Period DoubleSeconds - Auto Scaling Rate: Period Seconds
- rate
Units String - Auto Scaling Rate: Units
- rate
Increase numberPercent - Auto Scaling Rate: Increase Percent
- rate
Limit numberCount Per Member - Auto Scaling Rate: Limit count per number
- rate
Period numberSeconds - Auto Scaling Rate: Period Seconds
- rate
Units string - Auto Scaling Rate: Units
- rate_
increase_ floatpercent - Auto Scaling Rate: Increase Percent
- rate_
limit_ floatcount_ per_ member - Auto Scaling Rate: Limit count per number
- rate_
period_ floatseconds - Auto Scaling Rate: Period Seconds
- rate_
units str - Auto Scaling Rate: Units
- rate
Increase NumberPercent - Auto Scaling Rate: Increase Percent
- rate
Limit NumberCount Per Member - Auto Scaling Rate: Limit count per number
- rate
Period NumberSeconds - Auto Scaling Rate: Period Seconds
- rate
Units String - Auto Scaling Rate: Units
DatabaseAutoScalingDisk, DatabaseAutoScalingDiskArgs
- Capacity
Enabled bool - Auto scaling scalar enables or disables the scalar capacity.
- Free
Space doubleLess Than Percent - Auto scaling scalar capacity free space less than percent.
- Io
Above doublePercent - Auto scaling scalar I/O utilization above percent.
- Io
Enabled bool - Auto scaling scalar I/O utilization enabled.`
- Io
Over stringPeriod - Auto scaling scalar I/O utilization over period.
- Rate
Increase doublePercent - Auto scaling rate increase percent.
- Rate
Limit doubleMb Per Member - Auto scaling rate limit in megabytes per member.
- Rate
Period doubleSeconds - Auto scaling rate period in seconds.
- Rate
Units string - Auto scaling rate in units.
- Capacity
Enabled bool - Auto scaling scalar enables or disables the scalar capacity.
- Free
Space float64Less Than Percent - Auto scaling scalar capacity free space less than percent.
- Io
Above float64Percent - Auto scaling scalar I/O utilization above percent.
- Io
Enabled bool - Auto scaling scalar I/O utilization enabled.`
- Io
Over stringPeriod - Auto scaling scalar I/O utilization over period.
- Rate
Increase float64Percent - Auto scaling rate increase percent.
- Rate
Limit float64Mb Per Member - Auto scaling rate limit in megabytes per member.
- Rate
Period float64Seconds - Auto scaling rate period in seconds.
- Rate
Units string - Auto scaling rate in units.
- capacity
Enabled Boolean - Auto scaling scalar enables or disables the scalar capacity.
- free
Space DoubleLess Than Percent - Auto scaling scalar capacity free space less than percent.
- io
Above DoublePercent - Auto scaling scalar I/O utilization above percent.
- io
Enabled Boolean - Auto scaling scalar I/O utilization enabled.`
- io
Over StringPeriod - Auto scaling scalar I/O utilization over period.
- rate
Increase DoublePercent - Auto scaling rate increase percent.
- rate
Limit DoubleMb Per Member - Auto scaling rate limit in megabytes per member.
- rate
Period DoubleSeconds - Auto scaling rate period in seconds.
- rate
Units String - Auto scaling rate in units.
- capacity
Enabled boolean - Auto scaling scalar enables or disables the scalar capacity.
- free
Space numberLess Than Percent - Auto scaling scalar capacity free space less than percent.
- io
Above numberPercent - Auto scaling scalar I/O utilization above percent.
- io
Enabled boolean - Auto scaling scalar I/O utilization enabled.`
- io
Over stringPeriod - Auto scaling scalar I/O utilization over period.
- rate
Increase numberPercent - Auto scaling rate increase percent.
- rate
Limit numberMb Per Member - Auto scaling rate limit in megabytes per member.
- rate
Period numberSeconds - Auto scaling rate period in seconds.
- rate
Units string - Auto scaling rate in units.
- capacity_
enabled bool - Auto scaling scalar enables or disables the scalar capacity.
- free_
space_ floatless_ than_ percent - Auto scaling scalar capacity free space less than percent.
- io_
above_ floatpercent - Auto scaling scalar I/O utilization above percent.
- io_
enabled bool - Auto scaling scalar I/O utilization enabled.`
- io_
over_ strperiod - Auto scaling scalar I/O utilization over period.
- rate_
increase_ floatpercent - Auto scaling rate increase percent.
- rate_
limit_ floatmb_ per_ member - Auto scaling rate limit in megabytes per member.
- rate_
period_ floatseconds - Auto scaling rate period in seconds.
- rate_
units str - Auto scaling rate in units.
- capacity
Enabled Boolean - Auto scaling scalar enables or disables the scalar capacity.
- free
Space NumberLess Than Percent - Auto scaling scalar capacity free space less than percent.
- io
Above NumberPercent - Auto scaling scalar I/O utilization above percent.
- io
Enabled Boolean - Auto scaling scalar I/O utilization enabled.`
- io
Over StringPeriod - Auto scaling scalar I/O utilization over period.
- rate
Increase NumberPercent - Auto scaling rate increase percent.
- rate
Limit NumberMb Per Member - Auto scaling rate limit in megabytes per member.
- rate
Period NumberSeconds - Auto scaling rate period in seconds.
- rate
Units String - Auto scaling rate in units.
DatabaseAutoScalingMemory, DatabaseAutoScalingMemoryArgs
- Io
Above doublePercent - Auto scaling scalar I/O utilization above percent.
- Io
Enabled bool - Bool-Optional-Auto scaling scalar I/O utilization enabled.
- Io
Over stringPeriod - Auto scaling scalar I/O utilization over period.
- Rate
Increase doublePercent - Auto scaling rate in increase percent.
- Rate
Limit doubleMb Per Member - Auto scaling rate limit in megabytes per member.
- Rate
Period doubleSeconds - Auto scaling rate period in seconds.
- Rate
Units string - Auto scaling rate in units.
- Io
Above float64Percent - Auto scaling scalar I/O utilization above percent.
- Io
Enabled bool - Bool-Optional-Auto scaling scalar I/O utilization enabled.
- Io
Over stringPeriod - Auto scaling scalar I/O utilization over period.
- Rate
Increase float64Percent - Auto scaling rate in increase percent.
- Rate
Limit float64Mb Per Member - Auto scaling rate limit in megabytes per member.
- Rate
Period float64Seconds - Auto scaling rate period in seconds.
- Rate
Units string - Auto scaling rate in units.
- io
Above DoublePercent - Auto scaling scalar I/O utilization above percent.
- io
Enabled Boolean - Bool-Optional-Auto scaling scalar I/O utilization enabled.
- io
Over StringPeriod - Auto scaling scalar I/O utilization over period.
- rate
Increase DoublePercent - Auto scaling rate in increase percent.
- rate
Limit DoubleMb Per Member - Auto scaling rate limit in megabytes per member.
- rate
Period DoubleSeconds - Auto scaling rate period in seconds.
- rate
Units String - Auto scaling rate in units.
- io
Above numberPercent - Auto scaling scalar I/O utilization above percent.
- io
Enabled boolean - Bool-Optional-Auto scaling scalar I/O utilization enabled.
- io
Over stringPeriod - Auto scaling scalar I/O utilization over period.
- rate
Increase numberPercent - Auto scaling rate in increase percent.
- rate
Limit numberMb Per Member - Auto scaling rate limit in megabytes per member.
- rate
Period numberSeconds - Auto scaling rate period in seconds.
- rate
Units string - Auto scaling rate in units.
- io_
above_ floatpercent - Auto scaling scalar I/O utilization above percent.
- io_
enabled bool - Bool-Optional-Auto scaling scalar I/O utilization enabled.
- io_
over_ strperiod - Auto scaling scalar I/O utilization over period.
- rate_
increase_ floatpercent - Auto scaling rate in increase percent.
- rate_
limit_ floatmb_ per_ member - Auto scaling rate limit in megabytes per member.
- rate_
period_ floatseconds - Auto scaling rate period in seconds.
- rate_
units str - Auto scaling rate in units.
- io
Above NumberPercent - Auto scaling scalar I/O utilization above percent.
- io
Enabled Boolean - Bool-Optional-Auto scaling scalar I/O utilization enabled.
- io
Over StringPeriod - Auto scaling scalar I/O utilization over period.
- rate
Increase NumberPercent - Auto scaling rate in increase percent.
- rate
Limit NumberMb Per Member - Auto scaling rate limit in megabytes per member.
- rate
Period NumberSeconds - Auto scaling rate period in seconds.
- rate
Units String - Auto scaling rate in units.
DatabaseGroup, DatabaseGroupArgs
- Count double
- Cpus
List<Database
Group Cpus> - Nested scheme for
cpu
:
- Nested scheme for
- Disks
List<Database
Group Disk> - Group
Id string - The ID of the scaling group. Scaling group ID allowed values:
member
,analytics
, orbi_connector
. Read more aboutanalytics
andbi_connector
here. - Host
Flavors List<DatabaseGroup Host Flavor> - Nested scheme for
host_flavor
:
- Nested scheme for
- Memories
List<Database
Group Memory>
- Count float64
- Cpus
[]Database
Group Cpus - Nested scheme for
cpu
:
- Nested scheme for
- Disks
[]Database
Group Disk - Group
Id string - The ID of the scaling group. Scaling group ID allowed values:
member
,analytics
, orbi_connector
. Read more aboutanalytics
andbi_connector
here. - Host
Flavors []DatabaseGroup Host Flavor - Nested scheme for
host_flavor
:
- Nested scheme for
- Memories
[]Database
Group Memory
- count Double
- cpus
List<Database
Group Cpus> - Nested scheme for
cpu
:
- Nested scheme for
- disks
List<Database
Group Disk> - group
Id String - The ID of the scaling group. Scaling group ID allowed values:
member
,analytics
, orbi_connector
. Read more aboutanalytics
andbi_connector
here. - host
Flavors List<DatabaseGroup Host Flavor> - Nested scheme for
host_flavor
:
- Nested scheme for
- memories
List<Database
Group Memory>
- count number
- cpus
Database
Group Cpus[] - Nested scheme for
cpu
:
- Nested scheme for
- disks
Database
Group Disk[] - group
Id string - The ID of the scaling group. Scaling group ID allowed values:
member
,analytics
, orbi_connector
. Read more aboutanalytics
andbi_connector
here. - host
Flavors DatabaseGroup Host Flavor[] - Nested scheme for
host_flavor
:
- Nested scheme for
- memories
Database
Group Memory[]
- count float
- cpus
Sequence[Database
Group Cpus] - Nested scheme for
cpu
:
- Nested scheme for
- disks
Sequence[Database
Group Disk] - group_
id str - The ID of the scaling group. Scaling group ID allowed values:
member
,analytics
, orbi_connector
. Read more aboutanalytics
andbi_connector
here. - host_
flavors Sequence[DatabaseGroup Host Flavor] - Nested scheme for
host_flavor
:
- Nested scheme for
- memories
Sequence[Database
Group Memory]
- count Number
- cpus List<Property Map>
- Nested scheme for
cpu
:
- Nested scheme for
- disks List<Property Map>
- group
Id String - The ID of the scaling group. Scaling group ID allowed values:
member
,analytics
, orbi_connector
. Read more aboutanalytics
andbi_connector
here. - host
Flavors List<Property Map> - Nested scheme for
host_flavor
:
- Nested scheme for
- memories List<Property Map>
DatabaseGroupCpus, DatabaseGroupCpusArgs
- Allocation
Count double - Can
Scale boolDown - Is
Adjustable bool - Minimum
Count double - Step
Size doubleCount - Units string
- Allocation
Count float64 - Can
Scale boolDown - Is
Adjustable bool - Minimum
Count float64 - Step
Size float64Count - Units string
- allocation
Count Double - can
Scale BooleanDown - is
Adjustable Boolean - minimum
Count Double - step
Size DoubleCount - units String
- allocation
Count number - can
Scale booleanDown - is
Adjustable boolean - minimum
Count number - step
Size numberCount - units string
- allocation_
count float - can_
scale_ booldown - is_
adjustable bool - minimum_
count float - step_
size_ floatcount - units str
- allocation
Count Number - can
Scale BooleanDown - is
Adjustable Boolean - minimum
Count Number - step
Size NumberCount - units String
DatabaseGroupDisk, DatabaseGroupDiskArgs
- Allocation
Mb double - Can
Scale boolDown - Is
Adjustable bool - Minimum
Mb double - Step
Size doubleMb - Units string
- Allocation
Mb float64 - Can
Scale boolDown - Is
Adjustable bool - Minimum
Mb float64 - Step
Size float64Mb - Units string
- allocation
Mb Double - can
Scale BooleanDown - is
Adjustable Boolean - minimum
Mb Double - step
Size DoubleMb - units String
- allocation
Mb number - can
Scale booleanDown - is
Adjustable boolean - minimum
Mb number - step
Size numberMb - units string
- allocation_
mb float - can_
scale_ booldown - is_
adjustable bool - minimum_
mb float - step_
size_ floatmb - units str
- allocation
Mb Number - can
Scale BooleanDown - is
Adjustable Boolean - minimum
Mb Number - step
Size NumberMb - units String
DatabaseGroupHostFlavor, DatabaseGroupHostFlavorArgs
- Hosting
Size string - Id string
- (String) The CRN of the database instance.
- Name string
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- Hosting
Size string - Id string
- (String) The CRN of the database instance.
- Name string
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- hosting
Size String - id String
- (String) The CRN of the database instance.
- name String
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- hosting
Size string - id string
- (String) The CRN of the database instance.
- name string
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- hosting_
size str - id str
- (String) The CRN of the database instance.
- name str
- A descriptive name that is used to identify the database instance. The name must not include spaces.
- hosting
Size String - id String
- (String) The CRN of the database instance.
- name String
- A descriptive name that is used to identify the database instance. The name must not include spaces.
DatabaseGroupMemory, DatabaseGroupMemoryArgs
- Allocation
Mb double - Can
Scale boolDown - Cpu
Enforcement doubleRatio Ceiling Mb - Cpu
Enforcement doubleRatio Mb - Is
Adjustable bool - Minimum
Mb double - Step
Size doubleMb - Units string
- Allocation
Mb float64 - Can
Scale boolDown - Cpu
Enforcement float64Ratio Ceiling Mb - Cpu
Enforcement float64Ratio Mb - Is
Adjustable bool - Minimum
Mb float64 - Step
Size float64Mb - Units string
- allocation
Mb Double - can
Scale BooleanDown - cpu
Enforcement DoubleRatio Ceiling Mb - cpu
Enforcement DoubleRatio Mb - is
Adjustable Boolean - minimum
Mb Double - step
Size DoubleMb - units String
- allocation
Mb number - can
Scale booleanDown - cpu
Enforcement numberRatio Ceiling Mb - cpu
Enforcement numberRatio Mb - is
Adjustable boolean - minimum
Mb number - step
Size numberMb - units string
- allocation_
mb float - can_
scale_ booldown - cpu_
enforcement_ floatratio_ ceiling_ mb - cpu_
enforcement_ floatratio_ mb - is_
adjustable bool - minimum_
mb float - step_
size_ floatmb - units str
- allocation
Mb Number - can
Scale BooleanDown - cpu
Enforcement NumberRatio Ceiling Mb - cpu
Enforcement NumberRatio Mb - is
Adjustable Boolean - minimum
Mb Number - step
Size NumberMb - units String
DatabaseLogicalReplicationSlot, DatabaseLogicalReplicationSlotArgs
- Database
Name string - The name of the database on which you want to create the
logical_replication_slot
. - Name string
- The name of the
logical_replication_slot
. - Plugin
Type string The plugin type that is used to create the
logical_replication_slot
. Onlywal2json
is supported.Prereqs to creating a logical replication slot:
- Make sure the replication user's (
repl
) password has been changed. - Make sure that your database is configured such that logical replication can be enabled. This means thats the
wal_level
needs to be set tological
. Also,max_replication_slots
andmax_wal_senders
must be greater than 20. - For more information on enabling logical replication slots please see Configuring Wal2json
- Make sure the replication user's (
- Database
Name string - The name of the database on which you want to create the
logical_replication_slot
. - Name string
- The name of the
logical_replication_slot
. - Plugin
Type string The plugin type that is used to create the
logical_replication_slot
. Onlywal2json
is supported.Prereqs to creating a logical replication slot:
- Make sure the replication user's (
repl
) password has been changed. - Make sure that your database is configured such that logical replication can be enabled. This means thats the
wal_level
needs to be set tological
. Also,max_replication_slots
andmax_wal_senders
must be greater than 20. - For more information on enabling logical replication slots please see Configuring Wal2json
- Make sure the replication user's (
- database
Name String - The name of the database on which you want to create the
logical_replication_slot
. - name String
- The name of the
logical_replication_slot
. - plugin
Type String The plugin type that is used to create the
logical_replication_slot
. Onlywal2json
is supported.Prereqs to creating a logical replication slot:
- Make sure the replication user's (
repl
) password has been changed. - Make sure that your database is configured such that logical replication can be enabled. This means thats the
wal_level
needs to be set tological
. Also,max_replication_slots
andmax_wal_senders
must be greater than 20. - For more information on enabling logical replication slots please see Configuring Wal2json
- Make sure the replication user's (
- database
Name string - The name of the database on which you want to create the
logical_replication_slot
. - name string
- The name of the
logical_replication_slot
. - plugin
Type string The plugin type that is used to create the
logical_replication_slot
. Onlywal2json
is supported.Prereqs to creating a logical replication slot:
- Make sure the replication user's (
repl
) password has been changed. - Make sure that your database is configured such that logical replication can be enabled. This means thats the
wal_level
needs to be set tological
. Also,max_replication_slots
andmax_wal_senders
must be greater than 20. - For more information on enabling logical replication slots please see Configuring Wal2json
- Make sure the replication user's (
- database_
name str - The name of the database on which you want to create the
logical_replication_slot
. - name str
- The name of the
logical_replication_slot
. - plugin_
type str The plugin type that is used to create the
logical_replication_slot
. Onlywal2json
is supported.Prereqs to creating a logical replication slot:
- Make sure the replication user's (
repl
) password has been changed. - Make sure that your database is configured such that logical replication can be enabled. This means thats the
wal_level
needs to be set tological
. Also,max_replication_slots
andmax_wal_senders
must be greater than 20. - For more information on enabling logical replication slots please see Configuring Wal2json
- Make sure the replication user's (
- database
Name String - The name of the database on which you want to create the
logical_replication_slot
. - name String
- The name of the
logical_replication_slot
. - plugin
Type String The plugin type that is used to create the
logical_replication_slot
. Onlywal2json
is supported.Prereqs to creating a logical replication slot:
- Make sure the replication user's (
repl
) password has been changed. - Make sure that your database is configured such that logical replication can be enabled. This means thats the
wal_level
needs to be set tological
. Also,max_replication_slots
andmax_wal_senders
must be greater than 20. - For more information on enabling logical replication slots please see Configuring Wal2json
- Make sure the replication user's (
DatabaseTimeouts, DatabaseTimeoutsArgs
DatabaseUser, DatabaseUserArgs
- Name string
- The user name to add to the database instance. The user name must be in the range 5 - 32 characters.
- Password string
- The password for the user. Passwords must be between 15 and 32 characters in length and contain a letter and a number. Users with an
ops_manager
user type must have a password containing a special character~!@#$%^&*()=+[]{}|;:,.<>/?_-
as well as a letter and a number. Other user types may only use special characters-_
. - Role string
- The role for the user. Only available for
ops_manager
user type or Redis 6.0 and above. Example roles forops_manager
:group_read_only
,group_data_access_admin
. For, Redis 6.0 and above,role
must be in Redis ACL syntax for adding and removing command categories i.e.+@category
or-@category
. Allowed command categories areall
,admin
,read
,write
. Example Redisrole
:-@all +@read
- Type string
- The type for the user. Examples:
database
,ops_manager
,read_only_replica
. The default value isdatabase
.
- Name string
- The user name to add to the database instance. The user name must be in the range 5 - 32 characters.
- Password string
- The password for the user. Passwords must be between 15 and 32 characters in length and contain a letter and a number. Users with an
ops_manager
user type must have a password containing a special character~!@#$%^&*()=+[]{}|;:,.<>/?_-
as well as a letter and a number. Other user types may only use special characters-_
. - Role string
- The role for the user. Only available for
ops_manager
user type or Redis 6.0 and above. Example roles forops_manager
:group_read_only
,group_data_access_admin
. For, Redis 6.0 and above,role
must be in Redis ACL syntax for adding and removing command categories i.e.+@category
or-@category
. Allowed command categories areall
,admin
,read
,write
. Example Redisrole
:-@all +@read
- Type string
- The type for the user. Examples:
database
,ops_manager
,read_only_replica
. The default value isdatabase
.
- name String
- The user name to add to the database instance. The user name must be in the range 5 - 32 characters.
- password String
- The password for the user. Passwords must be between 15 and 32 characters in length and contain a letter and a number. Users with an
ops_manager
user type must have a password containing a special character~!@#$%^&*()=+[]{}|;:,.<>/?_-
as well as a letter and a number. Other user types may only use special characters-_
. - role String
- The role for the user. Only available for
ops_manager
user type or Redis 6.0 and above. Example roles forops_manager
:group_read_only
,group_data_access_admin
. For, Redis 6.0 and above,role
must be in Redis ACL syntax for adding and removing command categories i.e.+@category
or-@category
. Allowed command categories areall
,admin
,read
,write
. Example Redisrole
:-@all +@read
- type String
- The type for the user. Examples:
database
,ops_manager
,read_only_replica
. The default value isdatabase
.
- name string
- The user name to add to the database instance. The user name must be in the range 5 - 32 characters.
- password string
- The password for the user. Passwords must be between 15 and 32 characters in length and contain a letter and a number. Users with an
ops_manager
user type must have a password containing a special character~!@#$%^&*()=+[]{}|;:,.<>/?_-
as well as a letter and a number. Other user types may only use special characters-_
. - role string
- The role for the user. Only available for
ops_manager
user type or Redis 6.0 and above. Example roles forops_manager
:group_read_only
,group_data_access_admin
. For, Redis 6.0 and above,role
must be in Redis ACL syntax for adding and removing command categories i.e.+@category
or-@category
. Allowed command categories areall
,admin
,read
,write
. Example Redisrole
:-@all +@read
- type string
- The type for the user. Examples:
database
,ops_manager
,read_only_replica
. The default value isdatabase
.
- name str
- The user name to add to the database instance. The user name must be in the range 5 - 32 characters.
- password str
- The password for the user. Passwords must be between 15 and 32 characters in length and contain a letter and a number. Users with an
ops_manager
user type must have a password containing a special character~!@#$%^&*()=+[]{}|;:,.<>/?_-
as well as a letter and a number. Other user types may only use special characters-_
. - role str
- The role for the user. Only available for
ops_manager
user type or Redis 6.0 and above. Example roles forops_manager
:group_read_only
,group_data_access_admin
. For, Redis 6.0 and above,role
must be in Redis ACL syntax for adding and removing command categories i.e.+@category
or-@category
. Allowed command categories areall
,admin
,read
,write
. Example Redisrole
:-@all +@read
- type str
- The type for the user. Examples:
database
,ops_manager
,read_only_replica
. The default value isdatabase
.
- name String
- The user name to add to the database instance. The user name must be in the range 5 - 32 characters.
- password String
- The password for the user. Passwords must be between 15 and 32 characters in length and contain a letter and a number. Users with an
ops_manager
user type must have a password containing a special character~!@#$%^&*()=+[]{}|;:,.<>/?_-
as well as a letter and a number. Other user types may only use special characters-_
. - role String
- The role for the user. Only available for
ops_manager
user type or Redis 6.0 and above. Example roles forops_manager
:group_read_only
,group_data_access_admin
. For, Redis 6.0 and above,role
must be in Redis ACL syntax for adding and removing command categories i.e.+@category
or-@category
. Allowed command categories areall
,admin
,read
,write
. Example Redisrole
:-@all +@read
- type String
- The type for the user. Examples:
database
,ops_manager
,read_only_replica
. The default value isdatabase
.
Import
The database instance can be imported by using the ID, that is formed from the CRN. To import the resource, you must specify the region
parameter in the provider
block of your Terraform configuration file. If the region is not specified, us-south
is used by default. An Terraform refresh or apply fails, if the database instance is not in the same region as configured in the provider or its alias.
CRN is a 120 digit character string of the form - crn:v1:bluemix:public:databases-for-postgresql:us-south:a/4ea1882a2d3401ed1e459979941966ea:79226bd4-4076-4873-b5ce-b1dba48ff8c4::
Syntax
$ pulumi import ibm:index/database:Database my_db <crn>
Example
$ pulumi import ibm:index/database:Database my_db crn:v1:bluemix:public:databases-for-postgresql:us-south:a/4ea1882a2d3401ed1e459979941966ea:79226bd4-4076-4873-b5ce-b1dba48ff8c4::
Import requires a minimal Terraform config file to allow importing.
Run terraform state show ibm_database.<your_database>
after import to retrieve the more values to be included in the resource config file. Observe the ICD exports the admin userid. It does not export any more user IDs and passwords that are configured on the instance. These values must be retrieved from an alternative source. If new passwords need to be configured or the connection string that is retrieved to use the service, a new users block must be defined to create new users. This limitation is due to a lack of ICD functionality.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.