1. Packages
  2. Packages
  3. Ibm Provider
  4. API Docs
  5. Database
Viewing docs for ibm 2.2.0-beta1
published on Monday, May 18, 2026 by ibm-cloud
Viewing docs for ibm 2.2.0-beta1
published on Monday, May 18, 2026 by ibm-cloud

    Example Usage

    To find an example for configuring a virtual server instance that connects to a PostgreSQL database, see here.

    Gen2 database instance example

    An example to configure and deploy a Gen2 database instance. Gen2 plans use the -gen2 suffix and have specific scaling requirements.

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      # Gen2 PostgreSQL instance
      postgresGen2:
        type: ibm:Database
        name: postgres_gen2
        properties:
          name: my-postgres-gen2
          plan: standard-gen2
          location: ca-mon
          service: databases-for-postgresql
          resourceGroupId: ${group.id}
          version: '18'
          serviceEndpoints: private
          groups:
            - groupId: member
              members:
                allocationCount: 2
              disk:
                allocationMb: 10240
              hostFlavor:
                id: bx3d.4x20
          tags:
            - env:production
            - app:myapp
      # Credentials via resource key
      dbCredentials:
        type: ibm:ResourceKey
        name: db_credentials
        properties:
          name: db-credentials
          resourceInstanceId: ${postgresGen2.databaseId}
    variables:
      group:
        fn::invoke:
          function: ibm:getResourceGroup
          arguments:
            name: <your_group>
    outputs:
      # Access credentials
      dbConnection: ${dbCredentials.credentials}
    
    Example coming soon!
    

    Note: Gen2 instances use ibm.ResourceKey for credential management instead of the adminpassword and users attributes used in Classic plans. The groups computed attribute can be used to verify current scaling configuration from instance extensions and catalog metadata.

    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("test_acc", {
        resourceGroupId: group.then(group => group.id),
        name: "<your_database_name>",
        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("test_acc",
        resource_group_id=group.id,
        name="<your_database_name>",
        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/v2/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, "test_acc", &ibm.DatabaseArgs{
    			ResourceGroupId:                 pulumi.String(group.Id),
    			Name:                            pulumi.String("<your_database_name>"),
    			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("test_acc", new()
        {
            ResourceGroupId = @group.Apply(@group => @group.Apply(getResourceGroupResult => getResourceGroupResult.Id)),
            Name = "<your_database_name>",
            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.id())
                .name("<your_database_name>")
                .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
        name: test_acc
        properties:
          resourceGroupId: ${group.id}
          name: <your_database_name>
          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>
    
    Example coming soon!
    

    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: group.id,
        name: "redis",
        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=group["id"],
        name="redis",
        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/v2/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(group.Id),
    			Name:             pulumi.String("redis"),
    			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 = @group.Id,
            Name = "redis",
            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(group.id())
                .name("redis")
                .service("databases-for-redis")
                .plan("standard")
                .location("us-south")
                .serviceEndpoints("private")
                .autoScaling(DatabaseAutoScalingArgs.builder()
                    .disk(DatabaseAutoScalingDiskArgs.builder()
                        .capacityEnabled(true)
                        .freeSpaceLessThanPercent(15.0)
                        .ioAbovePercent(85.0)
                        .ioEnabled(true)
                        .ioOverPeriod("15m")
                        .rateIncreasePercent(15.0)
                        .rateLimitMbPerMember(3670016.0)
                        .ratePeriodSeconds(900.0)
                        .rateUnits("mb")
                        .build())
                    .memory(DatabaseAutoScalingMemoryArgs.builder()
                        .ioAbovePercent(90.0)
                        .ioEnabled(true)
                        .ioOverPeriod("15m")
                        .rateIncreasePercent(10.0)
                        .rateLimitMbPerMember(114688.0)
                        .ratePeriodSeconds(900.0)
                        .rateUnits("mb")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      autoscale:
        type: ibm:Database
        properties:
          resourceGroupId: ${group.id}
          name: redis
          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
    
    Example coming soon!
    

    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.
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      mongodb:
        type: ibm:Database
        properties:
          resourceGroupId: ${testAcc.id}
          name: test
          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
    variables:
      testAcc:
        fn::invoke:
          function: ibm:getResourceGroup
          arguments:
            isDefault: true
    
    Example coming soon!
    

    Sample EDB instance

    EDB takes more time than expected. It is always advisible to extend timeouts using timeouts block

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      edb:
        type: ibm:Database
        properties:
          resourceGroupId: ${testAcc.id}
          name: test
          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
    variables:
      testAcc:
        fn::invoke:
          function: ibm:getResourceGroup
          arguments:
            isDefault: true
    
    Example coming soon!
    

    Sample Elasticsearch Enterprise instance

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      es:
        type: ibm:Database
        properties:
          resourceGroupId: ${testAcc.id}
          name: es-enterprise
          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
    variables:
      testAcc:
        fn::invoke:
          function: ibm:getResourceGroup
          arguments:
            isDefault: true
    
    Example coming soon!
    

    Sample Elasticsearch Platinum instance

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      es:
        type: ibm:Database
        properties:
          resourceGroupId: ${testAcc.id}
          name: es-platinum
          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
    variables:
      testAcc:
        fn::invoke:
          function: ibm:getResourceGroup
          arguments:
            isDefault: true
    
    Example coming soon!
    

    Updating configuration for postgres database

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      db:
        type: ibm:Database
        properties:
          location: us-east
          groups:
            - groupId: member
              memory:
                allocationMb: 12288
              disk:
                allocationMb: 131072
              cpu:
                allocationCount: 3
          name: telus-database
          service: databases-for-postgresql
          plan: standard
          configuration: |2
              {
                \"max_connections\": 400
              }
    variables:
      testAcc:
        fn::invoke:
          function: ibm:getResourceGroup
          arguments:
            isDefault: true
    
    Example coming soon!
    

    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", {
        name: "example-database",
        service: "databases-for-postgresql",
        plan: "standard",
        location: "us-east",
        users: [{
            name: "repl",
            password: "repl12345password",
        }],
        configuration: `  {
        \\"wal_level\\": \\"logical\\",
        \\"max_replication_slots\\": 21,
        \\"max_wal_senders\\": 21
      }
    `,
        logicalReplicationSlots: [{
            name: "wj123",
            databaseName: "ibmclouddb",
            pluginType: "wal2json",
        }],
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    test_acc = ibm.get_resource_group(is_default=True)
    db = ibm.Database("db",
        name="example-database",
        service="databases-for-postgresql",
        plan="standard",
        location="us-east",
        users=[{
            "name": "repl",
            "password": "repl12345password",
        }],
        configuration="""  {
        \"wal_level\": \"logical\",
        \"max_replication_slots\": 21,
        \"max_wal_senders\": 21
      }
    """,
        logical_replication_slots=[{
            "name": "wj123",
            "database_name": "ibmclouddb",
            "plugin_type": "wal2json",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/v2/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{
    			Name:     pulumi.String("example-database"),
    			Service:  pulumi.String("databases-for-postgresql"),
    			Plan:     pulumi.String("standard"),
    			Location: pulumi.String("us-east"),
    			Users: ibm.DatabaseUserArray{
    				&ibm.DatabaseUserArgs{
    					Name:     pulumi.String("repl"),
    					Password: pulumi.String("repl12345password"),
    				},
    			},
    			Configuration: pulumi.String(`  {
        \"wal_level\": \"logical\",
        \"max_replication_slots\": 21,
        \"max_wal_senders\": 21
      }
    `),
    			LogicalReplicationSlots: ibm.DatabaseLogicalReplicationSlotArray{
    				&ibm.DatabaseLogicalReplicationSlotArgs{
    					Name:         pulumi.String("wj123"),
    					DatabaseName: pulumi.String("ibmclouddb"),
    					PluginType:   pulumi.String("wal2json"),
    				},
    			},
    		})
    		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()
        {
            Name = "example-database",
            Service = "databases-for-postgresql",
            Plan = "standard",
            Location = "us-east",
            Users = new[]
            {
                new Ibm.Inputs.DatabaseUserArgs
                {
                    Name = "repl",
                    Password = "repl12345password",
                },
            },
            Configuration = @"  {
        \""wal_level\"": \""logical\"",
        \""max_replication_slots\"": 21,
        \""max_wal_senders\"": 21
      }
    ",
            LogicalReplicationSlots = new[]
            {
                new Ibm.Inputs.DatabaseLogicalReplicationSlotArgs
                {
                    Name = "wj123",
                    DatabaseName = "ibmclouddb",
                    PluginType = "wal2json",
                },
            },
        });
    
    });
    
    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.DatabaseUserArgs;
    import com.pulumi.ibm.inputs.DatabaseLogicalReplicationSlotArgs;
    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()
                .name("example-database")
                .service("databases-for-postgresql")
                .plan("standard")
                .location("us-east")
                .users(DatabaseUserArgs.builder()
                    .name("repl")
                    .password("repl12345password")
                    .build())
                .configuration("""
      {
        \"wal_level\": \"logical\",
        \"max_replication_slots\": 21,
        \"max_wal_senders\": 21
      }
                """)
                .logicalReplicationSlots(DatabaseLogicalReplicationSlotArgs.builder()
                    .name("wj123")
                    .databaseName("ibmclouddb")
                    .pluginType("wal2json")
                    .build())
                .build());
    
        }
    }
    
    resources:
      db:
        type: ibm:Database
        properties:
          name: example-database
          service: databases-for-postgresql
          plan: standard
          location: us-east
          users:
            - name: repl
              password: repl12345password
          configuration: |2
              {
                \"wal_level\": \"logical\",
                \"max_replication_slots\": 21,
                \"max_wal_senders\": 21
              }
          logicalReplicationSlots:
            - name: wj123
              databaseName: ibmclouddb
              pluginType: wal2json
    variables:
      testAcc:
        fn::invoke:
          function: ibm:getResourceGroup
          arguments:
            isDefault: true
    
    Example coming soon!
    

    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) {
        }
    }
    
    {}
    
    Example coming soon!
    

    For more information, about an example that are related to a VSI configuration to connect to a PostgreSQL database, refer to VSI configured connection.

    Gen2 Feature Summary

    The following table summarizes feature availability for Classic and Gen2 plans:

    FeatureClassic PlansGen2 Plans
    Basic provisioning (name, location, service, plan)✅ Supported✅ Supported
    Resource group assignment✅ Supported✅ Supported
    Tags✅ Supported✅ Supported
    Encryption (key_protect_key)✅ Supported✅ Supported
    Backup encryption (backup_encryption_key_crn)✅ Supported❌ Plan fails if set
    Restore from backup (backup_id)✅ Supported❌ Plan fails if set
    Point-in-time recovery (point_in_time_recovery_deployment_id, point_in_time_recovery_time)✅ Supported❌ Plan fails if set
    Offline restore (MongoDB)✅ Supported❌ Accepted but ignored
    Async restore (PostgreSQL)✅ Supported❌ Accepted but ignored
    Scaling (members, disk, host_flavor)✅ Supported✅ Supported
    Scaling (memory, cpu)✅ Supported❌ Plan fails if set (controlled by host_flavor)
    Service endpoints✅ public, private, public-and-private⚠️ private only (plan fails if public)
    Admin password✅ Supported❌ Plan fails if set (use ibm_resource_key)
    User management✅ Supported❌ Plan fails if set (use ibm_resource_key)
    IP allowlist✅ Supported❌ Plan fails if set (use ibm_resource_key)
    Database configuration✅ Supported❌ Accepted but ignored
    Auto-scaling✅ Supported❌ Accepted but ignored
    Logical replication slots✅ Supported❌ Accepted but ignored
    Read-only replicas✅ Supported❌ Plan fails if set
    In-place version upgrades✅ Supported❌ Updates fail with error
    Deletion protection✅ Supported✅ Supported

    Gen2 Validation Behavior

    Gen2 plans handle unsupported features in two ways:

    • Plan fails if set: pulumi preview will fail with a validation error if these attributes are configured. You must remove them from your configuration to use Gen2 plans.

      • Examples: backup_id, point_in_time_recovery_deployment_id, point_in_time_recovery_time, users, allowlist, adminpassword, remote_leader_id, memory/cpu in group
    • Accepted but ignored: These attributes can remain in your configuration for easier migration, but they have no effect on Gen2 instances. They are silently ignored during apply and cleared during read operations.

      • Examples: auto_scaling, configuration, logical_replication_slot, offline_restore, async_restore

    Note: For Gen2 instances, use the ibm.ResourceKey resource to create service credentials and obtain connection information.

    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: Optional[str] = None,
                 plan: Optional[str] = None,
                 database_id: Optional[str] = None,
                 async_restore: Optional[bool] = None,
                 backup_id: Optional[str] = None,
                 configuration: Optional[str] = None,
                 adminpassword: 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,
                 auto_scaling: Optional[DatabaseAutoScalingArgs] = None,
                 logical_replication_slots: Optional[Sequence[DatabaseLogicalReplicationSlotArgs]] = None,
                 name: Optional[str] = None,
                 offline_restore: Optional[bool] = None,
                 backup_encryption_key_crn: 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,
                 allowlists: Optional[Sequence[DatabaseAllowlistArgs]] = None,
                 service_endpoints: Optional[str] = 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,
                 version_upgrade_skip_backup: Optional[bool] = 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.
    
    
    resource "ibm_database" "name" {
        # resource properties
    }

    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",
        Service = "string",
        Plan = "string",
        DatabaseId = "string",
        AsyncRestore = false,
        BackupId = "string",
        Configuration = "string",
        Adminpassword = "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",
        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",
            },
        },
        LogicalReplicationSlots = new[]
        {
            new Ibm.Inputs.DatabaseLogicalReplicationSlotArgs
            {
                DatabaseName = "string",
                Name = "string",
                PluginType = "string",
            },
        },
        Name = "string",
        OfflineRestore = false,
        BackupEncryptionKeyCrn = "string",
        PointInTimeRecoveryDeploymentId = "string",
        PointInTimeRecoveryTime = "string",
        RemoteLeaderId = "string",
        ResourceGroupId = "string",
        Allowlists = new[]
        {
            new Ibm.Inputs.DatabaseAllowlistArgs
            {
                Address = "string",
                Description = "string",
            },
        },
        ServiceEndpoints = "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",
        VersionUpgradeSkipBackup = false,
    });
    
    example, err := ibm.NewDatabase(ctx, "databaseResource", &ibm.DatabaseArgs{
    	Location:           pulumi.String("string"),
    	Service:            pulumi.String("string"),
    	Plan:               pulumi.String("string"),
    	DatabaseId:         pulumi.String("string"),
    	AsyncRestore:       pulumi.Bool(false),
    	BackupId:           pulumi.String("string"),
    	Configuration:      pulumi.String("string"),
    	Adminpassword:      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"),
    	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"),
    		},
    	},
    	LogicalReplicationSlots: ibm.DatabaseLogicalReplicationSlotArray{
    		&ibm.DatabaseLogicalReplicationSlotArgs{
    			DatabaseName: pulumi.String("string"),
    			Name:         pulumi.String("string"),
    			PluginType:   pulumi.String("string"),
    		},
    	},
    	Name:                            pulumi.String("string"),
    	OfflineRestore:                  pulumi.Bool(false),
    	BackupEncryptionKeyCrn:          pulumi.String("string"),
    	PointInTimeRecoveryDeploymentId: pulumi.String("string"),
    	PointInTimeRecoveryTime:         pulumi.String("string"),
    	RemoteLeaderId:                  pulumi.String("string"),
    	ResourceGroupId:                 pulumi.String("string"),
    	Allowlists: ibm.DatabaseAllowlistArray{
    		&ibm.DatabaseAllowlistArgs{
    			Address:     pulumi.String("string"),
    			Description: pulumi.String("string"),
    		},
    	},
    	ServiceEndpoints:  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"),
    	VersionUpgradeSkipBackup: pulumi.Bool(false),
    })
    
    resource "ibm_database" "databaseResource" {
      location            = "string"
      service             = "string"
      plan                = "string"
      database_id         = "string"
      async_restore       = false
      backup_id           = "string"
      configuration       = "string"
      adminpassword       = "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"
      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"
        }
      }
      logical_replication_slots {
        database_name = "string"
        name          = "string"
        plugin_type   = "string"
      }
      name                                 = "string"
      offline_restore                      = false
      backup_encryption_key_crn            = "string"
      point_in_time_recovery_deployment_id = "string"
      point_in_time_recovery_time          = "string"
      remote_leader_id                     = "string"
      resource_group_id                    = "string"
      allowlists {
        address     = "string"
        description = "string"
      }
      service_endpoints   = "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"
      version_upgrade_skip_backup = false
    }
    
    var databaseResource = new Database("databaseResource", DatabaseArgs.builder()
        .location("string")
        .service("string")
        .plan("string")
        .databaseId("string")
        .asyncRestore(false)
        .backupId("string")
        .configuration("string")
        .adminpassword("string")
        .deletionProtection(false)
        .group(DatabaseGroupArgs.builder()
            .count(0.0)
            .cpus(DatabaseGroupCpusArgs.builder()
                .allocationCount(0.0)
                .canScaleDown(false)
                .isAdjustable(false)
                .minimumCount(0.0)
                .stepSizeCount(0.0)
                .units("string")
                .build())
            .disks(DatabaseGroupDiskArgs.builder()
                .allocationMb(0.0)
                .canScaleDown(false)
                .isAdjustable(false)
                .minimumMb(0.0)
                .stepSizeMb(0.0)
                .units("string")
                .build())
            .groupId("string")
            .hostFlavors(DatabaseGroupHostFlavorArgs.builder()
                .hostingSize("string")
                .id("string")
                .name("string")
                .build())
            .memories(DatabaseGroupMemoryArgs.builder()
                .allocationMb(0.0)
                .canScaleDown(false)
                .cpuEnforcementRatioCeilingMb(0.0)
                .cpuEnforcementRatioMb(0.0)
                .isAdjustable(false)
                .minimumMb(0.0)
                .stepSizeMb(0.0)
                .units("string")
                .build())
            .build())
        .keyProtectInstance("string")
        .keyProtectKey("string")
        .autoScaling(DatabaseAutoScalingArgs.builder()
            .disk(DatabaseAutoScalingDiskArgs.builder()
                .capacityEnabled(false)
                .freeSpaceLessThanPercent(0.0)
                .ioAbovePercent(0.0)
                .ioEnabled(false)
                .ioOverPeriod("string")
                .rateIncreasePercent(0.0)
                .rateLimitMbPerMember(0.0)
                .ratePeriodSeconds(0.0)
                .rateUnits("string")
                .build())
            .memory(DatabaseAutoScalingMemoryArgs.builder()
                .ioAbovePercent(0.0)
                .ioEnabled(false)
                .ioOverPeriod("string")
                .rateIncreasePercent(0.0)
                .rateLimitMbPerMember(0.0)
                .ratePeriodSeconds(0.0)
                .rateUnits("string")
                .build())
            .build())
        .logicalReplicationSlots(DatabaseLogicalReplicationSlotArgs.builder()
            .databaseName("string")
            .name("string")
            .pluginType("string")
            .build())
        .name("string")
        .offlineRestore(false)
        .backupEncryptionKeyCrn("string")
        .pointInTimeRecoveryDeploymentId("string")
        .pointInTimeRecoveryTime("string")
        .remoteLeaderId("string")
        .resourceGroupId("string")
        .allowlists(DatabaseAllowlistArgs.builder()
            .address("string")
            .description("string")
            .build())
        .serviceEndpoints("string")
        .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")
        .versionUpgradeSkipBackup(false)
        .build());
    
    database_resource = ibm.Database("databaseResource",
        location="string",
        service="string",
        plan="string",
        database_id="string",
        async_restore=False,
        backup_id="string",
        configuration="string",
        adminpassword="string",
        deletion_protection=False,
        group=[{
            "count": float(0),
            "cpus": [{
                "allocation_count": float(0),
                "can_scale_down": False,
                "is_adjustable": False,
                "minimum_count": float(0),
                "step_size_count": float(0),
                "units": "string",
            }],
            "disks": [{
                "allocation_mb": float(0),
                "can_scale_down": False,
                "is_adjustable": False,
                "minimum_mb": float(0),
                "step_size_mb": float(0),
                "units": "string",
            }],
            "group_id": "string",
            "host_flavors": [{
                "hosting_size": "string",
                "id": "string",
                "name": "string",
            }],
            "memories": [{
                "allocation_mb": float(0),
                "can_scale_down": False,
                "cpu_enforcement_ratio_ceiling_mb": float(0),
                "cpu_enforcement_ratio_mb": float(0),
                "is_adjustable": False,
                "minimum_mb": float(0),
                "step_size_mb": float(0),
                "units": "string",
            }],
        }],
        key_protect_instance="string",
        key_protect_key="string",
        auto_scaling={
            "disk": {
                "capacity_enabled": False,
                "free_space_less_than_percent": float(0),
                "io_above_percent": float(0),
                "io_enabled": False,
                "io_over_period": "string",
                "rate_increase_percent": float(0),
                "rate_limit_mb_per_member": float(0),
                "rate_period_seconds": float(0),
                "rate_units": "string",
            },
            "memory": {
                "io_above_percent": float(0),
                "io_enabled": False,
                "io_over_period": "string",
                "rate_increase_percent": float(0),
                "rate_limit_mb_per_member": float(0),
                "rate_period_seconds": float(0),
                "rate_units": "string",
            },
        },
        logical_replication_slots=[{
            "database_name": "string",
            "name": "string",
            "plugin_type": "string",
        }],
        name="string",
        offline_restore=False,
        backup_encryption_key_crn="string",
        point_in_time_recovery_deployment_id="string",
        point_in_time_recovery_time="string",
        remote_leader_id="string",
        resource_group_id="string",
        allowlists=[{
            "address": "string",
            "description": "string",
        }],
        service_endpoints="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",
        version_upgrade_skip_backup=False)
    
    const databaseResource = new ibm.Database("databaseResource", {
        location: "string",
        service: "string",
        plan: "string",
        databaseId: "string",
        asyncRestore: false,
        backupId: "string",
        configuration: "string",
        adminpassword: "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",
        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",
            },
        },
        logicalReplicationSlots: [{
            databaseName: "string",
            name: "string",
            pluginType: "string",
        }],
        name: "string",
        offlineRestore: false,
        backupEncryptionKeyCrn: "string",
        pointInTimeRecoveryDeploymentId: "string",
        pointInTimeRecoveryTime: "string",
        remoteLeaderId: "string",
        resourceGroupId: "string",
        allowlists: [{
            address: "string",
            description: "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",
        versionUpgradeSkipBackup: false,
    });
    
    type: ibm:Database
    properties:
        adminpassword: string
        allowlists:
            - address: string
              description: string
        asyncRestore: false
        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
        versionUpgradeSkipBackup: false
    

    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 plan type of the Database instance
    Service string
    The name of the Cloud Internet database service
    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 -_.

    Gen2: Accepted but ignored. Gen2 instances do not have a default admin user. Use the ibm.ResourceKey resource to create service credentials for database access.

    Allowlists List<DatabaseAllowlist>
    Allowlist for database access. Gen2: Plan fails if set. IP allowlist configuration is not available for Gen2 instances.
    AsyncRestore bool
    Option to support FAST PG Restore. Only applicable when restoring a PostgreSQL instance. Gen2: Accepted but ignored. Async restore requires backup_id support which is not yet implemented for Gen2 instances.
    AutoScaling DatabaseAutoScaling

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

    Gen2: Accepted but ignored. Auto-scaling policies are not available in Gen2. Monitor your database and manually adjust scaling as needed.

    • 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.

    Gen2: Plan fails if set. Backup encryption is not supported in Gen2.

    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.

    Gen2: Plan fails if set. Restore from backup is not yet implemented for Gen2 instances.

    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.

    Gen2: Accepted but ignored. Database configuration management is not yet implemented for Gen2 instances.

    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.

    Gen2: Fully supported for members, disk, and host_flavor. Note: Multitenant hosts are not supported in Gen2. Plan fails if memory or cpu allocations are set, as memory and CPU are determined by the dedicated host_flavor and cannot be set independently.

    • 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:<…>::.

    Gen2: Accepted but not used. For Gen2 instances, use key_protect_key for disk encryption instead of this attribute.

    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.

    Gen2: Accepted but ignored. Logical replication slots are not available for Gen2 instances.

    Nested scheme for logical_replication_slot:

    Name string
    Resource instance name for example, my Database instance
    OfflineRestore bool
    Set offline restore mode for MongoDB Enterprise Edition. Gen2: Accepted but ignored. Offline restore requires backup_id support which is not yet implemented for Gen2 instances.
    PointInTimeRecoveryDeploymentId string
    The CRN of source instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    PointInTimeRecoveryTime string
    The point in time recovery time stamp of the deployed instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    RemoteLeaderId string
    The CRN of leader database. Gen2: Plan fails if set. Read-only replica creation and promotion are not supported for Gen2 instances.
    ResourceGroupId string
    The id of the resource group in which the Database instance is present
    ServiceEndpoints string
    Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. Required for Classic plans. Gen2: Optional; must be 'private' if set. Gen2 instances only support private endpoints and default to 'private'. Plan fails if set to 'public' or 'public-and-private'.
    SkipInitialBackup bool
    Option to skip the initial backup when promoting a read-only replica. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. Gen2: Accepted but ignored (Classic-only feature for read replica promotion).
    Tags List<string>
    Timeouts DatabaseTimeouts
    Users List<DatabaseUser>
    Database users. Gen2: Plan fails if set. Use the ibm.ResourceKey resource to create service credentials for Gen2 instances.
    Version string
    (String) The database version.
    VersionUpgradeSkipBackup bool
    Option to skip the backup when upgrading version. Only applicable to databases that do not support PITR. Skipping the backup means that your deployment becomes available more quickly, but there is no immediate backup available. This is not recommended as it could result in data loss. Gen2: Accepted but ignored (Classic-only feature for version upgrades).
    Location string
    The location or the region in which Database instance exists
    Plan string
    The plan type of the Database instance
    Service string
    The name of the Cloud Internet database service
    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 -_.

    Gen2: Accepted but ignored. Gen2 instances do not have a default admin user. Use the ibm.ResourceKey resource to create service credentials for database access.

    Allowlists []DatabaseAllowlistArgs
    Allowlist for database access. Gen2: Plan fails if set. IP allowlist configuration is not available for Gen2 instances.
    AsyncRestore bool
    Option to support FAST PG Restore. Only applicable when restoring a PostgreSQL instance. Gen2: Accepted but ignored. Async restore requires backup_id support which is not yet implemented for Gen2 instances.
    AutoScaling DatabaseAutoScalingArgs

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

    Gen2: Accepted but ignored. Auto-scaling policies are not available in Gen2. Monitor your database and manually adjust scaling as needed.

    • 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.

    Gen2: Plan fails if set. Backup encryption is not supported in Gen2.

    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.

    Gen2: Plan fails if set. Restore from backup is not yet implemented for Gen2 instances.

    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.

    Gen2: Accepted but ignored. Database configuration management is not yet implemented for Gen2 instances.

    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.

    Gen2: Fully supported for members, disk, and host_flavor. Note: Multitenant hosts are not supported in Gen2. Plan fails if memory or cpu allocations are set, as memory and CPU are determined by the dedicated host_flavor and cannot be set independently.

    • 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:<…>::.

    Gen2: Accepted but not used. For Gen2 instances, use key_protect_key for disk encryption instead of this attribute.

    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.

    Gen2: Accepted but ignored. Logical replication slots are not available for Gen2 instances.

    Nested scheme for logical_replication_slot:

    Name string
    Resource instance name for example, my Database instance
    OfflineRestore bool
    Set offline restore mode for MongoDB Enterprise Edition. Gen2: Accepted but ignored. Offline restore requires backup_id support which is not yet implemented for Gen2 instances.
    PointInTimeRecoveryDeploymentId string
    The CRN of source instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    PointInTimeRecoveryTime string
    The point in time recovery time stamp of the deployed instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    RemoteLeaderId string
    The CRN of leader database. Gen2: Plan fails if set. Read-only replica creation and promotion are not supported for Gen2 instances.
    ResourceGroupId string
    The id of the resource group in which the Database instance is present
    ServiceEndpoints string
    Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. Required for Classic plans. Gen2: Optional; must be 'private' if set. Gen2 instances only support private endpoints and default to 'private'. Plan fails if set to 'public' or 'public-and-private'.
    SkipInitialBackup bool
    Option to skip the initial backup when promoting a read-only replica. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. Gen2: Accepted but ignored (Classic-only feature for read replica promotion).
    Tags []string
    Timeouts DatabaseTimeoutsArgs
    Users []DatabaseUserArgs
    Database users. Gen2: Plan fails if set. Use the ibm.ResourceKey resource to create service credentials for Gen2 instances.
    Version string
    (String) The database version.
    VersionUpgradeSkipBackup bool
    Option to skip the backup when upgrading version. Only applicable to databases that do not support PITR. Skipping the backup means that your deployment becomes available more quickly, but there is no immediate backup available. This is not recommended as it could result in data loss. Gen2: Accepted but ignored (Classic-only feature for version upgrades).
    location string
    The location or the region in which Database instance exists
    plan string
    The plan type of the Database instance
    service string
    The name of the Cloud Internet database service
    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 -_.

    Gen2: Accepted but ignored. Gen2 instances do not have a default admin user. Use the ibm.ResourceKey resource to create service credentials for database access.

    allowlists list(object)
    Allowlist for database access. Gen2: Plan fails if set. IP allowlist configuration is not available for Gen2 instances.
    async_restore bool
    Option to support FAST PG Restore. Only applicable when restoring a PostgreSQL instance. Gen2: Accepted but ignored. Async restore requires backup_id support which is not yet implemented for Gen2 instances.
    auto_scaling object

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

    Gen2: Accepted but ignored. Auto-scaling policies are not available in Gen2. Monitor your database and manually adjust scaling as needed.

    • Nested scheme for auto_scaling:
    backup_encryption_key_crn 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.

    Gen2: Plan fails if set. Backup encryption is not supported in Gen2.

    backup_id string

    The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format crn:v1:<…>:backup:. If omitted, the database is provisioned empty.

    Gen2: Plan fails if set. Restore from backup is not yet implemented for Gen2 instances.

    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.

    Gen2: Accepted but ignored. Database configuration management is not yet implemented for Gen2 instances.

    database_id string
    (String) The CRN of the database instance.
    deletion_protection bool
    group list(object)

    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.

    Gen2: Fully supported for members, disk, and host_flavor. Note: Multitenant hosts are not supported in Gen2. Plan fails if memory or cpu allocations are set, as memory and CPU are determined by the dedicated host_flavor and cannot be set independently.

    • Nested scheme for group:
    key_protect_instance 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:<…>::.

    Gen2: Accepted but not used. For Gen2 instances, use key_protect_key for disk encryption instead of this attribute.

    key_protect_key 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.
    logical_replication_slots list(object)

    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.

    Gen2: Accepted but ignored. Logical replication slots are not available for Gen2 instances.

    Nested scheme for logical_replication_slot:

    name string
    Resource instance name for example, my Database instance
    offline_restore bool
    Set offline restore mode for MongoDB Enterprise Edition. Gen2: Accepted but ignored. Offline restore requires backup_id support which is not yet implemented for Gen2 instances.
    point_in_time_recovery_deployment_id string
    The CRN of source instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    point_in_time_recovery_time string
    The point in time recovery time stamp of the deployed instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    remote_leader_id string
    The CRN of leader database. Gen2: Plan fails if set. Read-only replica creation and promotion are not supported for Gen2 instances.
    resource_group_id string
    The id of the resource group in which the Database instance is present
    service_endpoints string
    Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. Required for Classic plans. Gen2: Optional; must be 'private' if set. Gen2 instances only support private endpoints and default to 'private'. Plan fails if set to 'public' or 'public-and-private'.
    skip_initial_backup bool
    Option to skip the initial backup when promoting a read-only replica. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. Gen2: Accepted but ignored (Classic-only feature for read replica promotion).
    tags list(string)
    timeouts object
    users list(object)
    Database users. Gen2: Plan fails if set. Use the ibm.ResourceKey resource to create service credentials for Gen2 instances.
    version string
    (String) The database version.
    version_upgrade_skip_backup bool
    Option to skip the backup when upgrading version. Only applicable to databases that do not support PITR. Skipping the backup means that your deployment becomes available more quickly, but there is no immediate backup available. This is not recommended as it could result in data loss. Gen2: Accepted but ignored (Classic-only feature for version upgrades).
    location String
    The location or the region in which Database instance exists
    plan String
    The plan type of the Database instance
    service String
    The name of the Cloud Internet database service
    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 -_.

    Gen2: Accepted but ignored. Gen2 instances do not have a default admin user. Use the ibm.ResourceKey resource to create service credentials for database access.

    allowlists List<DatabaseAllowlist>
    Allowlist for database access. Gen2: Plan fails if set. IP allowlist configuration is not available for Gen2 instances.
    asyncRestore Boolean
    Option to support FAST PG Restore. Only applicable when restoring a PostgreSQL instance. Gen2: Accepted but ignored. Async restore requires backup_id support which is not yet implemented for Gen2 instances.
    autoScaling DatabaseAutoScaling

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

    Gen2: Accepted but ignored. Auto-scaling policies are not available in Gen2. Monitor your database and manually adjust scaling as needed.

    • 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.

    Gen2: Plan fails if set. Backup encryption is not supported in Gen2.

    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.

    Gen2: Plan fails if set. Restore from backup is not yet implemented for Gen2 instances.

    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.

    Gen2: Accepted but ignored. Database configuration management is not yet implemented for Gen2 instances.

    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.

    Gen2: Fully supported for members, disk, and host_flavor. Note: Multitenant hosts are not supported in Gen2. Plan fails if memory or cpu allocations are set, as memory and CPU are determined by the dedicated host_flavor and cannot be set independently.

    • 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:<…>::.

    Gen2: Accepted but not used. For Gen2 instances, use key_protect_key for disk encryption instead of this attribute.

    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.

    Gen2: Accepted but ignored. Logical replication slots are not available for Gen2 instances.

    Nested scheme for logical_replication_slot:

    name String
    Resource instance name for example, my Database instance
    offlineRestore Boolean
    Set offline restore mode for MongoDB Enterprise Edition. Gen2: Accepted but ignored. Offline restore requires backup_id support which is not yet implemented for Gen2 instances.
    pointInTimeRecoveryDeploymentId String
    The CRN of source instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    pointInTimeRecoveryTime String
    The point in time recovery time stamp of the deployed instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    remoteLeaderId String
    The CRN of leader database. Gen2: Plan fails if set. Read-only replica creation and promotion are not supported for Gen2 instances.
    resourceGroupId String
    The id of the resource group in which the Database instance is present
    serviceEndpoints String
    Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. Required for Classic plans. Gen2: Optional; must be 'private' if set. Gen2 instances only support private endpoints and default to 'private'. Plan fails if set to 'public' or 'public-and-private'.
    skipInitialBackup Boolean
    Option to skip the initial backup when promoting a read-only replica. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. Gen2: Accepted but ignored (Classic-only feature for read replica promotion).
    tags List<String>
    timeouts DatabaseTimeouts
    users List<DatabaseUser>
    Database users. Gen2: Plan fails if set. Use the ibm.ResourceKey resource to create service credentials for Gen2 instances.
    version String
    (String) The database version.
    versionUpgradeSkipBackup Boolean
    Option to skip the backup when upgrading version. Only applicable to databases that do not support PITR. Skipping the backup means that your deployment becomes available more quickly, but there is no immediate backup available. This is not recommended as it could result in data loss. Gen2: Accepted but ignored (Classic-only feature for version upgrades).
    location string
    The location or the region in which Database instance exists
    plan string
    The plan type of the Database instance
    service string
    The name of the Cloud Internet database service
    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 -_.

    Gen2: Accepted but ignored. Gen2 instances do not have a default admin user. Use the ibm.ResourceKey resource to create service credentials for database access.

    allowlists DatabaseAllowlist[]
    Allowlist for database access. Gen2: Plan fails if set. IP allowlist configuration is not available for Gen2 instances.
    asyncRestore boolean
    Option to support FAST PG Restore. Only applicable when restoring a PostgreSQL instance. Gen2: Accepted but ignored. Async restore requires backup_id support which is not yet implemented for Gen2 instances.
    autoScaling DatabaseAutoScaling

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

    Gen2: Accepted but ignored. Auto-scaling policies are not available in Gen2. Monitor your database and manually adjust scaling as needed.

    • 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.

    Gen2: Plan fails if set. Backup encryption is not supported in Gen2.

    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.

    Gen2: Plan fails if set. Restore from backup is not yet implemented for Gen2 instances.

    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.

    Gen2: Accepted but ignored. Database configuration management is not yet implemented for Gen2 instances.

    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.

    Gen2: Fully supported for members, disk, and host_flavor. Note: Multitenant hosts are not supported in Gen2. Plan fails if memory or cpu allocations are set, as memory and CPU are determined by the dedicated host_flavor and cannot be set independently.

    • 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:<…>::.

    Gen2: Accepted but not used. For Gen2 instances, use key_protect_key for disk encryption instead of this attribute.

    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.

    Gen2: Accepted but ignored. Logical replication slots are not available for Gen2 instances.

    Nested scheme for logical_replication_slot:

    name string
    Resource instance name for example, my Database instance
    offlineRestore boolean
    Set offline restore mode for MongoDB Enterprise Edition. Gen2: Accepted but ignored. Offline restore requires backup_id support which is not yet implemented for Gen2 instances.
    pointInTimeRecoveryDeploymentId string
    The CRN of source instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    pointInTimeRecoveryTime string
    The point in time recovery time stamp of the deployed instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    remoteLeaderId string
    The CRN of leader database. Gen2: Plan fails if set. Read-only replica creation and promotion are not supported for Gen2 instances.
    resourceGroupId string
    The id of the resource group in which the Database instance is present
    serviceEndpoints string
    Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. Required for Classic plans. Gen2: Optional; must be 'private' if set. Gen2 instances only support private endpoints and default to 'private'. Plan fails if set to 'public' or 'public-and-private'.
    skipInitialBackup boolean
    Option to skip the initial backup when promoting a read-only replica. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. Gen2: Accepted but ignored (Classic-only feature for read replica promotion).
    tags string[]
    timeouts DatabaseTimeouts
    users DatabaseUser[]
    Database users. Gen2: Plan fails if set. Use the ibm.ResourceKey resource to create service credentials for Gen2 instances.
    version string
    (String) The database version.
    versionUpgradeSkipBackup boolean
    Option to skip the backup when upgrading version. Only applicable to databases that do not support PITR. Skipping the backup means that your deployment becomes available more quickly, but there is no immediate backup available. This is not recommended as it could result in data loss. Gen2: Accepted but ignored (Classic-only feature for version upgrades).
    location str
    The location or the region in which Database instance exists
    plan str
    The plan type of the Database instance
    service str
    The name of the Cloud Internet database service
    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 -_.

    Gen2: Accepted but ignored. Gen2 instances do not have a default admin user. Use the ibm.ResourceKey resource to create service credentials for database access.

    allowlists Sequence[DatabaseAllowlistArgs]
    Allowlist for database access. Gen2: Plan fails if set. IP allowlist configuration is not available for Gen2 instances.
    async_restore bool
    Option to support FAST PG Restore. Only applicable when restoring a PostgreSQL instance. Gen2: Accepted but ignored. Async restore requires backup_id support which is not yet implemented for Gen2 instances.
    auto_scaling DatabaseAutoScalingArgs

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

    Gen2: Accepted but ignored. Auto-scaling policies are not available in Gen2. Monitor your database and manually adjust scaling as needed.

    • 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.

    Gen2: Plan fails if set. Backup encryption is not supported in Gen2.

    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.

    Gen2: Plan fails if set. Restore from backup is not yet implemented for Gen2 instances.

    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.

    Gen2: Accepted but ignored. Database configuration management is not yet implemented for Gen2 instances.

    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.

    Gen2: Fully supported for members, disk, and host_flavor. Note: Multitenant hosts are not supported in Gen2. Plan fails if memory or cpu allocations are set, as memory and CPU are determined by the dedicated host_flavor and cannot be set independently.

    • 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:<…>::.

    Gen2: Accepted but not used. For Gen2 instances, use key_protect_key for disk encryption instead of this attribute.

    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.

    Gen2: Accepted but ignored. Logical replication slots are not available for Gen2 instances.

    Nested scheme for logical_replication_slot:

    name str
    Resource instance name for example, my Database instance
    offline_restore bool
    Set offline restore mode for MongoDB Enterprise Edition. Gen2: Accepted but ignored. Offline restore requires backup_id support which is not yet implemented for Gen2 instances.
    point_in_time_recovery_deployment_id str
    The CRN of source instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    point_in_time_recovery_time str
    The point in time recovery time stamp of the deployed instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    remote_leader_id str
    The CRN of leader database. Gen2: Plan fails if set. Read-only replica creation and promotion are not supported for Gen2 instances.
    resource_group_id str
    The id of the resource group in which the Database instance is present
    service_endpoints str
    Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. Required for Classic plans. Gen2: Optional; must be 'private' if set. Gen2 instances only support private endpoints and default to 'private'. Plan fails if set to 'public' or 'public-and-private'.
    skip_initial_backup bool
    Option to skip the initial backup when promoting a read-only replica. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. Gen2: Accepted but ignored (Classic-only feature for read replica promotion).
    tags Sequence[str]
    timeouts DatabaseTimeoutsArgs
    users Sequence[DatabaseUserArgs]
    Database users. Gen2: Plan fails if set. Use the ibm.ResourceKey resource to create service credentials for Gen2 instances.
    version str
    (String) The database version.
    version_upgrade_skip_backup bool
    Option to skip the backup when upgrading version. Only applicable to databases that do not support PITR. Skipping the backup means that your deployment becomes available more quickly, but there is no immediate backup available. This is not recommended as it could result in data loss. Gen2: Accepted but ignored (Classic-only feature for version upgrades).
    location String
    The location or the region in which Database instance exists
    plan String
    The plan type of the Database instance
    service String
    The name of the Cloud Internet database service
    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 -_.

    Gen2: Accepted but ignored. Gen2 instances do not have a default admin user. Use the ibm.ResourceKey resource to create service credentials for database access.

    allowlists List<Property Map>
    Allowlist for database access. Gen2: Plan fails if set. IP allowlist configuration is not available for Gen2 instances.
    asyncRestore Boolean
    Option to support FAST PG Restore. Only applicable when restoring a PostgreSQL instance. Gen2: Accepted but ignored. Async restore requires backup_id support which is not yet implemented for Gen2 instances.
    autoScaling Property Map

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

    Gen2: Accepted but ignored. Auto-scaling policies are not available in Gen2. Monitor your database and manually adjust scaling as needed.

    • 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.

    Gen2: Plan fails if set. Backup encryption is not supported in Gen2.

    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.

    Gen2: Plan fails if set. Restore from backup is not yet implemented for Gen2 instances.

    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.

    Gen2: Accepted but ignored. Database configuration management is not yet implemented for Gen2 instances.

    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.

    Gen2: Fully supported for members, disk, and host_flavor. Note: Multitenant hosts are not supported in Gen2. Plan fails if memory or cpu allocations are set, as memory and CPU are determined by the dedicated host_flavor and cannot be set independently.

    • 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:<…>::.

    Gen2: Accepted but not used. For Gen2 instances, use key_protect_key for disk encryption instead of this attribute.

    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.

    Gen2: Accepted but ignored. Logical replication slots are not available for Gen2 instances.

    Nested scheme for logical_replication_slot:

    name String
    Resource instance name for example, my Database instance
    offlineRestore Boolean
    Set offline restore mode for MongoDB Enterprise Edition. Gen2: Accepted but ignored. Offline restore requires backup_id support which is not yet implemented for Gen2 instances.
    pointInTimeRecoveryDeploymentId String
    The CRN of source instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    pointInTimeRecoveryTime String
    The point in time recovery time stamp of the deployed instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    remoteLeaderId String
    The CRN of leader database. Gen2: Plan fails if set. Read-only replica creation and promotion are not supported for Gen2 instances.
    resourceGroupId String
    The id of the resource group in which the Database instance is present
    serviceEndpoints String
    Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. Required for Classic plans. Gen2: Optional; must be 'private' if set. Gen2 instances only support private endpoints and default to 'private'. Plan fails if set to 'public' or 'public-and-private'.
    skipInitialBackup Boolean
    Option to skip the initial backup when promoting a read-only replica. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. Gen2: Accepted but ignored (Classic-only feature for read replica promotion).
    tags List<String>
    timeouts Property Map
    users List<Property Map>
    Database users. Gen2: Plan fails if set. Use the ibm.ResourceKey resource to create service credentials for Gen2 instances.
    version String
    (String) The database version.
    versionUpgradeSkipBackup Boolean
    Option to skip the backup when upgrading version. Only applicable to databases that do not support PITR. Skipping the backup means that your deployment becomes available more quickly, but there is no immediate backup available. This is not recommended as it could result in data loss. Gen2: Accepted but ignored (Classic-only feature for version upgrades).

    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>
    (List) A list of scaling groups for the database. This is a computed attribute that shows the current resource allocations.
    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
    (List) A list of scaling groups for the database. This is a computed attribute that shows the current resource allocations.
    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.
    configuration_schema string
    (String) Database Configuration Schema in JSON format.
    groups list(object)
    (List) A list of scaling groups for the database. This is a computed attribute that shows the current resource allocations.
    guid string
    The unique identifier of the database instance.
    id string
    The provider-assigned unique ID for this managed resource.
    resource_controller_url string
    The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
    resource_crn string
    The crn of the resource
    resource_group_name string
    The resource group name in which resource is provisioned
    resource_name string
    The name of the resource
    resource_status string
    The status of the resource
    status string
    (String) The status of the instance.
    adminuser String
    (String) The user ID of the database administrator. Example, admin or root.
    configurationSchema String
    (String) Database Configuration Schema in JSON format.
    groups List<DatabaseGroup>
    (List) A list of scaling groups for the database. This is a computed attribute that shows the current resource allocations.
    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[]
    (List) A list of scaling groups for the database. This is a computed attribute that shows the current resource allocations.
    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]
    (List) A list of scaling groups for the database. This is a computed attribute that shows the current resource allocations.
    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>
    (List) A list of scaling groups for the database. This is a computed attribute that shows the current resource allocations.
    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,
            async_restore: Optional[bool] = 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,
            version_upgrade_skip_backup: Optional[bool] = 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}
    import {
      to = ibm_database.example
      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 -_.

    Gen2: Accepted but ignored. Gen2 instances do not have a default admin user. Use the ibm.ResourceKey resource to create service credentials for database access.

    Adminuser string
    (String) The user ID of the database administrator. Example, admin or root.
    Allowlists List<DatabaseAllowlist>
    Allowlist for database access. Gen2: Plan fails if set. IP allowlist configuration is not available for Gen2 instances.
    AsyncRestore bool
    Option to support FAST PG Restore. Only applicable when restoring a PostgreSQL instance. Gen2: Accepted but ignored. Async restore requires backup_id support which is not yet implemented for Gen2 instances.
    AutoScaling DatabaseAutoScaling

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

    Gen2: Accepted but ignored. Auto-scaling policies are not available in Gen2. Monitor your database and manually adjust scaling as needed.

    • 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.

    Gen2: Plan fails if set. Backup encryption is not supported in Gen2.

    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.

    Gen2: Plan fails if set. Restore from backup is not yet implemented for Gen2 instances.

    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.

    Gen2: Accepted but ignored. Database configuration management is not yet implemented for Gen2 instances.

    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.

    Gen2: Fully supported for members, disk, and host_flavor. Note: Multitenant hosts are not supported in Gen2. Plan fails if memory or cpu allocations are set, as memory and CPU are determined by the dedicated host_flavor and cannot be set independently.

    • Nested scheme for group:
    Groups List<DatabaseGroup>
    (List) A list of scaling groups for the database. This is a computed attribute that shows the current resource allocations.
    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:<…>::.

    Gen2: Accepted but not used. For Gen2 instances, use key_protect_key for disk encryption instead of this attribute.

    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.

    Gen2: Accepted but ignored. Logical replication slots are not available for Gen2 instances.

    Nested scheme for logical_replication_slot:

    Name string
    Resource instance name for example, my Database instance
    OfflineRestore bool
    Set offline restore mode for MongoDB Enterprise Edition. Gen2: Accepted but ignored. Offline restore requires backup_id support which is not yet implemented for Gen2 instances.
    Plan string
    The plan type of the Database instance
    PointInTimeRecoveryDeploymentId string
    The CRN of source instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    PointInTimeRecoveryTime string
    The point in time recovery time stamp of the deployed instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    RemoteLeaderId string
    The CRN of leader database. Gen2: Plan fails if set. Read-only replica creation and promotion are not supported for Gen2 instances.
    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 in which the Database instance is present
    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 name of the Cloud Internet database service
    ServiceEndpoints string
    Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. Required for Classic plans. Gen2: Optional; must be 'private' if set. Gen2 instances only support private endpoints and default to 'private'. Plan fails if set to 'public' or 'public-and-private'.
    SkipInitialBackup bool
    Option to skip the initial backup when promoting a read-only replica. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. Gen2: Accepted but ignored (Classic-only feature for read replica promotion).
    Status string
    (String) The status of the instance.
    Tags List<string>
    Timeouts DatabaseTimeouts
    Users List<DatabaseUser>
    Database users. Gen2: Plan fails if set. Use the ibm.ResourceKey resource to create service credentials for Gen2 instances.
    Version string
    (String) The database version.
    VersionUpgradeSkipBackup bool
    Option to skip the backup when upgrading version. Only applicable to databases that do not support PITR. Skipping the backup means that your deployment becomes available more quickly, but there is no immediate backup available. This is not recommended as it could result in data loss. Gen2: Accepted but ignored (Classic-only feature for version upgrades).
    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 -_.

    Gen2: Accepted but ignored. Gen2 instances do not have a default admin user. Use the ibm.ResourceKey resource to create service credentials for database access.

    Adminuser string
    (String) The user ID of the database administrator. Example, admin or root.
    Allowlists []DatabaseAllowlistArgs
    Allowlist for database access. Gen2: Plan fails if set. IP allowlist configuration is not available for Gen2 instances.
    AsyncRestore bool
    Option to support FAST PG Restore. Only applicable when restoring a PostgreSQL instance. Gen2: Accepted but ignored. Async restore requires backup_id support which is not yet implemented for Gen2 instances.
    AutoScaling DatabaseAutoScalingArgs

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

    Gen2: Accepted but ignored. Auto-scaling policies are not available in Gen2. Monitor your database and manually adjust scaling as needed.

    • 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.

    Gen2: Plan fails if set. Backup encryption is not supported in Gen2.

    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.

    Gen2: Plan fails if set. Restore from backup is not yet implemented for Gen2 instances.

    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.

    Gen2: Accepted but ignored. Database configuration management is not yet implemented for Gen2 instances.

    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.

    Gen2: Fully supported for members, disk, and host_flavor. Note: Multitenant hosts are not supported in Gen2. Plan fails if memory or cpu allocations are set, as memory and CPU are determined by the dedicated host_flavor and cannot be set independently.

    • Nested scheme for group:
    Groups []DatabaseGroupArgs
    (List) A list of scaling groups for the database. This is a computed attribute that shows the current resource allocations.
    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:<…>::.

    Gen2: Accepted but not used. For Gen2 instances, use key_protect_key for disk encryption instead of this attribute.

    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.

    Gen2: Accepted but ignored. Logical replication slots are not available for Gen2 instances.

    Nested scheme for logical_replication_slot:

    Name string
    Resource instance name for example, my Database instance
    OfflineRestore bool
    Set offline restore mode for MongoDB Enterprise Edition. Gen2: Accepted but ignored. Offline restore requires backup_id support which is not yet implemented for Gen2 instances.
    Plan string
    The plan type of the Database instance
    PointInTimeRecoveryDeploymentId string
    The CRN of source instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    PointInTimeRecoveryTime string
    The point in time recovery time stamp of the deployed instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    RemoteLeaderId string
    The CRN of leader database. Gen2: Plan fails if set. Read-only replica creation and promotion are not supported for Gen2 instances.
    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 in which the Database instance is present
    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 name of the Cloud Internet database service
    ServiceEndpoints string
    Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. Required for Classic plans. Gen2: Optional; must be 'private' if set. Gen2 instances only support private endpoints and default to 'private'. Plan fails if set to 'public' or 'public-and-private'.
    SkipInitialBackup bool
    Option to skip the initial backup when promoting a read-only replica. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. Gen2: Accepted but ignored (Classic-only feature for read replica promotion).
    Status string
    (String) The status of the instance.
    Tags []string
    Timeouts DatabaseTimeoutsArgs
    Users []DatabaseUserArgs
    Database users. Gen2: Plan fails if set. Use the ibm.ResourceKey resource to create service credentials for Gen2 instances.
    Version string
    (String) The database version.
    VersionUpgradeSkipBackup bool
    Option to skip the backup when upgrading version. Only applicable to databases that do not support PITR. Skipping the backup means that your deployment becomes available more quickly, but there is no immediate backup available. This is not recommended as it could result in data loss. Gen2: Accepted but ignored (Classic-only feature for version upgrades).
    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 -_.

    Gen2: Accepted but ignored. Gen2 instances do not have a default admin user. Use the ibm.ResourceKey resource to create service credentials for database access.

    adminuser string
    (String) The user ID of the database administrator. Example, admin or root.
    allowlists list(object)
    Allowlist for database access. Gen2: Plan fails if set. IP allowlist configuration is not available for Gen2 instances.
    async_restore bool
    Option to support FAST PG Restore. Only applicable when restoring a PostgreSQL instance. Gen2: Accepted but ignored. Async restore requires backup_id support which is not yet implemented for Gen2 instances.
    auto_scaling object

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

    Gen2: Accepted but ignored. Auto-scaling policies are not available in Gen2. Monitor your database and manually adjust scaling as needed.

    • Nested scheme for auto_scaling:
    backup_encryption_key_crn 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.

    Gen2: Plan fails if set. Backup encryption is not supported in Gen2.

    backup_id string

    The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format crn:v1:<…>:backup:. If omitted, the database is provisioned empty.

    Gen2: Plan fails if set. Restore from backup is not yet implemented for Gen2 instances.

    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.

    Gen2: Accepted but ignored. Database configuration management is not yet implemented for Gen2 instances.

    configuration_schema string
    (String) Database Configuration Schema in JSON format.
    database_id string
    (String) The CRN of the database instance.
    deletion_protection bool
    group list(object)

    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.

    Gen2: Fully supported for members, disk, and host_flavor. Note: Multitenant hosts are not supported in Gen2. Plan fails if memory or cpu allocations are set, as memory and CPU are determined by the dedicated host_flavor and cannot be set independently.

    • Nested scheme for group:
    groups list(object)
    (List) A list of scaling groups for the database. This is a computed attribute that shows the current resource allocations.
    guid string
    The unique identifier of the database instance.
    key_protect_instance 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:<…>::.

    Gen2: Accepted but not used. For Gen2 instances, use key_protect_key for disk encryption instead of this attribute.

    key_protect_key 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
    logical_replication_slots list(object)

    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.

    Gen2: Accepted but ignored. Logical replication slots are not available for Gen2 instances.

    Nested scheme for logical_replication_slot:

    name string
    Resource instance name for example, my Database instance
    offline_restore bool
    Set offline restore mode for MongoDB Enterprise Edition. Gen2: Accepted but ignored. Offline restore requires backup_id support which is not yet implemented for Gen2 instances.
    plan string
    The plan type of the Database instance
    point_in_time_recovery_deployment_id string
    The CRN of source instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    point_in_time_recovery_time string
    The point in time recovery time stamp of the deployed instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    remote_leader_id string
    The CRN of leader database. Gen2: Plan fails if set. Read-only replica creation and promotion are not supported for Gen2 instances.
    resource_controller_url string
    The URL of the IBM Cloud dashboard that can be used to explore and view details about the resource
    resource_crn string
    The crn of the resource
    resource_group_id string
    The id of the resource group in which the Database instance is present
    resource_group_name string
    The resource group name in which resource is provisioned
    resource_name string
    The name of the resource
    resource_status string
    The status of the resource
    service string
    The name of the Cloud Internet database service
    service_endpoints string
    Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. Required for Classic plans. Gen2: Optional; must be 'private' if set. Gen2 instances only support private endpoints and default to 'private'. Plan fails if set to 'public' or 'public-and-private'.
    skip_initial_backup bool
    Option to skip the initial backup when promoting a read-only replica. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. Gen2: Accepted but ignored (Classic-only feature for read replica promotion).
    status string
    (String) The status of the instance.
    tags list(string)
    timeouts object
    users list(object)
    Database users. Gen2: Plan fails if set. Use the ibm.ResourceKey resource to create service credentials for Gen2 instances.
    version string
    (String) The database version.
    version_upgrade_skip_backup bool
    Option to skip the backup when upgrading version. Only applicable to databases that do not support PITR. Skipping the backup means that your deployment becomes available more quickly, but there is no immediate backup available. This is not recommended as it could result in data loss. Gen2: Accepted but ignored (Classic-only feature for version upgrades).
    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 -_.

    Gen2: Accepted but ignored. Gen2 instances do not have a default admin user. Use the ibm.ResourceKey resource to create service credentials for database access.

    adminuser String
    (String) The user ID of the database administrator. Example, admin or root.
    allowlists List<DatabaseAllowlist>
    Allowlist for database access. Gen2: Plan fails if set. IP allowlist configuration is not available for Gen2 instances.
    asyncRestore Boolean
    Option to support FAST PG Restore. Only applicable when restoring a PostgreSQL instance. Gen2: Accepted but ignored. Async restore requires backup_id support which is not yet implemented for Gen2 instances.
    autoScaling DatabaseAutoScaling

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

    Gen2: Accepted but ignored. Auto-scaling policies are not available in Gen2. Monitor your database and manually adjust scaling as needed.

    • 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.

    Gen2: Plan fails if set. Backup encryption is not supported in Gen2.

    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.

    Gen2: Plan fails if set. Restore from backup is not yet implemented for Gen2 instances.

    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.

    Gen2: Accepted but ignored. Database configuration management is not yet implemented for Gen2 instances.

    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.

    Gen2: Fully supported for members, disk, and host_flavor. Note: Multitenant hosts are not supported in Gen2. Plan fails if memory or cpu allocations are set, as memory and CPU are determined by the dedicated host_flavor and cannot be set independently.

    • Nested scheme for group:
    groups List<DatabaseGroup>
    (List) A list of scaling groups for the database. This is a computed attribute that shows the current resource allocations.
    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:<…>::.

    Gen2: Accepted but not used. For Gen2 instances, use key_protect_key for disk encryption instead of this attribute.

    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.

    Gen2: Accepted but ignored. Logical replication slots are not available for Gen2 instances.

    Nested scheme for logical_replication_slot:

    name String
    Resource instance name for example, my Database instance
    offlineRestore Boolean
    Set offline restore mode for MongoDB Enterprise Edition. Gen2: Accepted but ignored. Offline restore requires backup_id support which is not yet implemented for Gen2 instances.
    plan String
    The plan type of the Database instance
    pointInTimeRecoveryDeploymentId String
    The CRN of source instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    pointInTimeRecoveryTime String
    The point in time recovery time stamp of the deployed instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    remoteLeaderId String
    The CRN of leader database. Gen2: Plan fails if set. Read-only replica creation and promotion are not supported for Gen2 instances.
    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 in which the Database instance is present
    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 name of the Cloud Internet database service
    serviceEndpoints String
    Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. Required for Classic plans. Gen2: Optional; must be 'private' if set. Gen2 instances only support private endpoints and default to 'private'. Plan fails if set to 'public' or 'public-and-private'.
    skipInitialBackup Boolean
    Option to skip the initial backup when promoting a read-only replica. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. Gen2: Accepted but ignored (Classic-only feature for read replica promotion).
    status String
    (String) The status of the instance.
    tags List<String>
    timeouts DatabaseTimeouts
    users List<DatabaseUser>
    Database users. Gen2: Plan fails if set. Use the ibm.ResourceKey resource to create service credentials for Gen2 instances.
    version String
    (String) The database version.
    versionUpgradeSkipBackup Boolean
    Option to skip the backup when upgrading version. Only applicable to databases that do not support PITR. Skipping the backup means that your deployment becomes available more quickly, but there is no immediate backup available. This is not recommended as it could result in data loss. Gen2: Accepted but ignored (Classic-only feature for version upgrades).
    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 -_.

    Gen2: Accepted but ignored. Gen2 instances do not have a default admin user. Use the ibm.ResourceKey resource to create service credentials for database access.

    adminuser string
    (String) The user ID of the database administrator. Example, admin or root.
    allowlists DatabaseAllowlist[]
    Allowlist for database access. Gen2: Plan fails if set. IP allowlist configuration is not available for Gen2 instances.
    asyncRestore boolean
    Option to support FAST PG Restore. Only applicable when restoring a PostgreSQL instance. Gen2: Accepted but ignored. Async restore requires backup_id support which is not yet implemented for Gen2 instances.
    autoScaling DatabaseAutoScaling

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

    Gen2: Accepted but ignored. Auto-scaling policies are not available in Gen2. Monitor your database and manually adjust scaling as needed.

    • 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.

    Gen2: Plan fails if set. Backup encryption is not supported in Gen2.

    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.

    Gen2: Plan fails if set. Restore from backup is not yet implemented for Gen2 instances.

    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.

    Gen2: Accepted but ignored. Database configuration management is not yet implemented for Gen2 instances.

    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.

    Gen2: Fully supported for members, disk, and host_flavor. Note: Multitenant hosts are not supported in Gen2. Plan fails if memory or cpu allocations are set, as memory and CPU are determined by the dedicated host_flavor and cannot be set independently.

    • Nested scheme for group:
    groups DatabaseGroup[]
    (List) A list of scaling groups for the database. This is a computed attribute that shows the current resource allocations.
    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:<…>::.

    Gen2: Accepted but not used. For Gen2 instances, use key_protect_key for disk encryption instead of this attribute.

    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.

    Gen2: Accepted but ignored. Logical replication slots are not available for Gen2 instances.

    Nested scheme for logical_replication_slot:

    name string
    Resource instance name for example, my Database instance
    offlineRestore boolean
    Set offline restore mode for MongoDB Enterprise Edition. Gen2: Accepted but ignored. Offline restore requires backup_id support which is not yet implemented for Gen2 instances.
    plan string
    The plan type of the Database instance
    pointInTimeRecoveryDeploymentId string
    The CRN of source instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    pointInTimeRecoveryTime string
    The point in time recovery time stamp of the deployed instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    remoteLeaderId string
    The CRN of leader database. Gen2: Plan fails if set. Read-only replica creation and promotion are not supported for Gen2 instances.
    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 in which the Database instance is present
    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 name of the Cloud Internet database service
    serviceEndpoints string
    Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. Required for Classic plans. Gen2: Optional; must be 'private' if set. Gen2 instances only support private endpoints and default to 'private'. Plan fails if set to 'public' or 'public-and-private'.
    skipInitialBackup boolean
    Option to skip the initial backup when promoting a read-only replica. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. Gen2: Accepted but ignored (Classic-only feature for read replica promotion).
    status string
    (String) The status of the instance.
    tags string[]
    timeouts DatabaseTimeouts
    users DatabaseUser[]
    Database users. Gen2: Plan fails if set. Use the ibm.ResourceKey resource to create service credentials for Gen2 instances.
    version string
    (String) The database version.
    versionUpgradeSkipBackup boolean
    Option to skip the backup when upgrading version. Only applicable to databases that do not support PITR. Skipping the backup means that your deployment becomes available more quickly, but there is no immediate backup available. This is not recommended as it could result in data loss. Gen2: Accepted but ignored (Classic-only feature for version upgrades).
    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 -_.

    Gen2: Accepted but ignored. Gen2 instances do not have a default admin user. Use the ibm.ResourceKey resource to create service credentials for database access.

    adminuser str
    (String) The user ID of the database administrator. Example, admin or root.
    allowlists Sequence[DatabaseAllowlistArgs]
    Allowlist for database access. Gen2: Plan fails if set. IP allowlist configuration is not available for Gen2 instances.
    async_restore bool
    Option to support FAST PG Restore. Only applicable when restoring a PostgreSQL instance. Gen2: Accepted but ignored. Async restore requires backup_id support which is not yet implemented for Gen2 instances.
    auto_scaling DatabaseAutoScalingArgs

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

    Gen2: Accepted but ignored. Auto-scaling policies are not available in Gen2. Monitor your database and manually adjust scaling as needed.

    • 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.

    Gen2: Plan fails if set. Backup encryption is not supported in Gen2.

    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.

    Gen2: Plan fails if set. Restore from backup is not yet implemented for Gen2 instances.

    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.

    Gen2: Accepted but ignored. Database configuration management is not yet implemented for Gen2 instances.

    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.

    Gen2: Fully supported for members, disk, and host_flavor. Note: Multitenant hosts are not supported in Gen2. Plan fails if memory or cpu allocations are set, as memory and CPU are determined by the dedicated host_flavor and cannot be set independently.

    • Nested scheme for group:
    groups Sequence[DatabaseGroupArgs]
    (List) A list of scaling groups for the database. This is a computed attribute that shows the current resource allocations.
    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:<…>::.

    Gen2: Accepted but not used. For Gen2 instances, use key_protect_key for disk encryption instead of this attribute.

    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.

    Gen2: Accepted but ignored. Logical replication slots are not available for Gen2 instances.

    Nested scheme for logical_replication_slot:

    name str
    Resource instance name for example, my Database instance
    offline_restore bool
    Set offline restore mode for MongoDB Enterprise Edition. Gen2: Accepted but ignored. Offline restore requires backup_id support which is not yet implemented for Gen2 instances.
    plan str
    The plan type of the Database instance
    point_in_time_recovery_deployment_id str
    The CRN of source instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    point_in_time_recovery_time str
    The point in time recovery time stamp of the deployed instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    remote_leader_id str
    The CRN of leader database. Gen2: Plan fails if set. Read-only replica creation and promotion are not supported for Gen2 instances.
    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 in which the Database instance is present
    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 name of the Cloud Internet database service
    service_endpoints str
    Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. Required for Classic plans. Gen2: Optional; must be 'private' if set. Gen2 instances only support private endpoints and default to 'private'. Plan fails if set to 'public' or 'public-and-private'.
    skip_initial_backup bool
    Option to skip the initial backup when promoting a read-only replica. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. Gen2: Accepted but ignored (Classic-only feature for read replica promotion).
    status str
    (String) The status of the instance.
    tags Sequence[str]
    timeouts DatabaseTimeoutsArgs
    users Sequence[DatabaseUserArgs]
    Database users. Gen2: Plan fails if set. Use the ibm.ResourceKey resource to create service credentials for Gen2 instances.
    version str
    (String) The database version.
    version_upgrade_skip_backup bool
    Option to skip the backup when upgrading version. Only applicable to databases that do not support PITR. Skipping the backup means that your deployment becomes available more quickly, but there is no immediate backup available. This is not recommended as it could result in data loss. Gen2: Accepted but ignored (Classic-only feature for version upgrades).
    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 -_.

    Gen2: Accepted but ignored. Gen2 instances do not have a default admin user. Use the ibm.ResourceKey resource to create service credentials for database access.

    adminuser String
    (String) The user ID of the database administrator. Example, admin or root.
    allowlists List<Property Map>
    Allowlist for database access. Gen2: Plan fails if set. IP allowlist configuration is not available for Gen2 instances.
    asyncRestore Boolean
    Option to support FAST PG Restore. Only applicable when restoring a PostgreSQL instance. Gen2: Accepted but ignored. Async restore requires backup_id support which is not yet implemented for Gen2 instances.
    autoScaling Property Map

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

    Gen2: Accepted but ignored. Auto-scaling policies are not available in Gen2. Monitor your database and manually adjust scaling as needed.

    • 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.

    Gen2: Plan fails if set. Backup encryption is not supported in Gen2.

    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.

    Gen2: Plan fails if set. Restore from backup is not yet implemented for Gen2 instances.

    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.

    Gen2: Accepted but ignored. Database configuration management is not yet implemented for Gen2 instances.

    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.

    Gen2: Fully supported for members, disk, and host_flavor. Note: Multitenant hosts are not supported in Gen2. Plan fails if memory or cpu allocations are set, as memory and CPU are determined by the dedicated host_flavor and cannot be set independently.

    • Nested scheme for group:
    groups List<Property Map>
    (List) A list of scaling groups for the database. This is a computed attribute that shows the current resource allocations.
    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:<…>::.

    Gen2: Accepted but not used. For Gen2 instances, use key_protect_key for disk encryption instead of this attribute.

    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.

    Gen2: Accepted but ignored. Logical replication slots are not available for Gen2 instances.

    Nested scheme for logical_replication_slot:

    name String
    Resource instance name for example, my Database instance
    offlineRestore Boolean
    Set offline restore mode for MongoDB Enterprise Edition. Gen2: Accepted but ignored. Offline restore requires backup_id support which is not yet implemented for Gen2 instances.
    plan String
    The plan type of the Database instance
    pointInTimeRecoveryDeploymentId String
    The CRN of source instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    pointInTimeRecoveryTime String
    The point in time recovery time stamp of the deployed instance. Gen2: Plan fails if set. Point-in-time recovery is not yet implemented for Gen2 instances.
    remoteLeaderId String
    The CRN of leader database. Gen2: Plan fails if set. Read-only replica creation and promotion are not supported for Gen2 instances.
    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 in which the Database instance is present
    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 name of the Cloud Internet database service
    serviceEndpoints String
    Types of the service endpoints. Possible values are 'public', 'private', 'public-and-private'. Required for Classic plans. Gen2: Optional; must be 'private' if set. Gen2 instances only support private endpoints and default to 'private'. Plan fails if set to 'public' or 'public-and-private'.
    skipInitialBackup Boolean
    Option to skip the initial backup when promoting a read-only replica. Skipping the initial backup means that your replica becomes available more quickly, but there is no immediate backup available. Gen2: Accepted but ignored (Classic-only feature for read replica promotion).
    status String
    (String) The status of the instance.
    tags List<String>
    timeouts Property Map
    users List<Property Map>
    Database users. Gen2: Plan fails if set. Use the ibm.ResourceKey resource to create service credentials for Gen2 instances.
    version String
    (String) The database version.
    versionUpgradeSkipBackup Boolean
    Option to skip the backup when upgrading version. Only applicable to databases that do not support PITR. Skipping the backup means that your deployment becomes available more quickly, but there is no immediate backup available. This is not recommended as it could result in data loss. Gen2: Accepted but ignored (Classic-only feature for version upgrades).

    Supporting Types

    DatabaseAllowlist, DatabaseAllowlistArgs

    Address string
    Allowlist IP address in CIDR notation
    Description string
    Unique allow list description
    Address string
    Allowlist IP address in CIDR notation
    Description string
    Unique allow list description
    address string
    Allowlist IP address in CIDR notation
    description string
    Unique allow list description
    address String
    Allowlist IP address in CIDR notation
    description String
    Unique allow list description
    address string
    Allowlist IP address in CIDR notation
    description string
    Unique allow list description
    address str
    Allowlist IP address in CIDR notation
    description str
    Unique allow list description
    address String
    Allowlist IP address in CIDR notation
    description String
    Unique allow list description

    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 object
    CPU Auto Scaling

    Deprecated: Deprecated

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

    • Nested scheme for disk:
    memory object
    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
    rate_increase_percent number
    Auto Scaling Rate: Increase Percent
    rate_limit_count_per_member number
    Auto Scaling Rate: Limit count per number
    rate_period_seconds number
    Auto Scaling Rate: Period Seconds
    rate_units 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.
    capacity_enabled bool
    Auto scaling scalar enables or disables the scalar capacity.
    free_space_less_than_percent number
    Auto scaling scalar capacity free space less than percent.
    io_above_percent number
    Auto scaling scalar I/O utilization above percent.
    io_enabled bool
    Auto scaling scalar I/O utilization enabled.`
    io_over_period string
    Auto scaling scalar I/O utilization over period.
    rate_increase_percent number
    Auto scaling rate increase percent.
    rate_limit_mb_per_member number
    Auto scaling rate limit in megabytes per member.
    rate_period_seconds number
    Auto scaling rate period in seconds.
    rate_units 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.
    io_above_percent number
    Auto scaling scalar I/O utilization above percent.
    io_enabled bool
    Bool-Optional-Auto scaling scalar I/O utilization enabled.
    io_over_period string
    Auto scaling scalar I/O utilization over period.
    rate_increase_percent number
    Auto scaling rate in increase percent.
    rate_limit_mb_per_member number
    Auto scaling rate limit in megabytes per member.
    rate_period_seconds number
    Auto scaling rate period in seconds.
    rate_units 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 number
    cpus list(object)
    • Nested scheme for cpu:
    disks list(object)
    group_id 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.
    host_flavors list(object)
    • Nested scheme for host_flavor:
    memories list(object)
    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
    HostingSize string
    Id string
    (String) The CRN of the database instance.
    Name string
    hosting_size string
    id string
    (String) The CRN of the database instance.
    name string
    hostingSize String
    id String
    (String) The CRN of the database instance.
    name String
    hostingSize string
    id string
    (String) The CRN of the database instance.
    name string
    hosting_size str
    id str
    (String) The CRN of the database instance.
    name str
    hostingSize String
    id String
    (String) The CRN of the database instance.
    name String

    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
    database_name string
    The name of the database on which you want to create the logical_replication_slot.
    name string
    The name of the logical_replication_slot.
    plugin_type string

    The plugin type that is used to create the logical_replication_slot. 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 string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    DatabaseUser, DatabaseUserArgs

    Name string
    User name
    Password string
    User password
    Role string
    User role. Only available for ops_manager user type and Redis 6.0 and above.
    Type string
    User type
    Name string
    User name
    Password string
    User password
    Role string
    User role. Only available for ops_manager user type and Redis 6.0 and above.
    Type string
    User type
    name string
    User name
    password string
    User password
    role string
    User role. Only available for ops_manager user type and Redis 6.0 and above.
    type string
    User type
    name String
    User name
    password String
    User password
    role String
    User role. Only available for ops_manager user type and Redis 6.0 and above.
    type String
    User type
    name string
    User name
    password string
    User password
    role string
    User role. Only available for ops_manager user type and Redis 6.0 and above.
    type string
    User type
    name str
    User name
    password str
    User password
    role str
    User role. Only available for ops_manager user type and Redis 6.0 and above.
    type str
    User type
    name String
    User name
    password String
    User password
    role String
    User role. Only available for ops_manager user type and Redis 6.0 and above.
    type String
    User type

    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. A Terraform refresh or apply fails if the database instance is not in the same region as configured in the provider or its alias.

    Both Classic and Gen2 instances can be imported using the same method. The plan type (Classic vs Gen2) is automatically detected from the instance’s service plan.

    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.

    For Classic instances: The import exports the admin userid but does not export any other 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 is needed to use the service, a new users block must be defined to create new users.

    For Gen2 instances: User management is not available via Terraform. Use the ibm_resource_key resource to create service credentials and obtain connection information for Gen2 instances.

    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.
    Viewing docs for ibm 2.2.0-beta1
    published on Monday, May 18, 2026 by ibm-cloud
      Try Pulumi Cloud free. Your team will thank you.