1. Packages
  2. Ibm Provider
  3. API Docs
  4. Database
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.Database

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    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, and databases-for-enterprisedb.
    ServiceEndpoints string
    Specify whether you want to enable the public, private, or both service endpoints. Supported values are public, private, or public-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<DatabaseAllowlist>

    A list of allowed IP addresses for the database. Multiple blocks are allowed.

    Nested scheme for allowlist:

    AutoScaling DatabaseAutoScaling
    Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.

    • Nested scheme for auto_scaling:
    BackupEncryptionKeyCrn string
    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.
    BackupId 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 and databases-for-enterprisedb. For valid values please refer API docs.
    DatabaseId string
    (String) The CRN of the database instance.
    DeletionProtection bool
    Group List<DatabaseGroup>
    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:
    KeyProtectInstance string
    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:<…>::.
    KeyProtectKey string
    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.
    LogicalReplicationSlots List<DatabaseLogicalReplicationSlot>

    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.
    OfflineRestore 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
    PointInTimeRecoveryDeploymentId string
    The ID of the source deployment that you want to recover back to.
    PointInTimeRecoveryTime string
    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.
    RemoteLeaderId string
    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.
    ResourceGroupId string
    The ID of the resource group where you want to create the instance. To retrieve this value, run ibmcloud resource groups or use the ibm.ResourceGroup data source. If no value is provided, the default resource group is used.
    SkipInitialBackup bool
    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 is false. For more information, see [Configuring Read-only Replicas]
    Tags List<string>
    A list of tags that you want to add to your instance.
    Timeouts DatabaseTimeouts
    Users List<DatabaseUser>

    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, and databases-for-enterprisedb.
    ServiceEndpoints string
    Specify whether you want to enable the public, private, or both service endpoints. Supported values are public, private, or public-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 []DatabaseAllowlistArgs

    A list of allowed IP addresses for the database. Multiple blocks are allowed.

    Nested scheme for allowlist:

    AutoScaling DatabaseAutoScalingArgs
    Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.

    • Nested scheme for auto_scaling:
    BackupEncryptionKeyCrn string
    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.
    BackupId 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 and databases-for-enterprisedb. For valid values please refer API docs.
    DatabaseId string
    (String) The CRN of the database instance.
    DeletionProtection bool
    Group []DatabaseGroupArgs
    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:
    KeyProtectInstance string
    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:<…>::.
    KeyProtectKey string
    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.
    LogicalReplicationSlots []DatabaseLogicalReplicationSlotArgs

    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.
    OfflineRestore 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
    PointInTimeRecoveryDeploymentId string
    The ID of the source deployment that you want to recover back to.
    PointInTimeRecoveryTime string
    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.
    RemoteLeaderId string
    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.
    ResourceGroupId string
    The ID of the resource group where you want to create the instance. To retrieve this value, run ibmcloud resource groups or use the ibm.ResourceGroup data source. If no value is provided, the default resource group is used.
    SkipInitialBackup bool
    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 is false. For more information, see [Configuring Read-only Replicas]
    Tags []string
    A list of tags that you want to add to your instance.
    Timeouts DatabaseTimeoutsArgs
    Users []DatabaseUserArgs

    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, and databases-for-enterprisedb.
    serviceEndpoints String
    Specify whether you want to enable the public, private, or both service endpoints. Supported values are public, private, or public-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<DatabaseAllowlist>

    A list of allowed IP addresses for the database. Multiple blocks are allowed.

    Nested scheme for allowlist:

    autoScaling DatabaseAutoScaling
    Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.

    • Nested scheme for auto_scaling:
    backupEncryptionKeyCrn String
    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.
    backupId 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 and databases-for-enterprisedb. For valid values please refer API docs.
    databaseId String
    (String) The CRN of the database instance.
    deletionProtection Boolean
    group List<DatabaseGroup>
    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:
    keyProtectInstance String
    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:<…>::.
    keyProtectKey String
    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.
    logicalReplicationSlots List<DatabaseLogicalReplicationSlot>

    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.
    offlineRestore 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
    pointInTimeRecoveryDeploymentId String
    The ID of the source deployment that you want to recover back to.
    pointInTimeRecoveryTime String
    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.
    remoteLeaderId String
    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.
    resourceGroupId String
    The ID of the resource group where you want to create the instance. To retrieve this value, run ibmcloud resource groups or use the ibm.ResourceGroup data source. If no value is provided, the default resource group is used.
    skipInitialBackup Boolean
    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 is false. For more information, see [Configuring Read-only Replicas]
    tags List<String>
    A list of tags that you want to add to your instance.
    timeouts DatabaseTimeouts
    users List<DatabaseUser>

    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, and databases-for-enterprisedb.
    serviceEndpoints string
    Specify whether you want to enable the public, private, or both service endpoints. Supported values are public, private, or public-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 DatabaseAllowlist[]

    A list of allowed IP addresses for the database. Multiple blocks are allowed.

    Nested scheme for allowlist:

    autoScaling DatabaseAutoScaling
    Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.

    • Nested scheme for auto_scaling:
    backupEncryptionKeyCrn string
    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.
    backupId 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 and databases-for-enterprisedb. For valid values please refer API docs.
    databaseId string
    (String) The CRN of the database instance.
    deletionProtection boolean
    group DatabaseGroup[]
    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:
    keyProtectInstance string
    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:<…>::.
    keyProtectKey string
    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.
    logicalReplicationSlots DatabaseLogicalReplicationSlot[]

    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.
    offlineRestore 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
    pointInTimeRecoveryDeploymentId string
    The ID of the source deployment that you want to recover back to.
    pointInTimeRecoveryTime string
    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.
    remoteLeaderId string
    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.
    resourceGroupId string
    The ID of the resource group where you want to create the instance. To retrieve this value, run ibmcloud resource groups or use the ibm.ResourceGroup data source. If no value is provided, the default resource group is used.
    skipInitialBackup boolean
    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 is false. For more information, see [Configuring Read-only Replicas]
    tags string[]
    A list of tags that you want to add to your instance.
    timeouts DatabaseTimeouts
    users DatabaseUser[]

    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, and databases-for-enterprisedb.
    service_endpoints str
    Specify whether you want to enable the public, private, or both service endpoints. Supported values are public, private, or public-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[DatabaseAllowlistArgs]

    A list of allowed IP addresses for the database. Multiple blocks are allowed.

    Nested scheme for allowlist:

    auto_scaling DatabaseAutoScalingArgs
    Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.

    • Nested scheme for auto_scaling:
    backup_encryption_key_crn str
    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 and databases-for-enterprisedb. For valid values please refer API docs.
    database_id str
    (String) The CRN of the database instance.
    deletion_protection bool
    group Sequence[DatabaseGroupArgs]
    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:
    key_protect_instance str
    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_key str
    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_slots Sequence[DatabaseLogicalReplicationSlotArgs]

    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_time_recovery_deployment_id str
    The ID of the source deployment that you want to recover back to.
    point_in_time_recovery_time str
    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_id str
    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_id str
    The ID of the resource group where you want to create the instance. To retrieve this value, run ibmcloud resource groups or use the ibm.ResourceGroup data source. If no value is provided, the default resource group is used.
    skip_initial_backup bool
    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 is false. For more information, see [Configuring Read-only Replicas]
    tags Sequence[str]
    A list of tags that you want to add to your instance.
    timeouts DatabaseTimeoutsArgs
    users Sequence[DatabaseUserArgs]

    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, and databases-for-enterprisedb.
    serviceEndpoints String
    Specify whether you want to enable the public, private, or both service endpoints. Supported values are public, private, or public-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:

    autoScaling 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:
    backupEncryptionKeyCrn String
    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.
    backupId 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 and databases-for-enterprisedb. For valid values please refer API docs.
    databaseId String
    (String) The CRN of the database instance.
    deletionProtection 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:
    keyProtectInstance String
    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:<…>::.
    keyProtectKey String
    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.
    logicalReplicationSlots List<Property Map>

    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.
    offlineRestore 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
    pointInTimeRecoveryDeploymentId String
    The ID of the source deployment that you want to recover back to.
    pointInTimeRecoveryTime String
    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.
    remoteLeaderId String
    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.
    resourceGroupId String
    The ID of the resource group where you want to create the instance. To retrieve this value, run ibmcloud resource groups or use the ibm.ResourceGroup data source. If no value is provided, the default resource group is used.
    skipInitialBackup Boolean
    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 is false. For more information, see [Configuring Read-only Replicas]
    tags 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 or root.
    ConfigurationSchema string
    (String) Database Configuration Schema in JSON format.
    Groups List<DatabaseGroup>
    Guid string
    The unique identifier of the database instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceControllerUrl string
    The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
    ResourceCrn string
    The crn of the resource
    ResourceGroupName string
    The resource group name in which resource is provisioned
    ResourceName string
    The name of the resource
    ResourceStatus 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 or root.
    ConfigurationSchema string
    (String) Database Configuration Schema in JSON format.
    Groups []DatabaseGroup
    Guid string
    The unique identifier of the database instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceControllerUrl string
    The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
    ResourceCrn string
    The crn of the resource
    ResourceGroupName string
    The resource group name in which resource is provisioned
    ResourceName string
    The name of the resource
    ResourceStatus 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 or root.
    configurationSchema String
    (String) Database Configuration Schema in JSON format.
    groups List<DatabaseGroup>
    guid String
    The unique identifier of the database instance.
    id String
    The provider-assigned unique ID for this managed resource.
    resourceControllerUrl String
    The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
    resourceCrn String
    The crn of the resource
    resourceGroupName String
    The resource group name in which resource is provisioned
    resourceName String
    The name of the resource
    resourceStatus 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 or root.
    configurationSchema string
    (String) Database Configuration Schema in JSON format.
    groups DatabaseGroup[]
    guid string
    The unique identifier of the database instance.
    id string
    The provider-assigned unique ID for this managed resource.
    resourceControllerUrl string
    The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
    resourceCrn string
    The crn of the resource
    resourceGroupName string
    The resource group name in which resource is provisioned
    resourceName string
    The name of the resource
    resourceStatus 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 or root.
    configuration_schema str
    (String) Database Configuration Schema in JSON format.
    groups Sequence[DatabaseGroup]
    guid str
    The unique identifier of the database instance.
    id str
    The provider-assigned unique ID for this managed resource.
    resource_controller_url str
    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_name str
    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 or root.
    configurationSchema 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.
    resourceControllerUrl String
    The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
    resourceCrn String
    The crn of the resource
    resourceGroupName String
    The resource group name in which resource is provisioned
    resourceName String
    The name of the resource
    resourceStatus 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.
    The following state arguments are supported:
    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 or root.
    Allowlists List<DatabaseAllowlist>

    A list of allowed IP addresses for the database. Multiple blocks are allowed.

    Nested scheme for allowlist:

    AutoScaling DatabaseAutoScaling
    Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.

    • Nested scheme for auto_scaling:
    BackupEncryptionKeyCrn string
    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.
    BackupId 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 and databases-for-enterprisedb. For valid values please refer API docs.
    ConfigurationSchema string
    (String) Database Configuration Schema in JSON format.
    DatabaseId string
    (String) The CRN of the database instance.
    DeletionProtection bool
    Group List<DatabaseGroup>
    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:
    Groups List<DatabaseGroup>
    Guid string
    The unique identifier of the database instance.
    KeyProtectInstance string
    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:<…>::.
    KeyProtectKey string
    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
    LogicalReplicationSlots List<DatabaseLogicalReplicationSlot>

    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.
    OfflineRestore 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).
    PointInTimeRecoveryDeploymentId string
    The ID of the source deployment that you want to recover back to.
    PointInTimeRecoveryTime string
    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.
    RemoteLeaderId string
    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.
    ResourceControllerUrl string
    The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
    ResourceCrn string
    The crn of the resource
    ResourceGroupId string
    The ID of the resource group where you want to create the instance. To retrieve this value, run ibmcloud resource groups or use the ibm.ResourceGroup data source. If no value is provided, the default resource group is used.
    ResourceGroupName string
    The resource group name in which resource is provisioned
    ResourceName string
    The name of the resource
    ResourceStatus 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, and databases-for-enterprisedb.
    ServiceEndpoints string
    Specify whether you want to enable the public, private, or both service endpoints. Supported values are public, private, or public-and-private.
    SkipInitialBackup bool
    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 is false. For more information, see [Configuring Read-only Replicas]
    Status string
    (String) The status of the instance.
    Tags List<string>
    A list of tags that you want to add to your instance.
    Timeouts DatabaseTimeouts
    Users List<DatabaseUser>

    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 or root.
    Allowlists []DatabaseAllowlistArgs

    A list of allowed IP addresses for the database. Multiple blocks are allowed.

    Nested scheme for allowlist:

    AutoScaling DatabaseAutoScalingArgs
    Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.

    • Nested scheme for auto_scaling:
    BackupEncryptionKeyCrn string
    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.
    BackupId 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 and databases-for-enterprisedb. For valid values please refer API docs.
    ConfigurationSchema string
    (String) Database Configuration Schema in JSON format.
    DatabaseId string
    (String) The CRN of the database instance.
    DeletionProtection bool
    Group []DatabaseGroupArgs
    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:
    Groups []DatabaseGroupArgs
    Guid string
    The unique identifier of the database instance.
    KeyProtectInstance string
    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:<…>::.
    KeyProtectKey string
    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
    LogicalReplicationSlots []DatabaseLogicalReplicationSlotArgs

    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.
    OfflineRestore 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).
    PointInTimeRecoveryDeploymentId string
    The ID of the source deployment that you want to recover back to.
    PointInTimeRecoveryTime string
    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.
    RemoteLeaderId string
    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.
    ResourceControllerUrl string
    The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
    ResourceCrn string
    The crn of the resource
    ResourceGroupId string
    The ID of the resource group where you want to create the instance. To retrieve this value, run ibmcloud resource groups or use the ibm.ResourceGroup data source. If no value is provided, the default resource group is used.
    ResourceGroupName string
    The resource group name in which resource is provisioned
    ResourceName string
    The name of the resource
    ResourceStatus 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, and databases-for-enterprisedb.
    ServiceEndpoints string
    Specify whether you want to enable the public, private, or both service endpoints. Supported values are public, private, or public-and-private.
    SkipInitialBackup bool
    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 is false. For more information, see [Configuring Read-only Replicas]
    Status string
    (String) The status of the instance.
    Tags []string
    A list of tags that you want to add to your instance.
    Timeouts DatabaseTimeoutsArgs
    Users []DatabaseUserArgs

    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 or root.
    allowlists List<DatabaseAllowlist>

    A list of allowed IP addresses for the database. Multiple blocks are allowed.

    Nested scheme for allowlist:

    autoScaling DatabaseAutoScaling
    Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.

    • Nested scheme for auto_scaling:
    backupEncryptionKeyCrn String
    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.
    backupId 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 and databases-for-enterprisedb. For valid values please refer API docs.
    configurationSchema String
    (String) Database Configuration Schema in JSON format.
    databaseId String
    (String) The CRN of the database instance.
    deletionProtection Boolean
    group List<DatabaseGroup>
    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:
    groups List<DatabaseGroup>
    guid String
    The unique identifier of the database instance.
    keyProtectInstance String
    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:<…>::.
    keyProtectKey String
    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
    logicalReplicationSlots List<DatabaseLogicalReplicationSlot>

    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.
    offlineRestore 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).
    pointInTimeRecoveryDeploymentId String
    The ID of the source deployment that you want to recover back to.
    pointInTimeRecoveryTime String
    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.
    remoteLeaderId String
    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.
    resourceControllerUrl String
    The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
    resourceCrn String
    The crn of the resource
    resourceGroupId String
    The ID of the resource group where you want to create the instance. To retrieve this value, run ibmcloud resource groups or use the ibm.ResourceGroup data source. If no value is provided, the default resource group is used.
    resourceGroupName String
    The resource group name in which resource is provisioned
    resourceName String
    The name of the resource
    resourceStatus 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, and databases-for-enterprisedb.
    serviceEndpoints String
    Specify whether you want to enable the public, private, or both service endpoints. Supported values are public, private, or public-and-private.
    skipInitialBackup Boolean
    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 is false. For more information, see [Configuring Read-only Replicas]
    status String
    (String) The status of the instance.
    tags List<String>
    A list of tags that you want to add to your instance.
    timeouts DatabaseTimeouts
    users List<DatabaseUser>

    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 or root.
    allowlists DatabaseAllowlist[]

    A list of allowed IP addresses for the database. Multiple blocks are allowed.

    Nested scheme for allowlist:

    autoScaling DatabaseAutoScaling
    Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.

    • Nested scheme for auto_scaling:
    backupEncryptionKeyCrn string
    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.
    backupId 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 and databases-for-enterprisedb. For valid values please refer API docs.
    configurationSchema string
    (String) Database Configuration Schema in JSON format.
    databaseId string
    (String) The CRN of the database instance.
    deletionProtection boolean
    group DatabaseGroup[]
    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:
    groups DatabaseGroup[]
    guid string
    The unique identifier of the database instance.
    keyProtectInstance string
    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:<…>::.
    keyProtectKey string
    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
    logicalReplicationSlots DatabaseLogicalReplicationSlot[]

    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.
    offlineRestore 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).
    pointInTimeRecoveryDeploymentId string
    The ID of the source deployment that you want to recover back to.
    pointInTimeRecoveryTime string
    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.
    remoteLeaderId string
    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.
    resourceControllerUrl string
    The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
    resourceCrn string
    The crn of the resource
    resourceGroupId string
    The ID of the resource group where you want to create the instance. To retrieve this value, run ibmcloud resource groups or use the ibm.ResourceGroup data source. If no value is provided, the default resource group is used.
    resourceGroupName string
    The resource group name in which resource is provisioned
    resourceName string
    The name of the resource
    resourceStatus 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, and databases-for-enterprisedb.
    serviceEndpoints string
    Specify whether you want to enable the public, private, or both service endpoints. Supported values are public, private, or public-and-private.
    skipInitialBackup boolean
    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 is false. For more information, see [Configuring Read-only Replicas]
    status string
    (String) The status of the instance.
    tags string[]
    A list of tags that you want to add to your instance.
    timeouts DatabaseTimeouts
    users DatabaseUser[]

    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 or root.
    allowlists Sequence[DatabaseAllowlistArgs]

    A list of allowed IP addresses for the database. Multiple blocks are allowed.

    Nested scheme for allowlist:

    auto_scaling DatabaseAutoScalingArgs
    Configure rules to allow your database to automatically increase its resources. Single block of autoscaling is allowed at once.

    • Nested scheme for auto_scaling:
    backup_encryption_key_crn str
    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 and databases-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[DatabaseGroupArgs]
    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:
    groups Sequence[DatabaseGroupArgs]
    guid str
    The unique identifier of the database instance.
    key_protect_instance str
    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_key str
    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_slots Sequence[DatabaseLogicalReplicationSlotArgs]

    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_time_recovery_deployment_id str
    The ID of the source deployment that you want to recover back to.
    point_in_time_recovery_time str
    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_id str
    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_url str
    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_id str
    The ID of the resource group where you want to create the instance. To retrieve this value, run ibmcloud resource groups or use the ibm.ResourceGroup data source. If no value is provided, the default resource group is used.
    resource_group_name str
    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, and databases-for-enterprisedb.
    service_endpoints str
    Specify whether you want to enable the public, private, or both service endpoints. Supported values are public, private, or public-and-private.
    skip_initial_backup bool
    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 is false. For more information, see [Configuring Read-only Replicas]
    status str
    (String) The status of the instance.
    tags Sequence[str]
    A list of tags that you want to add to your instance.
    timeouts DatabaseTimeoutsArgs
    users Sequence[DatabaseUserArgs]

    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 or root.
    allowlists List<Property Map>

    A list of allowed IP addresses for the database. Multiple blocks are allowed.

    Nested scheme for allowlist:

    autoScaling 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:
    backupEncryptionKeyCrn String
    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.
    backupId 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 and databases-for-enterprisedb. For valid values please refer API docs.
    configurationSchema String
    (String) Database Configuration Schema in JSON format.
    databaseId String
    (String) The CRN of the database instance.
    deletionProtection 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:
    groups List<Property Map>
    guid String
    The unique identifier of the database instance.
    keyProtectInstance String
    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:<…>::.
    keyProtectKey String
    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
    logicalReplicationSlots List<Property Map>

    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.
    offlineRestore 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).
    pointInTimeRecoveryDeploymentId String
    The ID of the source deployment that you want to recover back to.
    pointInTimeRecoveryTime String
    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.
    remoteLeaderId String
    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.
    resourceControllerUrl String
    The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
    resourceCrn String
    The crn of the resource
    resourceGroupId String
    The ID of the resource group where you want to create the instance. To retrieve this value, run ibmcloud resource groups or use the ibm.ResourceGroup data source. If no value is provided, the default resource group is used.
    resourceGroupName String
    The resource group name in which resource is provisioned
    resourceName String
    The name of the resource
    resourceStatus 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, and databases-for-enterprisedb.
    serviceEndpoints String
    Specify whether you want to enable the public, private, or both service endpoints. Supported values are public, private, or public-and-private.
    skipInitialBackup Boolean
    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 is false. For more information, see [Configuring Read-only Replicas]
    status String
    (String) The status of the instance.
    tags 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 DatabaseAutoScalingCpu
    CPU Auto Scaling

    Deprecated: Deprecated

    Disk DatabaseAutoScalingDisk
    Single block of disk is allowed at once in disk auto scaling.

    • Nested scheme for disk:
    Memory DatabaseAutoScalingMemory
    Memory Auto Scaling in single block of memory is allowed at once.

    • Nested scheme for memory:
    Cpu DatabaseAutoScalingCpu
    CPU Auto Scaling

    Deprecated: Deprecated

    Disk DatabaseAutoScalingDisk
    Single block of disk is allowed at once in disk auto scaling.

    • Nested scheme for disk:
    Memory DatabaseAutoScalingMemory
    Memory Auto Scaling in single block of memory is allowed at once.

    • Nested scheme for memory:
    cpu DatabaseAutoScalingCpu
    CPU Auto Scaling

    Deprecated: Deprecated

    disk DatabaseAutoScalingDisk
    Single block of disk is allowed at once in disk auto scaling.

    • Nested scheme for disk:
    memory DatabaseAutoScalingMemory
    Memory Auto Scaling in single block of memory is allowed at once.

    • Nested scheme for memory:
    cpu DatabaseAutoScalingCpu
    CPU Auto Scaling

    Deprecated: Deprecated

    disk DatabaseAutoScalingDisk
    Single block of disk is allowed at once in disk auto scaling.

    • Nested scheme for disk:
    memory DatabaseAutoScalingMemory
    Memory Auto Scaling in single block of memory is allowed at once.

    • Nested scheme for memory:
    cpu DatabaseAutoScalingCpu
    CPU Auto Scaling

    Deprecated: Deprecated

    disk DatabaseAutoScalingDisk
    Single block of disk is allowed at once in disk auto scaling.

    • Nested scheme for disk:
    memory DatabaseAutoScalingMemory
    Memory Auto Scaling in single block of memory is allowed at once.

    • Nested scheme for memory:
    cpu Property Map
    CPU Auto Scaling

    Deprecated: Deprecated

    disk Property Map
    Single block of disk is allowed at once in disk auto scaling.

    • Nested scheme for disk:
    memory Property Map
    Memory Auto Scaling in single block of memory is allowed at once.

    • Nested scheme for memory:

    DatabaseAutoScalingCpu, DatabaseAutoScalingCpuArgs

    RateIncreasePercent double
    Auto Scaling Rate: Increase Percent
    RateLimitCountPerMember double
    Auto Scaling Rate: Limit count per number
    RatePeriodSeconds double
    Auto Scaling Rate: Period Seconds
    RateUnits string
    Auto Scaling Rate: Units
    RateIncreasePercent float64
    Auto Scaling Rate: Increase Percent
    RateLimitCountPerMember float64
    Auto Scaling Rate: Limit count per number
    RatePeriodSeconds float64
    Auto Scaling Rate: Period Seconds
    RateUnits string
    Auto Scaling Rate: Units
    rateIncreasePercent Double
    Auto Scaling Rate: Increase Percent
    rateLimitCountPerMember Double
    Auto Scaling Rate: Limit count per number
    ratePeriodSeconds Double
    Auto Scaling Rate: Period Seconds
    rateUnits String
    Auto Scaling Rate: Units
    rateIncreasePercent number
    Auto Scaling Rate: Increase Percent
    rateLimitCountPerMember number
    Auto Scaling Rate: Limit count per number
    ratePeriodSeconds number
    Auto Scaling Rate: Period Seconds
    rateUnits string
    Auto Scaling Rate: Units
    rate_increase_percent float
    Auto Scaling Rate: Increase Percent
    rate_limit_count_per_member float
    Auto Scaling Rate: Limit count per number
    rate_period_seconds float
    Auto Scaling Rate: Period Seconds
    rate_units str
    Auto Scaling Rate: Units
    rateIncreasePercent Number
    Auto Scaling Rate: Increase Percent
    rateLimitCountPerMember Number
    Auto Scaling Rate: Limit count per number
    ratePeriodSeconds Number
    Auto Scaling Rate: Period Seconds
    rateUnits String
    Auto Scaling Rate: Units

    DatabaseAutoScalingDisk, DatabaseAutoScalingDiskArgs

    CapacityEnabled bool
    Auto scaling scalar enables or disables the scalar capacity.
    FreeSpaceLessThanPercent double
    Auto scaling scalar capacity free space less than percent.
    IoAbovePercent double
    Auto scaling scalar I/O utilization above percent.
    IoEnabled bool
    Auto scaling scalar I/O utilization enabled.`
    IoOverPeriod string
    Auto scaling scalar I/O utilization over period.
    RateIncreasePercent double
    Auto scaling rate increase percent.
    RateLimitMbPerMember double
    Auto scaling rate limit in megabytes per member.
    RatePeriodSeconds double
    Auto scaling rate period in seconds.
    RateUnits string
    Auto scaling rate in units.
    CapacityEnabled bool
    Auto scaling scalar enables or disables the scalar capacity.
    FreeSpaceLessThanPercent float64
    Auto scaling scalar capacity free space less than percent.
    IoAbovePercent float64
    Auto scaling scalar I/O utilization above percent.
    IoEnabled bool
    Auto scaling scalar I/O utilization enabled.`
    IoOverPeriod string
    Auto scaling scalar I/O utilization over period.
    RateIncreasePercent float64
    Auto scaling rate increase percent.
    RateLimitMbPerMember float64
    Auto scaling rate limit in megabytes per member.
    RatePeriodSeconds float64
    Auto scaling rate period in seconds.
    RateUnits string
    Auto scaling rate in units.
    capacityEnabled Boolean
    Auto scaling scalar enables or disables the scalar capacity.
    freeSpaceLessThanPercent Double
    Auto scaling scalar capacity free space less than percent.
    ioAbovePercent Double
    Auto scaling scalar I/O utilization above percent.
    ioEnabled Boolean
    Auto scaling scalar I/O utilization enabled.`
    ioOverPeriod String
    Auto scaling scalar I/O utilization over period.
    rateIncreasePercent Double
    Auto scaling rate increase percent.
    rateLimitMbPerMember Double
    Auto scaling rate limit in megabytes per member.
    ratePeriodSeconds Double
    Auto scaling rate period in seconds.
    rateUnits String
    Auto scaling rate in units.
    capacityEnabled boolean
    Auto scaling scalar enables or disables the scalar capacity.
    freeSpaceLessThanPercent number
    Auto scaling scalar capacity free space less than percent.
    ioAbovePercent number
    Auto scaling scalar I/O utilization above percent.
    ioEnabled boolean
    Auto scaling scalar I/O utilization enabled.`
    ioOverPeriod string
    Auto scaling scalar I/O utilization over period.
    rateIncreasePercent number
    Auto scaling rate increase percent.
    rateLimitMbPerMember number
    Auto scaling rate limit in megabytes per member.
    ratePeriodSeconds number
    Auto scaling rate period in seconds.
    rateUnits string
    Auto scaling rate in units.
    capacity_enabled bool
    Auto scaling scalar enables or disables the scalar capacity.
    free_space_less_than_percent float
    Auto scaling scalar capacity free space less than percent.
    io_above_percent float
    Auto scaling scalar I/O utilization above percent.
    io_enabled bool
    Auto scaling scalar I/O utilization enabled.`
    io_over_period str
    Auto scaling scalar I/O utilization over period.
    rate_increase_percent float
    Auto scaling rate increase percent.
    rate_limit_mb_per_member float
    Auto scaling rate limit in megabytes per member.
    rate_period_seconds float
    Auto scaling rate period in seconds.
    rate_units str
    Auto scaling rate in units.
    capacityEnabled Boolean
    Auto scaling scalar enables or disables the scalar capacity.
    freeSpaceLessThanPercent Number
    Auto scaling scalar capacity free space less than percent.
    ioAbovePercent Number
    Auto scaling scalar I/O utilization above percent.
    ioEnabled Boolean
    Auto scaling scalar I/O utilization enabled.`
    ioOverPeriod String
    Auto scaling scalar I/O utilization over period.
    rateIncreasePercent Number
    Auto scaling rate increase percent.
    rateLimitMbPerMember Number
    Auto scaling rate limit in megabytes per member.
    ratePeriodSeconds Number
    Auto scaling rate period in seconds.
    rateUnits String
    Auto scaling rate in units.

    DatabaseAutoScalingMemory, DatabaseAutoScalingMemoryArgs

    IoAbovePercent double
    Auto scaling scalar I/O utilization above percent.
    IoEnabled bool
    Bool-Optional-Auto scaling scalar I/O utilization enabled.
    IoOverPeriod string
    Auto scaling scalar I/O utilization over period.
    RateIncreasePercent double
    Auto scaling rate in increase percent.
    RateLimitMbPerMember double
    Auto scaling rate limit in megabytes per member.
    RatePeriodSeconds double
    Auto scaling rate period in seconds.
    RateUnits string
    Auto scaling rate in units.
    IoAbovePercent float64
    Auto scaling scalar I/O utilization above percent.
    IoEnabled bool
    Bool-Optional-Auto scaling scalar I/O utilization enabled.
    IoOverPeriod string
    Auto scaling scalar I/O utilization over period.
    RateIncreasePercent float64
    Auto scaling rate in increase percent.
    RateLimitMbPerMember float64
    Auto scaling rate limit in megabytes per member.
    RatePeriodSeconds float64
    Auto scaling rate period in seconds.
    RateUnits string
    Auto scaling rate in units.
    ioAbovePercent Double
    Auto scaling scalar I/O utilization above percent.
    ioEnabled Boolean
    Bool-Optional-Auto scaling scalar I/O utilization enabled.
    ioOverPeriod String
    Auto scaling scalar I/O utilization over period.
    rateIncreasePercent Double
    Auto scaling rate in increase percent.
    rateLimitMbPerMember Double
    Auto scaling rate limit in megabytes per member.
    ratePeriodSeconds Double
    Auto scaling rate period in seconds.
    rateUnits String
    Auto scaling rate in units.
    ioAbovePercent number
    Auto scaling scalar I/O utilization above percent.
    ioEnabled boolean
    Bool-Optional-Auto scaling scalar I/O utilization enabled.
    ioOverPeriod string
    Auto scaling scalar I/O utilization over period.
    rateIncreasePercent number
    Auto scaling rate in increase percent.
    rateLimitMbPerMember number
    Auto scaling rate limit in megabytes per member.
    ratePeriodSeconds number
    Auto scaling rate period in seconds.
    rateUnits string
    Auto scaling rate in units.
    io_above_percent float
    Auto scaling scalar I/O utilization above percent.
    io_enabled bool
    Bool-Optional-Auto scaling scalar I/O utilization enabled.
    io_over_period str
    Auto scaling scalar I/O utilization over period.
    rate_increase_percent float
    Auto scaling rate in increase percent.
    rate_limit_mb_per_member float
    Auto scaling rate limit in megabytes per member.
    rate_period_seconds float
    Auto scaling rate period in seconds.
    rate_units str
    Auto scaling rate in units.
    ioAbovePercent Number
    Auto scaling scalar I/O utilization above percent.
    ioEnabled Boolean
    Bool-Optional-Auto scaling scalar I/O utilization enabled.
    ioOverPeriod String
    Auto scaling scalar I/O utilization over period.
    rateIncreasePercent Number
    Auto scaling rate in increase percent.
    rateLimitMbPerMember Number
    Auto scaling rate limit in megabytes per member.
    ratePeriodSeconds Number
    Auto scaling rate period in seconds.
    rateUnits String
    Auto scaling rate in units.

    DatabaseGroup, DatabaseGroupArgs

    Count double
    Cpus List<DatabaseGroupCpus>
    • Nested scheme for cpu:
    Disks List<DatabaseGroupDisk>
    GroupId string
    The ID of the scaling group. Scaling group ID allowed values: member, analytics, or bi_connector. Read more about analytics and bi_connector here.
    HostFlavors List<DatabaseGroupHostFlavor>
    • Nested scheme for host_flavor:
    Memories List<DatabaseGroupMemory>
    Count float64
    Cpus []DatabaseGroupCpus
    • Nested scheme for cpu:
    Disks []DatabaseGroupDisk
    GroupId string
    The ID of the scaling group. Scaling group ID allowed values: member, analytics, or bi_connector. Read more about analytics and bi_connector here.
    HostFlavors []DatabaseGroupHostFlavor
    • Nested scheme for host_flavor:
    Memories []DatabaseGroupMemory
    count Double
    cpus List<DatabaseGroupCpus>
    • Nested scheme for cpu:
    disks List<DatabaseGroupDisk>
    groupId String
    The ID of the scaling group. Scaling group ID allowed values: member, analytics, or bi_connector. Read more about analytics and bi_connector here.
    hostFlavors List<DatabaseGroupHostFlavor>
    • Nested scheme for host_flavor:
    memories List<DatabaseGroupMemory>
    count number
    cpus DatabaseGroupCpus[]
    • Nested scheme for cpu:
    disks DatabaseGroupDisk[]
    groupId string
    The ID of the scaling group. Scaling group ID allowed values: member, analytics, or bi_connector. Read more about analytics and bi_connector here.
    hostFlavors DatabaseGroupHostFlavor[]
    • Nested scheme for host_flavor:
    memories DatabaseGroupMemory[]
    count float
    cpus Sequence[DatabaseGroupCpus]
    • Nested scheme for cpu:
    disks Sequence[DatabaseGroupDisk]
    group_id str
    The ID of the scaling group. Scaling group ID allowed values: member, analytics, or bi_connector. Read more about analytics and bi_connector here.
    host_flavors Sequence[DatabaseGroupHostFlavor]
    • Nested scheme for host_flavor:
    memories Sequence[DatabaseGroupMemory]
    count Number
    cpus List<Property Map>
    • Nested scheme for cpu:
    disks List<Property Map>
    groupId String
    The ID of the scaling group. Scaling group ID allowed values: member, analytics, or bi_connector. Read more about analytics and bi_connector here.
    hostFlavors List<Property Map>
    • Nested scheme for host_flavor:
    memories List<Property Map>

    DatabaseGroupCpus, DatabaseGroupCpusArgs

    DatabaseGroupDisk, DatabaseGroupDiskArgs

    AllocationMb float64
    CanScaleDown bool
    IsAdjustable bool
    MinimumMb float64
    StepSizeMb float64
    Units string
    allocationMb Double
    canScaleDown Boolean
    isAdjustable Boolean
    minimumMb Double
    stepSizeMb Double
    units String
    allocationMb number
    canScaleDown boolean
    isAdjustable boolean
    minimumMb number
    stepSizeMb number
    units string
    allocationMb Number
    canScaleDown Boolean
    isAdjustable Boolean
    minimumMb Number
    stepSizeMb Number
    units String

    DatabaseGroupHostFlavor, DatabaseGroupHostFlavorArgs

    HostingSize 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.
    HostingSize 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.
    hostingSize 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.
    hostingSize 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.
    hostingSize 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

    DatabaseLogicalReplicationSlot, DatabaseLogicalReplicationSlotArgs

    DatabaseName 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.
    PluginType string

    The plugin type that is used to create the logical_replication_slot. Only wal2json 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 to logical. Also, max_replication_slots and max_wal_senders must be greater than 20.
    • For more information on enabling logical replication slots please see Configuring Wal2json
    DatabaseName 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.
    PluginType string

    The plugin type that is used to create the logical_replication_slot. Only wal2json 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 to logical. Also, max_replication_slots and max_wal_senders must be greater than 20.
    • For more information on enabling logical replication slots please see Configuring Wal2json
    databaseName 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.
    pluginType String

    The plugin type that is used to create the logical_replication_slot. Only wal2json 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 to logical. Also, max_replication_slots and max_wal_senders must be greater than 20.
    • For more information on enabling logical replication slots please see Configuring Wal2json
    databaseName 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.
    pluginType string

    The plugin type that is used to create the logical_replication_slot. Only wal2json 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 to logical. Also, max_replication_slots and max_wal_senders must be greater than 20.
    • For more information on enabling logical replication slots please see Configuring Wal2json
    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. Only wal2json 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 to logical. Also, max_replication_slots and max_wal_senders must be greater than 20.
    • For more information on enabling logical replication slots please see Configuring Wal2json
    databaseName 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.
    pluginType String

    The plugin type that is used to create the logical_replication_slot. Only wal2json 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 to logical. Also, max_replication_slots and max_wal_senders must be greater than 20.
    • For more information on enabling logical replication slots please see Configuring Wal2json

    DatabaseTimeouts, DatabaseTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    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 for ops_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 are all, admin, read, write. Example Redis role: -@all +@read
    Type string
    The type for the user. Examples: database, ops_manager, read_only_replica. The default value is database.
    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 for ops_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 are all, admin, read, write. Example Redis role: -@all +@read
    Type string
    The type for the user. Examples: database, ops_manager, read_only_replica. The default value is database.
    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 for ops_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 are all, admin, read, write. Example Redis role: -@all +@read
    type String
    The type for the user. Examples: database, ops_manager, read_only_replica. The default value is database.
    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 for ops_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 are all, admin, read, write. Example Redis role: -@all +@read
    type string
    The type for the user. Examples: database, ops_manager, read_only_replica. The default value is database.
    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 for ops_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 are all, admin, read, write. Example Redis role: -@all +@read
    type str
    The type for the user. Examples: database, ops_manager, read_only_replica. The default value is database.
    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 for ops_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 are all, admin, read, write. Example Redis role: -@all +@read
    type String
    The type for the user. Examples: database, ops_manager, read_only_replica. The default value is database.

    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.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud