1. Packages
  2. Scaleway
  3. API Docs
  4. SdbDatabase
Scaleway v1.25.0 published on Saturday, Mar 22, 2025 by pulumiverse

scaleway.SdbDatabase

Explore with Pulumi AI

Deprecated: scaleway.index/sdbdatabase.SdbDatabase has been deprecated in favor of scaleway.databases/serverlessdatabase.ServerlessDatabase

The scaleway.databases.ServerlessDatabase resource allows you to create and manage databases for Scaleway Serverless SQL Databases.

Refer to the Serverless SQL Databases documentation and API documentation for more information.

Example Usage

Basic

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const database = new scaleway.databases.ServerlessDatabase("database", {
    name: "my-database",
    minCpu: 0,
    maxCpu: 8,
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

database = scaleway.databases.ServerlessDatabase("database",
    name="my-database",
    min_cpu=0,
    max_cpu=8)
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/databases"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := databases.NewServerlessDatabase(ctx, "database", &databases.ServerlessDatabaseArgs{
			Name:   pulumi.String("my-database"),
			MinCpu: pulumi.Int(0),
			MaxCpu: pulumi.Int(8),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var database = new Scaleway.Databases.ServerlessDatabase("database", new()
    {
        Name = "my-database",
        MinCpu = 0,
        MaxCpu = 8,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.databases.ServerlessDatabase;
import com.pulumi.scaleway.databases.ServerlessDatabaseArgs;
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 database = new ServerlessDatabase("database", ServerlessDatabaseArgs.builder()
            .name("my-database")
            .minCpu(0)
            .maxCpu(8)
            .build());

    }
}
Copy
resources:
  database:
    type: scaleway:databases:ServerlessDatabase
    properties:
      name: my-database
      minCpu: 0
      maxCpu: 8
Copy

Create SdbDatabase Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new SdbDatabase(name: string, args?: SdbDatabaseArgs, opts?: CustomResourceOptions);
@overload
def SdbDatabase(resource_name: str,
                args: Optional[SdbDatabaseArgs] = None,
                opts: Optional[ResourceOptions] = None)

@overload
def SdbDatabase(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                max_cpu: Optional[int] = None,
                min_cpu: Optional[int] = None,
                name: Optional[str] = None,
                project_id: Optional[str] = None,
                region: Optional[str] = None)
func NewSdbDatabase(ctx *Context, name string, args *SdbDatabaseArgs, opts ...ResourceOption) (*SdbDatabase, error)
public SdbDatabase(string name, SdbDatabaseArgs? args = null, CustomResourceOptions? opts = null)
public SdbDatabase(String name, SdbDatabaseArgs args)
public SdbDatabase(String name, SdbDatabaseArgs args, CustomResourceOptions options)
type: scaleway:SdbDatabase
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args SdbDatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args SdbDatabaseArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args SdbDatabaseArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args SdbDatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SdbDatabaseArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

SdbDatabase 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 SdbDatabase resource accepts the following input properties:

MaxCpu int
The maximum number of CPU units for your database. Defaults to 15.
MinCpu int
The minimum number of CPU units for your database. Defaults to 0.
Name Changes to this property will trigger replacement. string

The name of the database (e.g. my-new-database).

Important: Updates to the name argument will recreate the database.

ProjectId Changes to this property will trigger replacement. string
The project_id you want to attach the resource to
Region Changes to this property will trigger replacement. string
region) The region in which the resource exists.
MaxCpu int
The maximum number of CPU units for your database. Defaults to 15.
MinCpu int
The minimum number of CPU units for your database. Defaults to 0.
Name Changes to this property will trigger replacement. string

The name of the database (e.g. my-new-database).

Important: Updates to the name argument will recreate the database.

ProjectId Changes to this property will trigger replacement. string
The project_id you want to attach the resource to
Region Changes to this property will trigger replacement. string
region) The region in which the resource exists.
maxCpu Integer
The maximum number of CPU units for your database. Defaults to 15.
minCpu Integer
The minimum number of CPU units for your database. Defaults to 0.
name Changes to this property will trigger replacement. String

The name of the database (e.g. my-new-database).

Important: Updates to the name argument will recreate the database.

projectId Changes to this property will trigger replacement. String
The project_id you want to attach the resource to
region Changes to this property will trigger replacement. String
region) The region in which the resource exists.
maxCpu number
The maximum number of CPU units for your database. Defaults to 15.
minCpu number
The minimum number of CPU units for your database. Defaults to 0.
name Changes to this property will trigger replacement. string

The name of the database (e.g. my-new-database).

Important: Updates to the name argument will recreate the database.

projectId Changes to this property will trigger replacement. string
The project_id you want to attach the resource to
region Changes to this property will trigger replacement. string
region) The region in which the resource exists.
max_cpu int
The maximum number of CPU units for your database. Defaults to 15.
min_cpu int
The minimum number of CPU units for your database. Defaults to 0.
name Changes to this property will trigger replacement. str

The name of the database (e.g. my-new-database).

Important: Updates to the name argument will recreate the database.

project_id Changes to this property will trigger replacement. str
The project_id you want to attach the resource to
region Changes to this property will trigger replacement. str
region) The region in which the resource exists.
maxCpu Number
The maximum number of CPU units for your database. Defaults to 15.
minCpu Number
The minimum number of CPU units for your database. Defaults to 0.
name Changes to this property will trigger replacement. String

The name of the database (e.g. my-new-database).

Important: Updates to the name argument will recreate the database.

projectId Changes to this property will trigger replacement. String
The project_id you want to attach the resource to
region Changes to this property will trigger replacement. String
region) The region in which the resource exists.

Outputs

All input properties are implicitly available as output properties. Additionally, the SdbDatabase resource produces the following output properties:

Endpoint string
The endpoint of the database.
Id string
The provider-assigned unique ID for this managed resource.
Endpoint string
The endpoint of the database.
Id string
The provider-assigned unique ID for this managed resource.
endpoint String
The endpoint of the database.
id String
The provider-assigned unique ID for this managed resource.
endpoint string
The endpoint of the database.
id string
The provider-assigned unique ID for this managed resource.
endpoint str
The endpoint of the database.
id str
The provider-assigned unique ID for this managed resource.
endpoint String
The endpoint of the database.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing SdbDatabase Resource

Get an existing SdbDatabase 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?: SdbDatabaseState, opts?: CustomResourceOptions): SdbDatabase
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        endpoint: Optional[str] = None,
        max_cpu: Optional[int] = None,
        min_cpu: Optional[int] = None,
        name: Optional[str] = None,
        project_id: Optional[str] = None,
        region: Optional[str] = None) -> SdbDatabase
func GetSdbDatabase(ctx *Context, name string, id IDInput, state *SdbDatabaseState, opts ...ResourceOption) (*SdbDatabase, error)
public static SdbDatabase Get(string name, Input<string> id, SdbDatabaseState? state, CustomResourceOptions? opts = null)
public static SdbDatabase get(String name, Output<String> id, SdbDatabaseState state, CustomResourceOptions options)
resources:  _:    type: scaleway:SdbDatabase    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Endpoint string
The endpoint of the database.
MaxCpu int
The maximum number of CPU units for your database. Defaults to 15.
MinCpu int
The minimum number of CPU units for your database. Defaults to 0.
Name Changes to this property will trigger replacement. string

The name of the database (e.g. my-new-database).

Important: Updates to the name argument will recreate the database.

ProjectId Changes to this property will trigger replacement. string
The project_id you want to attach the resource to
Region Changes to this property will trigger replacement. string
region) The region in which the resource exists.
Endpoint string
The endpoint of the database.
MaxCpu int
The maximum number of CPU units for your database. Defaults to 15.
MinCpu int
The minimum number of CPU units for your database. Defaults to 0.
Name Changes to this property will trigger replacement. string

The name of the database (e.g. my-new-database).

Important: Updates to the name argument will recreate the database.

ProjectId Changes to this property will trigger replacement. string
The project_id you want to attach the resource to
Region Changes to this property will trigger replacement. string
region) The region in which the resource exists.
endpoint String
The endpoint of the database.
maxCpu Integer
The maximum number of CPU units for your database. Defaults to 15.
minCpu Integer
The minimum number of CPU units for your database. Defaults to 0.
name Changes to this property will trigger replacement. String

The name of the database (e.g. my-new-database).

Important: Updates to the name argument will recreate the database.

projectId Changes to this property will trigger replacement. String
The project_id you want to attach the resource to
region Changes to this property will trigger replacement. String
region) The region in which the resource exists.
endpoint string
The endpoint of the database.
maxCpu number
The maximum number of CPU units for your database. Defaults to 15.
minCpu number
The minimum number of CPU units for your database. Defaults to 0.
name Changes to this property will trigger replacement. string

The name of the database (e.g. my-new-database).

Important: Updates to the name argument will recreate the database.

projectId Changes to this property will trigger replacement. string
The project_id you want to attach the resource to
region Changes to this property will trigger replacement. string
region) The region in which the resource exists.
endpoint str
The endpoint of the database.
max_cpu int
The maximum number of CPU units for your database. Defaults to 15.
min_cpu int
The minimum number of CPU units for your database. Defaults to 0.
name Changes to this property will trigger replacement. str

The name of the database (e.g. my-new-database).

Important: Updates to the name argument will recreate the database.

project_id Changes to this property will trigger replacement. str
The project_id you want to attach the resource to
region Changes to this property will trigger replacement. str
region) The region in which the resource exists.
endpoint String
The endpoint of the database.
maxCpu Number
The maximum number of CPU units for your database. Defaults to 15.
minCpu Number
The minimum number of CPU units for your database. Defaults to 0.
name Changes to this property will trigger replacement. String

The name of the database (e.g. my-new-database).

Important: Updates to the name argument will recreate the database.

projectId Changes to this property will trigger replacement. String
The project_id you want to attach the resource to
region Changes to this property will trigger replacement. String
region) The region in which the resource exists.

Import

Serverless SQL Databases can be imported using the {region}/{id}, as shown below:

bash

$ pulumi import scaleway:index/sdbDatabase:SdbDatabase database fr-par/11111111-1111-1111-1111-111111111111
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.