1. Packages
  2. Scaleway
  3. API Docs
  4. DatabaseInstance
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.DatabaseInstance

Explore with Pulumi AI

Deprecated: scaleway.index/databaseinstance.DatabaseInstance has been deprecated in favor of scaleway.databases/instance.Instance

Creates and manages Scaleway Database Instances. For more information, see refer to the API documentation.

Example Usage

Example Basic

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

const main = new scaleway.databases.Instance("main", {
    name: "test-rdb",
    nodeType: "DB-DEV-S",
    engine: "PostgreSQL-15",
    isHaCluster: true,
    disableBackup: true,
    userName: "my_initial_user",
    password: "thiZ_is_v&ry_s3cret",
    encryptionAtRest: true,
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main = scaleway.databases.Instance("main",
    name="test-rdb",
    node_type="DB-DEV-S",
    engine="PostgreSQL-15",
    is_ha_cluster=True,
    disable_backup=True,
    user_name="my_initial_user",
    password="thiZ_is_v&ry_s3cret",
    encryption_at_rest=True)
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.NewInstance(ctx, "main", &databases.InstanceArgs{
			Name:             pulumi.String("test-rdb"),
			NodeType:         pulumi.String("DB-DEV-S"),
			Engine:           pulumi.String("PostgreSQL-15"),
			IsHaCluster:      pulumi.Bool(true),
			DisableBackup:    pulumi.Bool(true),
			UserName:         pulumi.String("my_initial_user"),
			Password:         pulumi.String("thiZ_is_v&ry_s3cret"),
			EncryptionAtRest: pulumi.Bool(true),
		})
		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 main = new Scaleway.Databases.Instance("main", new()
    {
        Name = "test-rdb",
        NodeType = "DB-DEV-S",
        Engine = "PostgreSQL-15",
        IsHaCluster = true,
        DisableBackup = true,
        UserName = "my_initial_user",
        Password = "thiZ_is_v&ry_s3cret",
        EncryptionAtRest = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.databases.Instance;
import com.pulumi.scaleway.databases.InstanceArgs;
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 main = new Instance("main", InstanceArgs.builder()
            .name("test-rdb")
            .nodeType("DB-DEV-S")
            .engine("PostgreSQL-15")
            .isHaCluster(true)
            .disableBackup(true)
            .userName("my_initial_user")
            .password("thiZ_is_v&ry_s3cret")
            .encryptionAtRest(true)
            .build());

    }
}
Copy
resources:
  main:
    type: scaleway:databases:Instance
    properties:
      name: test-rdb
      nodeType: DB-DEV-S
      engine: PostgreSQL-15
      isHaCluster: true
      disableBackup: true
      userName: my_initial_user
      password: thiZ_is_v&ry_s3cret
      encryptionAtRest: true
Copy

Example Block Storage Low Latency

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

const main = new scaleway.databases.Instance("main", {
    name: "test-rdb-sbs",
    nodeType: "db-play2-pico",
    engine: "PostgreSQL-15",
    isHaCluster: true,
    disableBackup: true,
    userName: "my_initial_user",
    password: "thiZ_is_v&ry_s3cret",
    volumeType: "sbs_15k",
    volumeSizeInGb: 10,
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main = scaleway.databases.Instance("main",
    name="test-rdb-sbs",
    node_type="db-play2-pico",
    engine="PostgreSQL-15",
    is_ha_cluster=True,
    disable_backup=True,
    user_name="my_initial_user",
    password="thiZ_is_v&ry_s3cret",
    volume_type="sbs_15k",
    volume_size_in_gb=10)
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.NewInstance(ctx, "main", &databases.InstanceArgs{
			Name:           pulumi.String("test-rdb-sbs"),
			NodeType:       pulumi.String("db-play2-pico"),
			Engine:         pulumi.String("PostgreSQL-15"),
			IsHaCluster:    pulumi.Bool(true),
			DisableBackup:  pulumi.Bool(true),
			UserName:       pulumi.String("my_initial_user"),
			Password:       pulumi.String("thiZ_is_v&ry_s3cret"),
			VolumeType:     pulumi.String("sbs_15k"),
			VolumeSizeInGb: pulumi.Int(10),
		})
		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 main = new Scaleway.Databases.Instance("main", new()
    {
        Name = "test-rdb-sbs",
        NodeType = "db-play2-pico",
        Engine = "PostgreSQL-15",
        IsHaCluster = true,
        DisableBackup = true,
        UserName = "my_initial_user",
        Password = "thiZ_is_v&ry_s3cret",
        VolumeType = "sbs_15k",
        VolumeSizeInGb = 10,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.databases.Instance;
import com.pulumi.scaleway.databases.InstanceArgs;
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 main = new Instance("main", InstanceArgs.builder()
            .name("test-rdb-sbs")
            .nodeType("db-play2-pico")
            .engine("PostgreSQL-15")
            .isHaCluster(true)
            .disableBackup(true)
            .userName("my_initial_user")
            .password("thiZ_is_v&ry_s3cret")
            .volumeType("sbs_15k")
            .volumeSizeInGb(10)
            .build());

    }
}
Copy
resources:
  main:
    type: scaleway:databases:Instance
    properties:
      name: test-rdb-sbs
      nodeType: db-play2-pico
      engine: PostgreSQL-15
      isHaCluster: true
      disableBackup: true
      userName: my_initial_user
      password: thiZ_is_v&ry_s3cret
      volumeType: sbs_15k
      volumeSizeInGb: 10
Copy

Example with Settings

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

const main = new scaleway.databases.Instance("main", {
    name: "test-rdb",
    nodeType: "db-dev-s",
    disableBackup: true,
    engine: "MySQL-8",
    userName: "my_initial_user",
    password: "thiZ_is_v&ry_s3cret",
    initSettings: {
        lower_case_table_names: "1",
    },
    settings: {
        max_connections: "350",
    },
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main = scaleway.databases.Instance("main",
    name="test-rdb",
    node_type="db-dev-s",
    disable_backup=True,
    engine="MySQL-8",
    user_name="my_initial_user",
    password="thiZ_is_v&ry_s3cret",
    init_settings={
        "lower_case_table_names": "1",
    },
    settings={
        "max_connections": "350",
    })
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.NewInstance(ctx, "main", &databases.InstanceArgs{
			Name:          pulumi.String("test-rdb"),
			NodeType:      pulumi.String("db-dev-s"),
			DisableBackup: pulumi.Bool(true),
			Engine:        pulumi.String("MySQL-8"),
			UserName:      pulumi.String("my_initial_user"),
			Password:      pulumi.String("thiZ_is_v&ry_s3cret"),
			InitSettings: pulumi.StringMap{
				"lower_case_table_names": pulumi.String("1"),
			},
			Settings: pulumi.StringMap{
				"max_connections": pulumi.String("350"),
			},
		})
		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 main = new Scaleway.Databases.Instance("main", new()
    {
        Name = "test-rdb",
        NodeType = "db-dev-s",
        DisableBackup = true,
        Engine = "MySQL-8",
        UserName = "my_initial_user",
        Password = "thiZ_is_v&ry_s3cret",
        InitSettings = 
        {
            { "lower_case_table_names", "1" },
        },
        Settings = 
        {
            { "max_connections", "350" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.databases.Instance;
import com.pulumi.scaleway.databases.InstanceArgs;
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 main = new Instance("main", InstanceArgs.builder()
            .name("test-rdb")
            .nodeType("db-dev-s")
            .disableBackup(true)
            .engine("MySQL-8")
            .userName("my_initial_user")
            .password("thiZ_is_v&ry_s3cret")
            .initSettings(Map.of("lower_case_table_names", 1))
            .settings(Map.of("max_connections", "350"))
            .build());

    }
}
Copy
resources:
  main:
    type: scaleway:databases:Instance
    properties:
      name: test-rdb
      nodeType: db-dev-s
      disableBackup: true
      engine: MySQL-8
      userName: my_initial_user
      password: thiZ_is_v&ry_s3cret
      initSettings:
        lower_case_table_names: 1
      settings:
        max_connections: '350'
Copy

Example with backup schedule

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

const main = new scaleway.databases.Instance("main", {
    name: "test-rdb",
    nodeType: "DB-DEV-S",
    engine: "PostgreSQL-15",
    isHaCluster: true,
    userName: "my_initial_user",
    password: "thiZ_is_v&ry_s3cret",
    disableBackup: false,
    backupScheduleFrequency: 24,
    backupScheduleRetention: 7,
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main = scaleway.databases.Instance("main",
    name="test-rdb",
    node_type="DB-DEV-S",
    engine="PostgreSQL-15",
    is_ha_cluster=True,
    user_name="my_initial_user",
    password="thiZ_is_v&ry_s3cret",
    disable_backup=False,
    backup_schedule_frequency=24,
    backup_schedule_retention=7)
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.NewInstance(ctx, "main", &databases.InstanceArgs{
			Name:                    pulumi.String("test-rdb"),
			NodeType:                pulumi.String("DB-DEV-S"),
			Engine:                  pulumi.String("PostgreSQL-15"),
			IsHaCluster:             pulumi.Bool(true),
			UserName:                pulumi.String("my_initial_user"),
			Password:                pulumi.String("thiZ_is_v&ry_s3cret"),
			DisableBackup:           pulumi.Bool(false),
			BackupScheduleFrequency: pulumi.Int(24),
			BackupScheduleRetention: pulumi.Int(7),
		})
		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 main = new Scaleway.Databases.Instance("main", new()
    {
        Name = "test-rdb",
        NodeType = "DB-DEV-S",
        Engine = "PostgreSQL-15",
        IsHaCluster = true,
        UserName = "my_initial_user",
        Password = "thiZ_is_v&ry_s3cret",
        DisableBackup = false,
        BackupScheduleFrequency = 24,
        BackupScheduleRetention = 7,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.databases.Instance;
import com.pulumi.scaleway.databases.InstanceArgs;
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 main = new Instance("main", InstanceArgs.builder()
            .name("test-rdb")
            .nodeType("DB-DEV-S")
            .engine("PostgreSQL-15")
            .isHaCluster(true)
            .userName("my_initial_user")
            .password("thiZ_is_v&ry_s3cret")
            .disableBackup(false)
            .backupScheduleFrequency(24)
            .backupScheduleRetention(7)
            .build());

    }
}
Copy
resources:
  main:
    type: scaleway:databases:Instance
    properties:
      name: test-rdb
      nodeType: DB-DEV-S
      engine: PostgreSQL-15
      isHaCluster: true
      userName: my_initial_user
      password: thiZ_is_v&ry_s3cret
      disableBackup: false
      backupScheduleFrequency: 24 # every day
      backupScheduleRetention: 7 # keep it one week
Copy

Examples of endpoint configuration

Database Instances can have a maximum of 1 public endpoint and 1 private endpoint. They can have both, or none.

1 static Private Network endpoint

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

const pn = new scaleway.network.PrivateNetwork("pn", {ipv4Subnet: {
    subnet: "172.16.20.0/22",
}});
const main = new scaleway.databases.Instance("main", {
    nodeType: "db-dev-s",
    engine: "PostgreSQL-15",
    privateNetwork: {
        pnId: pn.id,
        ipNet: "172.16.20.4/22",
    },
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

pn = scaleway.network.PrivateNetwork("pn", ipv4_subnet={
    "subnet": "172.16.20.0/22",
})
main = scaleway.databases.Instance("main",
    node_type="db-dev-s",
    engine="PostgreSQL-15",
    private_network={
        "pn_id": pn.id,
        "ip_net": "172.16.20.4/22",
    })
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		pn, err := network.NewPrivateNetwork(ctx, "pn", &network.PrivateNetworkArgs{
			Ipv4Subnet: &network.PrivateNetworkIpv4SubnetArgs{
				Subnet: pulumi.String("172.16.20.0/22"),
			},
		})
		if err != nil {
			return err
		}
		_, err = databases.NewInstance(ctx, "main", &databases.InstanceArgs{
			NodeType: pulumi.String("db-dev-s"),
			Engine:   pulumi.String("PostgreSQL-15"),
			PrivateNetwork: &databases.InstancePrivateNetworkArgs{
				PnId:  pn.ID(),
				IpNet: pulumi.String("172.16.20.4/22"),
			},
		})
		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 pn = new Scaleway.Network.PrivateNetwork("pn", new()
    {
        Ipv4Subnet = new Scaleway.Network.Inputs.PrivateNetworkIpv4SubnetArgs
        {
            Subnet = "172.16.20.0/22",
        },
    });

    var main = new Scaleway.Databases.Instance("main", new()
    {
        NodeType = "db-dev-s",
        Engine = "PostgreSQL-15",
        PrivateNetwork = new Scaleway.Databases.Inputs.InstancePrivateNetworkArgs
        {
            PnId = pn.Id,
            IpNet = "172.16.20.4/22",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.network.PrivateNetwork;
import com.pulumi.scaleway.network.PrivateNetworkArgs;
import com.pulumi.scaleway.network.inputs.PrivateNetworkIpv4SubnetArgs;
import com.pulumi.scaleway.databases.Instance;
import com.pulumi.scaleway.databases.InstanceArgs;
import com.pulumi.scaleway.databases.inputs.InstancePrivateNetworkArgs;
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 pn = new PrivateNetwork("pn", PrivateNetworkArgs.builder()
            .ipv4Subnet(PrivateNetworkIpv4SubnetArgs.builder()
                .subnet("172.16.20.0/22")
                .build())
            .build());

        var main = new Instance("main", InstanceArgs.builder()
            .nodeType("db-dev-s")
            .engine("PostgreSQL-15")
            .privateNetwork(InstancePrivateNetworkArgs.builder()
                .pnId(pn.id())
                .ipNet("172.16.20.4/22")
                .build())
            .build());

    }
}
Copy
resources:
  pn:
    type: scaleway:network:PrivateNetwork
    properties:
      ipv4Subnet:
        subnet: 172.16.20.0/22
  main:
    type: scaleway:databases:Instance
    properties:
      nodeType: db-dev-s
      engine: PostgreSQL-15
      privateNetwork:
        pnId: ${pn.id}
        ipNet: 172.16.20.4/22
Copy

1 IPAM Private Network endpoint + 1 public endpoint

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

const pn = new scaleway.network.PrivateNetwork("pn", {});
const main = new scaleway.databases.Instance("main", {
    loadBalancers: [{}],
    nodeType: "DB-DEV-S",
    engine: "PostgreSQL-15",
    privateNetwork: {
        pnId: pn.id,
        enableIpam: true,
    },
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

pn = scaleway.network.PrivateNetwork("pn")
main = scaleway.databases.Instance("main",
    load_balancers=[{}],
    node_type="DB-DEV-S",
    engine="PostgreSQL-15",
    private_network={
        "pn_id": pn.id,
        "enable_ipam": True,
    })
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		pn, err := network.NewPrivateNetwork(ctx, "pn", nil)
		if err != nil {
			return err
		}
		_, err = databases.NewInstance(ctx, "main", &databases.InstanceArgs{
			LoadBalancers: databases.InstanceLoadBalancerArray{
				&databases.InstanceLoadBalancerArgs{},
			},
			NodeType: pulumi.String("DB-DEV-S"),
			Engine:   pulumi.String("PostgreSQL-15"),
			PrivateNetwork: &databases.InstancePrivateNetworkArgs{
				PnId:       pn.ID(),
				EnableIpam: pulumi.Bool(true),
			},
		})
		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 pn = new Scaleway.Network.PrivateNetwork("pn");

    var main = new Scaleway.Databases.Instance("main", new()
    {
        LoadBalancers = new[]
        {
            null,
        },
        NodeType = "DB-DEV-S",
        Engine = "PostgreSQL-15",
        PrivateNetwork = new Scaleway.Databases.Inputs.InstancePrivateNetworkArgs
        {
            PnId = pn.Id,
            EnableIpam = true,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.network.PrivateNetwork;
import com.pulumi.scaleway.databases.Instance;
import com.pulumi.scaleway.databases.InstanceArgs;
import com.pulumi.scaleway.databases.inputs.InstanceLoadBalancerArgs;
import com.pulumi.scaleway.databases.inputs.InstancePrivateNetworkArgs;
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 pn = new PrivateNetwork("pn");

        var main = new Instance("main", InstanceArgs.builder()
            .loadBalancers()
            .nodeType("DB-DEV-S")
            .engine("PostgreSQL-15")
            .privateNetwork(InstancePrivateNetworkArgs.builder()
                .pnId(pn.id())
                .enableIpam(true)
                .build())
            .build());

    }
}
Copy
resources:
  pn:
    type: scaleway:network:PrivateNetwork
  main:
    type: scaleway:databases:Instance
    properties:
      loadBalancers:
        - {}
      nodeType: DB-DEV-S
      engine: PostgreSQL-15
      privateNetwork:
        pnId: ${pn.id}
        enableIpam: true
Copy

Default: 1 public endpoint

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

const main = new scaleway.databases.Instance("main", {
    nodeType: "db-dev-s",
    engine: "PostgreSQL-15",
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

main = scaleway.databases.Instance("main",
    node_type="db-dev-s",
    engine="PostgreSQL-15")
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.NewInstance(ctx, "main", &databases.InstanceArgs{
			NodeType: pulumi.String("db-dev-s"),
			Engine:   pulumi.String("PostgreSQL-15"),
		})
		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 main = new Scaleway.Databases.Instance("main", new()
    {
        NodeType = "db-dev-s",
        Engine = "PostgreSQL-15",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.databases.Instance;
import com.pulumi.scaleway.databases.InstanceArgs;
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 main = new Instance("main", InstanceArgs.builder()
            .nodeType("db-dev-s")
            .engine("PostgreSQL-15")
            .build());

    }
}
Copy
resources:
  main:
    type: scaleway:databases:Instance
    properties:
      nodeType: db-dev-s
      engine: PostgreSQL-15
Copy

Note If nothing is defined, your Database Instance will have a default public load-balancer endpoint.

Limitations

The Managed Database product is only compliant with the Private Network in the default availability zone (AZ). i.e. fr-par-1, nl-ams-1, pl-waw-1. To learn more, read our section How to connect a PostgreSQL and MySQL Database Instance to a Private Network

Create DatabaseInstance Resource

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

Constructor syntax

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

@overload
def DatabaseInstance(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     backup_same_region: Optional[bool] = None,
                     backup_schedule_frequency: Optional[int] = None,
                     backup_schedule_retention: Optional[int] = None,
                     disable_backup: Optional[bool] = None,
                     encryption_at_rest: Optional[bool] = None,
                     engine: Optional[str] = None,
                     init_settings: Optional[Mapping[str, str]] = None,
                     is_ha_cluster: Optional[bool] = None,
                     load_balancers: Optional[Sequence[DatabaseInstanceLoadBalancerArgs]] = None,
                     logs_policy: Optional[DatabaseInstanceLogsPolicyArgs] = None,
                     name: Optional[str] = None,
                     node_type: Optional[str] = None,
                     password: Optional[str] = None,
                     private_network: Optional[DatabaseInstancePrivateNetworkArgs] = None,
                     project_id: Optional[str] = None,
                     region: Optional[str] = None,
                     settings: Optional[Mapping[str, str]] = None,
                     snapshot_id: Optional[str] = None,
                     tags: Optional[Sequence[str]] = None,
                     user_name: Optional[str] = None,
                     volume_size_in_gb: Optional[int] = None,
                     volume_type: Optional[str] = None)
func NewDatabaseInstance(ctx *Context, name string, args DatabaseInstanceArgs, opts ...ResourceOption) (*DatabaseInstance, error)
public DatabaseInstance(string name, DatabaseInstanceArgs args, CustomResourceOptions? opts = null)
public DatabaseInstance(String name, DatabaseInstanceArgs args)
public DatabaseInstance(String name, DatabaseInstanceArgs args, CustomResourceOptions options)
type: scaleway:DatabaseInstance
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 This property is required. DatabaseInstanceArgs
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 This property is required. DatabaseInstanceArgs
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 This property is required. DatabaseInstanceArgs
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 This property is required. DatabaseInstanceArgs
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. DatabaseInstanceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

NodeType This property is required. string

The type of Database Instance you want to create (e.g. db-dev-s).

Important Updates to node_type will upgrade the Database Instance to the desired node_type without any interruption.

Important Once your Database Instance reaches disk_full status, if you are using lssd storage, you should upgrade the node_type, and if you are using bssd storage, you should increase the volume size before making any other changes to your Database Instance.

BackupSameRegion bool
Boolean to store logical backups in the same region as the database instance
BackupScheduleFrequency int
Backup schedule frequency in hours
BackupScheduleRetention int
Backup schedule retention in days
DisableBackup bool
Disable automated backup for the database instance
EncryptionAtRest bool
Enable or disable encryption at rest for the Database Instance.
Engine Changes to this property will trigger replacement. string

Database Instance's engine version (e.g. PostgreSQL-11).

Important Updates to engine will recreate the Database Instance.

InitSettings Changes to this property will trigger replacement. Dictionary<string, string>
Map of engine settings to be set at database initialisation.
IsHaCluster bool

Enable or disable high availability for the Database Instance.

Important Updates to is_ha_cluster will recreate the Database Instance.

LoadBalancers List<Pulumiverse.Scaleway.Inputs.DatabaseInstanceLoadBalancer>
List of Load Balancer endpoints of the Database Instance.
LogsPolicy Pulumiverse.Scaleway.Inputs.DatabaseInstanceLogsPolicy
Logs policy configuration
Name string
The name of the Database Instance.
Password string
Password for the first user of the Database Instance.
PrivateNetwork Pulumiverse.Scaleway.Inputs.DatabaseInstancePrivateNetwork
List of Private Networks endpoints of the Database Instance.
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project the Database Instance is associated with.
Region Changes to this property will trigger replacement. string
region) The region in which the Database Instance should be created.
Settings Dictionary<string, string>
Map of engine settings to be set on a running instance.
SnapshotId Changes to this property will trigger replacement. string
ID of an existing snapshot to create a new instance from. This allows restoring a database instance to the state captured in the specified snapshot. Conflicts with the engine attribute.
Tags List<string>
The tags associated with the Database Instance.
UserName Changes to this property will trigger replacement. string

Identifier for the first user of the Database Instance.

Important Updates to user_name will recreate the Database Instance.

VolumeSizeInGb int

Volume size (in GB). Cannot be used when volume_type is set to lssd.

Important Once your Database Instance reaches disk_full status, you should increase the volume size before making any other change to your Database Instance.

VolumeType string
Type of volume where data are stored (bssd, lssd, sbs_5k or sbs_15k).
NodeType This property is required. string

The type of Database Instance you want to create (e.g. db-dev-s).

Important Updates to node_type will upgrade the Database Instance to the desired node_type without any interruption.

Important Once your Database Instance reaches disk_full status, if you are using lssd storage, you should upgrade the node_type, and if you are using bssd storage, you should increase the volume size before making any other changes to your Database Instance.

BackupSameRegion bool
Boolean to store logical backups in the same region as the database instance
BackupScheduleFrequency int
Backup schedule frequency in hours
BackupScheduleRetention int
Backup schedule retention in days
DisableBackup bool
Disable automated backup for the database instance
EncryptionAtRest bool
Enable or disable encryption at rest for the Database Instance.
Engine Changes to this property will trigger replacement. string

Database Instance's engine version (e.g. PostgreSQL-11).

Important Updates to engine will recreate the Database Instance.

InitSettings Changes to this property will trigger replacement. map[string]string
Map of engine settings to be set at database initialisation.
IsHaCluster bool

Enable or disable high availability for the Database Instance.

Important Updates to is_ha_cluster will recreate the Database Instance.

LoadBalancers []DatabaseInstanceLoadBalancerArgs
List of Load Balancer endpoints of the Database Instance.
LogsPolicy DatabaseInstanceLogsPolicyArgs
Logs policy configuration
Name string
The name of the Database Instance.
Password string
Password for the first user of the Database Instance.
PrivateNetwork DatabaseInstancePrivateNetworkArgs
List of Private Networks endpoints of the Database Instance.
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project the Database Instance is associated with.
Region Changes to this property will trigger replacement. string
region) The region in which the Database Instance should be created.
Settings map[string]string
Map of engine settings to be set on a running instance.
SnapshotId Changes to this property will trigger replacement. string
ID of an existing snapshot to create a new instance from. This allows restoring a database instance to the state captured in the specified snapshot. Conflicts with the engine attribute.
Tags []string
The tags associated with the Database Instance.
UserName Changes to this property will trigger replacement. string

Identifier for the first user of the Database Instance.

Important Updates to user_name will recreate the Database Instance.

VolumeSizeInGb int

Volume size (in GB). Cannot be used when volume_type is set to lssd.

Important Once your Database Instance reaches disk_full status, you should increase the volume size before making any other change to your Database Instance.

VolumeType string
Type of volume where data are stored (bssd, lssd, sbs_5k or sbs_15k).
nodeType This property is required. String

The type of Database Instance you want to create (e.g. db-dev-s).

Important Updates to node_type will upgrade the Database Instance to the desired node_type without any interruption.

Important Once your Database Instance reaches disk_full status, if you are using lssd storage, you should upgrade the node_type, and if you are using bssd storage, you should increase the volume size before making any other changes to your Database Instance.

backupSameRegion Boolean
Boolean to store logical backups in the same region as the database instance
backupScheduleFrequency Integer
Backup schedule frequency in hours
backupScheduleRetention Integer
Backup schedule retention in days
disableBackup Boolean
Disable automated backup for the database instance
encryptionAtRest Boolean
Enable or disable encryption at rest for the Database Instance.
engine Changes to this property will trigger replacement. String

Database Instance's engine version (e.g. PostgreSQL-11).

Important Updates to engine will recreate the Database Instance.

initSettings Changes to this property will trigger replacement. Map<String,String>
Map of engine settings to be set at database initialisation.
isHaCluster Boolean

Enable or disable high availability for the Database Instance.

Important Updates to is_ha_cluster will recreate the Database Instance.

loadBalancers List<DatabaseInstanceLoadBalancer>
List of Load Balancer endpoints of the Database Instance.
logsPolicy DatabaseInstanceLogsPolicy
Logs policy configuration
name String
The name of the Database Instance.
password String
Password for the first user of the Database Instance.
privateNetwork DatabaseInstancePrivateNetwork
List of Private Networks endpoints of the Database Instance.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project the Database Instance is associated with.
region Changes to this property will trigger replacement. String
region) The region in which the Database Instance should be created.
settings Map<String,String>
Map of engine settings to be set on a running instance.
snapshotId Changes to this property will trigger replacement. String
ID of an existing snapshot to create a new instance from. This allows restoring a database instance to the state captured in the specified snapshot. Conflicts with the engine attribute.
tags List<String>
The tags associated with the Database Instance.
userName Changes to this property will trigger replacement. String

Identifier for the first user of the Database Instance.

Important Updates to user_name will recreate the Database Instance.

volumeSizeInGb Integer

Volume size (in GB). Cannot be used when volume_type is set to lssd.

Important Once your Database Instance reaches disk_full status, you should increase the volume size before making any other change to your Database Instance.

volumeType String
Type of volume where data are stored (bssd, lssd, sbs_5k or sbs_15k).
nodeType This property is required. string

The type of Database Instance you want to create (e.g. db-dev-s).

Important Updates to node_type will upgrade the Database Instance to the desired node_type without any interruption.

Important Once your Database Instance reaches disk_full status, if you are using lssd storage, you should upgrade the node_type, and if you are using bssd storage, you should increase the volume size before making any other changes to your Database Instance.

backupSameRegion boolean
Boolean to store logical backups in the same region as the database instance
backupScheduleFrequency number
Backup schedule frequency in hours
backupScheduleRetention number
Backup schedule retention in days
disableBackup boolean
Disable automated backup for the database instance
encryptionAtRest boolean
Enable or disable encryption at rest for the Database Instance.
engine Changes to this property will trigger replacement. string

Database Instance's engine version (e.g. PostgreSQL-11).

Important Updates to engine will recreate the Database Instance.

initSettings Changes to this property will trigger replacement. {[key: string]: string}
Map of engine settings to be set at database initialisation.
isHaCluster boolean

Enable or disable high availability for the Database Instance.

Important Updates to is_ha_cluster will recreate the Database Instance.

loadBalancers DatabaseInstanceLoadBalancer[]
List of Load Balancer endpoints of the Database Instance.
logsPolicy DatabaseInstanceLogsPolicy
Logs policy configuration
name string
The name of the Database Instance.
password string
Password for the first user of the Database Instance.
privateNetwork DatabaseInstancePrivateNetwork
List of Private Networks endpoints of the Database Instance.
projectId Changes to this property will trigger replacement. string
project_id) The ID of the project the Database Instance is associated with.
region Changes to this property will trigger replacement. string
region) The region in which the Database Instance should be created.
settings {[key: string]: string}
Map of engine settings to be set on a running instance.
snapshotId Changes to this property will trigger replacement. string
ID of an existing snapshot to create a new instance from. This allows restoring a database instance to the state captured in the specified snapshot. Conflicts with the engine attribute.
tags string[]
The tags associated with the Database Instance.
userName Changes to this property will trigger replacement. string

Identifier for the first user of the Database Instance.

Important Updates to user_name will recreate the Database Instance.

volumeSizeInGb number

Volume size (in GB). Cannot be used when volume_type is set to lssd.

Important Once your Database Instance reaches disk_full status, you should increase the volume size before making any other change to your Database Instance.

volumeType string
Type of volume where data are stored (bssd, lssd, sbs_5k or sbs_15k).
node_type This property is required. str

The type of Database Instance you want to create (e.g. db-dev-s).

Important Updates to node_type will upgrade the Database Instance to the desired node_type without any interruption.

Important Once your Database Instance reaches disk_full status, if you are using lssd storage, you should upgrade the node_type, and if you are using bssd storage, you should increase the volume size before making any other changes to your Database Instance.

backup_same_region bool
Boolean to store logical backups in the same region as the database instance
backup_schedule_frequency int
Backup schedule frequency in hours
backup_schedule_retention int
Backup schedule retention in days
disable_backup bool
Disable automated backup for the database instance
encryption_at_rest bool
Enable or disable encryption at rest for the Database Instance.
engine Changes to this property will trigger replacement. str

Database Instance's engine version (e.g. PostgreSQL-11).

Important Updates to engine will recreate the Database Instance.

init_settings Changes to this property will trigger replacement. Mapping[str, str]
Map of engine settings to be set at database initialisation.
is_ha_cluster bool

Enable or disable high availability for the Database Instance.

Important Updates to is_ha_cluster will recreate the Database Instance.

load_balancers Sequence[DatabaseInstanceLoadBalancerArgs]
List of Load Balancer endpoints of the Database Instance.
logs_policy DatabaseInstanceLogsPolicyArgs
Logs policy configuration
name str
The name of the Database Instance.
password str
Password for the first user of the Database Instance.
private_network DatabaseInstancePrivateNetworkArgs
List of Private Networks endpoints of the Database Instance.
project_id Changes to this property will trigger replacement. str
project_id) The ID of the project the Database Instance is associated with.
region Changes to this property will trigger replacement. str
region) The region in which the Database Instance should be created.
settings Mapping[str, str]
Map of engine settings to be set on a running instance.
snapshot_id Changes to this property will trigger replacement. str
ID of an existing snapshot to create a new instance from. This allows restoring a database instance to the state captured in the specified snapshot. Conflicts with the engine attribute.
tags Sequence[str]
The tags associated with the Database Instance.
user_name Changes to this property will trigger replacement. str

Identifier for the first user of the Database Instance.

Important Updates to user_name will recreate the Database Instance.

volume_size_in_gb int

Volume size (in GB). Cannot be used when volume_type is set to lssd.

Important Once your Database Instance reaches disk_full status, you should increase the volume size before making any other change to your Database Instance.

volume_type str
Type of volume where data are stored (bssd, lssd, sbs_5k or sbs_15k).
nodeType This property is required. String

The type of Database Instance you want to create (e.g. db-dev-s).

Important Updates to node_type will upgrade the Database Instance to the desired node_type without any interruption.

Important Once your Database Instance reaches disk_full status, if you are using lssd storage, you should upgrade the node_type, and if you are using bssd storage, you should increase the volume size before making any other changes to your Database Instance.

backupSameRegion Boolean
Boolean to store logical backups in the same region as the database instance
backupScheduleFrequency Number
Backup schedule frequency in hours
backupScheduleRetention Number
Backup schedule retention in days
disableBackup Boolean
Disable automated backup for the database instance
encryptionAtRest Boolean
Enable or disable encryption at rest for the Database Instance.
engine Changes to this property will trigger replacement. String

Database Instance's engine version (e.g. PostgreSQL-11).

Important Updates to engine will recreate the Database Instance.

initSettings Changes to this property will trigger replacement. Map<String>
Map of engine settings to be set at database initialisation.
isHaCluster Boolean

Enable or disable high availability for the Database Instance.

Important Updates to is_ha_cluster will recreate the Database Instance.

loadBalancers List<Property Map>
List of Load Balancer endpoints of the Database Instance.
logsPolicy Property Map
Logs policy configuration
name String
The name of the Database Instance.
password String
Password for the first user of the Database Instance.
privateNetwork Property Map
List of Private Networks endpoints of the Database Instance.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project the Database Instance is associated with.
region Changes to this property will trigger replacement. String
region) The region in which the Database Instance should be created.
settings Map<String>
Map of engine settings to be set on a running instance.
snapshotId Changes to this property will trigger replacement. String
ID of an existing snapshot to create a new instance from. This allows restoring a database instance to the state captured in the specified snapshot. Conflicts with the engine attribute.
tags List<String>
The tags associated with the Database Instance.
userName Changes to this property will trigger replacement. String

Identifier for the first user of the Database Instance.

Important Updates to user_name will recreate the Database Instance.

volumeSizeInGb Number

Volume size (in GB). Cannot be used when volume_type is set to lssd.

Important Once your Database Instance reaches disk_full status, you should increase the volume size before making any other change to your Database Instance.

volumeType String
Type of volume where data are stored (bssd, lssd, sbs_5k or sbs_15k).

Outputs

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

Certificate string
Certificate of the Database Instance.
EndpointIp string
(Deprecated) The IP of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

EndpointPort int
(Deprecated) The port of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

Id string
The provider-assigned unique ID for this managed resource.
OrganizationId string
The organization ID the Database Instance is associated with.
ReadReplicas List<Pulumiverse.Scaleway.Outputs.DatabaseInstanceReadReplica>
List of read replicas of the Database Instance.
Certificate string
Certificate of the Database Instance.
EndpointIp string
(Deprecated) The IP of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

EndpointPort int
(Deprecated) The port of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

Id string
The provider-assigned unique ID for this managed resource.
OrganizationId string
The organization ID the Database Instance is associated with.
ReadReplicas []DatabaseInstanceReadReplica
List of read replicas of the Database Instance.
certificate String
Certificate of the Database Instance.
endpointIp String
(Deprecated) The IP of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

endpointPort Integer
(Deprecated) The port of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

id String
The provider-assigned unique ID for this managed resource.
organizationId String
The organization ID the Database Instance is associated with.
readReplicas List<DatabaseInstanceReadReplica>
List of read replicas of the Database Instance.
certificate string
Certificate of the Database Instance.
endpointIp string
(Deprecated) The IP of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

endpointPort number
(Deprecated) The port of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

id string
The provider-assigned unique ID for this managed resource.
organizationId string
The organization ID the Database Instance is associated with.
readReplicas DatabaseInstanceReadReplica[]
List of read replicas of the Database Instance.
certificate str
Certificate of the Database Instance.
endpoint_ip str
(Deprecated) The IP of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

endpoint_port int
(Deprecated) The port of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

id str
The provider-assigned unique ID for this managed resource.
organization_id str
The organization ID the Database Instance is associated with.
read_replicas Sequence[DatabaseInstanceReadReplica]
List of read replicas of the Database Instance.
certificate String
Certificate of the Database Instance.
endpointIp String
(Deprecated) The IP of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

endpointPort Number
(Deprecated) The port of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

id String
The provider-assigned unique ID for this managed resource.
organizationId String
The organization ID the Database Instance is associated with.
readReplicas List<Property Map>
List of read replicas of the Database Instance.

Look up Existing DatabaseInstance Resource

Get an existing DatabaseInstance 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?: DatabaseInstanceState, opts?: CustomResourceOptions): DatabaseInstance
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        backup_same_region: Optional[bool] = None,
        backup_schedule_frequency: Optional[int] = None,
        backup_schedule_retention: Optional[int] = None,
        certificate: Optional[str] = None,
        disable_backup: Optional[bool] = None,
        encryption_at_rest: Optional[bool] = None,
        endpoint_ip: Optional[str] = None,
        endpoint_port: Optional[int] = None,
        engine: Optional[str] = None,
        init_settings: Optional[Mapping[str, str]] = None,
        is_ha_cluster: Optional[bool] = None,
        load_balancers: Optional[Sequence[DatabaseInstanceLoadBalancerArgs]] = None,
        logs_policy: Optional[DatabaseInstanceLogsPolicyArgs] = None,
        name: Optional[str] = None,
        node_type: Optional[str] = None,
        organization_id: Optional[str] = None,
        password: Optional[str] = None,
        private_network: Optional[DatabaseInstancePrivateNetworkArgs] = None,
        project_id: Optional[str] = None,
        read_replicas: Optional[Sequence[DatabaseInstanceReadReplicaArgs]] = None,
        region: Optional[str] = None,
        settings: Optional[Mapping[str, str]] = None,
        snapshot_id: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        user_name: Optional[str] = None,
        volume_size_in_gb: Optional[int] = None,
        volume_type: Optional[str] = None) -> DatabaseInstance
func GetDatabaseInstance(ctx *Context, name string, id IDInput, state *DatabaseInstanceState, opts ...ResourceOption) (*DatabaseInstance, error)
public static DatabaseInstance Get(string name, Input<string> id, DatabaseInstanceState? state, CustomResourceOptions? opts = null)
public static DatabaseInstance get(String name, Output<String> id, DatabaseInstanceState state, CustomResourceOptions options)
resources:  _:    type: scaleway:DatabaseInstance    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:
BackupSameRegion bool
Boolean to store logical backups in the same region as the database instance
BackupScheduleFrequency int
Backup schedule frequency in hours
BackupScheduleRetention int
Backup schedule retention in days
Certificate string
Certificate of the Database Instance.
DisableBackup bool
Disable automated backup for the database instance
EncryptionAtRest bool
Enable or disable encryption at rest for the Database Instance.
EndpointIp string
(Deprecated) The IP of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

EndpointPort int
(Deprecated) The port of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

Engine Changes to this property will trigger replacement. string

Database Instance's engine version (e.g. PostgreSQL-11).

Important Updates to engine will recreate the Database Instance.

InitSettings Changes to this property will trigger replacement. Dictionary<string, string>
Map of engine settings to be set at database initialisation.
IsHaCluster bool

Enable or disable high availability for the Database Instance.

Important Updates to is_ha_cluster will recreate the Database Instance.

LoadBalancers List<Pulumiverse.Scaleway.Inputs.DatabaseInstanceLoadBalancer>
List of Load Balancer endpoints of the Database Instance.
LogsPolicy Pulumiverse.Scaleway.Inputs.DatabaseInstanceLogsPolicy
Logs policy configuration
Name string
The name of the Database Instance.
NodeType string

The type of Database Instance you want to create (e.g. db-dev-s).

Important Updates to node_type will upgrade the Database Instance to the desired node_type without any interruption.

Important Once your Database Instance reaches disk_full status, if you are using lssd storage, you should upgrade the node_type, and if you are using bssd storage, you should increase the volume size before making any other changes to your Database Instance.

OrganizationId string
The organization ID the Database Instance is associated with.
Password string
Password for the first user of the Database Instance.
PrivateNetwork Pulumiverse.Scaleway.Inputs.DatabaseInstancePrivateNetwork
List of Private Networks endpoints of the Database Instance.
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project the Database Instance is associated with.
ReadReplicas List<Pulumiverse.Scaleway.Inputs.DatabaseInstanceReadReplica>
List of read replicas of the Database Instance.
Region Changes to this property will trigger replacement. string
region) The region in which the Database Instance should be created.
Settings Dictionary<string, string>
Map of engine settings to be set on a running instance.
SnapshotId Changes to this property will trigger replacement. string
ID of an existing snapshot to create a new instance from. This allows restoring a database instance to the state captured in the specified snapshot. Conflicts with the engine attribute.
Tags List<string>
The tags associated with the Database Instance.
UserName Changes to this property will trigger replacement. string

Identifier for the first user of the Database Instance.

Important Updates to user_name will recreate the Database Instance.

VolumeSizeInGb int

Volume size (in GB). Cannot be used when volume_type is set to lssd.

Important Once your Database Instance reaches disk_full status, you should increase the volume size before making any other change to your Database Instance.

VolumeType string
Type of volume where data are stored (bssd, lssd, sbs_5k or sbs_15k).
BackupSameRegion bool
Boolean to store logical backups in the same region as the database instance
BackupScheduleFrequency int
Backup schedule frequency in hours
BackupScheduleRetention int
Backup schedule retention in days
Certificate string
Certificate of the Database Instance.
DisableBackup bool
Disable automated backup for the database instance
EncryptionAtRest bool
Enable or disable encryption at rest for the Database Instance.
EndpointIp string
(Deprecated) The IP of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

EndpointPort int
(Deprecated) The port of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

Engine Changes to this property will trigger replacement. string

Database Instance's engine version (e.g. PostgreSQL-11).

Important Updates to engine will recreate the Database Instance.

InitSettings Changes to this property will trigger replacement. map[string]string
Map of engine settings to be set at database initialisation.
IsHaCluster bool

Enable or disable high availability for the Database Instance.

Important Updates to is_ha_cluster will recreate the Database Instance.

LoadBalancers []DatabaseInstanceLoadBalancerArgs
List of Load Balancer endpoints of the Database Instance.
LogsPolicy DatabaseInstanceLogsPolicyArgs
Logs policy configuration
Name string
The name of the Database Instance.
NodeType string

The type of Database Instance you want to create (e.g. db-dev-s).

Important Updates to node_type will upgrade the Database Instance to the desired node_type without any interruption.

Important Once your Database Instance reaches disk_full status, if you are using lssd storage, you should upgrade the node_type, and if you are using bssd storage, you should increase the volume size before making any other changes to your Database Instance.

OrganizationId string
The organization ID the Database Instance is associated with.
Password string
Password for the first user of the Database Instance.
PrivateNetwork DatabaseInstancePrivateNetworkArgs
List of Private Networks endpoints of the Database Instance.
ProjectId Changes to this property will trigger replacement. string
project_id) The ID of the project the Database Instance is associated with.
ReadReplicas []DatabaseInstanceReadReplicaArgs
List of read replicas of the Database Instance.
Region Changes to this property will trigger replacement. string
region) The region in which the Database Instance should be created.
Settings map[string]string
Map of engine settings to be set on a running instance.
SnapshotId Changes to this property will trigger replacement. string
ID of an existing snapshot to create a new instance from. This allows restoring a database instance to the state captured in the specified snapshot. Conflicts with the engine attribute.
Tags []string
The tags associated with the Database Instance.
UserName Changes to this property will trigger replacement. string

Identifier for the first user of the Database Instance.

Important Updates to user_name will recreate the Database Instance.

VolumeSizeInGb int

Volume size (in GB). Cannot be used when volume_type is set to lssd.

Important Once your Database Instance reaches disk_full status, you should increase the volume size before making any other change to your Database Instance.

VolumeType string
Type of volume where data are stored (bssd, lssd, sbs_5k or sbs_15k).
backupSameRegion Boolean
Boolean to store logical backups in the same region as the database instance
backupScheduleFrequency Integer
Backup schedule frequency in hours
backupScheduleRetention Integer
Backup schedule retention in days
certificate String
Certificate of the Database Instance.
disableBackup Boolean
Disable automated backup for the database instance
encryptionAtRest Boolean
Enable or disable encryption at rest for the Database Instance.
endpointIp String
(Deprecated) The IP of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

endpointPort Integer
(Deprecated) The port of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

engine Changes to this property will trigger replacement. String

Database Instance's engine version (e.g. PostgreSQL-11).

Important Updates to engine will recreate the Database Instance.

initSettings Changes to this property will trigger replacement. Map<String,String>
Map of engine settings to be set at database initialisation.
isHaCluster Boolean

Enable or disable high availability for the Database Instance.

Important Updates to is_ha_cluster will recreate the Database Instance.

loadBalancers List<DatabaseInstanceLoadBalancer>
List of Load Balancer endpoints of the Database Instance.
logsPolicy DatabaseInstanceLogsPolicy
Logs policy configuration
name String
The name of the Database Instance.
nodeType String

The type of Database Instance you want to create (e.g. db-dev-s).

Important Updates to node_type will upgrade the Database Instance to the desired node_type without any interruption.

Important Once your Database Instance reaches disk_full status, if you are using lssd storage, you should upgrade the node_type, and if you are using bssd storage, you should increase the volume size before making any other changes to your Database Instance.

organizationId String
The organization ID the Database Instance is associated with.
password String
Password for the first user of the Database Instance.
privateNetwork DatabaseInstancePrivateNetwork
List of Private Networks endpoints of the Database Instance.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project the Database Instance is associated with.
readReplicas List<DatabaseInstanceReadReplica>
List of read replicas of the Database Instance.
region Changes to this property will trigger replacement. String
region) The region in which the Database Instance should be created.
settings Map<String,String>
Map of engine settings to be set on a running instance.
snapshotId Changes to this property will trigger replacement. String
ID of an existing snapshot to create a new instance from. This allows restoring a database instance to the state captured in the specified snapshot. Conflicts with the engine attribute.
tags List<String>
The tags associated with the Database Instance.
userName Changes to this property will trigger replacement. String

Identifier for the first user of the Database Instance.

Important Updates to user_name will recreate the Database Instance.

volumeSizeInGb Integer

Volume size (in GB). Cannot be used when volume_type is set to lssd.

Important Once your Database Instance reaches disk_full status, you should increase the volume size before making any other change to your Database Instance.

volumeType String
Type of volume where data are stored (bssd, lssd, sbs_5k or sbs_15k).
backupSameRegion boolean
Boolean to store logical backups in the same region as the database instance
backupScheduleFrequency number
Backup schedule frequency in hours
backupScheduleRetention number
Backup schedule retention in days
certificate string
Certificate of the Database Instance.
disableBackup boolean
Disable automated backup for the database instance
encryptionAtRest boolean
Enable or disable encryption at rest for the Database Instance.
endpointIp string
(Deprecated) The IP of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

endpointPort number
(Deprecated) The port of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

engine Changes to this property will trigger replacement. string

Database Instance's engine version (e.g. PostgreSQL-11).

Important Updates to engine will recreate the Database Instance.

initSettings Changes to this property will trigger replacement. {[key: string]: string}
Map of engine settings to be set at database initialisation.
isHaCluster boolean

Enable or disable high availability for the Database Instance.

Important Updates to is_ha_cluster will recreate the Database Instance.

loadBalancers DatabaseInstanceLoadBalancer[]
List of Load Balancer endpoints of the Database Instance.
logsPolicy DatabaseInstanceLogsPolicy
Logs policy configuration
name string
The name of the Database Instance.
nodeType string

The type of Database Instance you want to create (e.g. db-dev-s).

Important Updates to node_type will upgrade the Database Instance to the desired node_type without any interruption.

Important Once your Database Instance reaches disk_full status, if you are using lssd storage, you should upgrade the node_type, and if you are using bssd storage, you should increase the volume size before making any other changes to your Database Instance.

organizationId string
The organization ID the Database Instance is associated with.
password string
Password for the first user of the Database Instance.
privateNetwork DatabaseInstancePrivateNetwork
List of Private Networks endpoints of the Database Instance.
projectId Changes to this property will trigger replacement. string
project_id) The ID of the project the Database Instance is associated with.
readReplicas DatabaseInstanceReadReplica[]
List of read replicas of the Database Instance.
region Changes to this property will trigger replacement. string
region) The region in which the Database Instance should be created.
settings {[key: string]: string}
Map of engine settings to be set on a running instance.
snapshotId Changes to this property will trigger replacement. string
ID of an existing snapshot to create a new instance from. This allows restoring a database instance to the state captured in the specified snapshot. Conflicts with the engine attribute.
tags string[]
The tags associated with the Database Instance.
userName Changes to this property will trigger replacement. string

Identifier for the first user of the Database Instance.

Important Updates to user_name will recreate the Database Instance.

volumeSizeInGb number

Volume size (in GB). Cannot be used when volume_type is set to lssd.

Important Once your Database Instance reaches disk_full status, you should increase the volume size before making any other change to your Database Instance.

volumeType string
Type of volume where data are stored (bssd, lssd, sbs_5k or sbs_15k).
backup_same_region bool
Boolean to store logical backups in the same region as the database instance
backup_schedule_frequency int
Backup schedule frequency in hours
backup_schedule_retention int
Backup schedule retention in days
certificate str
Certificate of the Database Instance.
disable_backup bool
Disable automated backup for the database instance
encryption_at_rest bool
Enable or disable encryption at rest for the Database Instance.
endpoint_ip str
(Deprecated) The IP of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

endpoint_port int
(Deprecated) The port of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

engine Changes to this property will trigger replacement. str

Database Instance's engine version (e.g. PostgreSQL-11).

Important Updates to engine will recreate the Database Instance.

init_settings Changes to this property will trigger replacement. Mapping[str, str]
Map of engine settings to be set at database initialisation.
is_ha_cluster bool

Enable or disable high availability for the Database Instance.

Important Updates to is_ha_cluster will recreate the Database Instance.

load_balancers Sequence[DatabaseInstanceLoadBalancerArgs]
List of Load Balancer endpoints of the Database Instance.
logs_policy DatabaseInstanceLogsPolicyArgs
Logs policy configuration
name str
The name of the Database Instance.
node_type str

The type of Database Instance you want to create (e.g. db-dev-s).

Important Updates to node_type will upgrade the Database Instance to the desired node_type without any interruption.

Important Once your Database Instance reaches disk_full status, if you are using lssd storage, you should upgrade the node_type, and if you are using bssd storage, you should increase the volume size before making any other changes to your Database Instance.

organization_id str
The organization ID the Database Instance is associated with.
password str
Password for the first user of the Database Instance.
private_network DatabaseInstancePrivateNetworkArgs
List of Private Networks endpoints of the Database Instance.
project_id Changes to this property will trigger replacement. str
project_id) The ID of the project the Database Instance is associated with.
read_replicas Sequence[DatabaseInstanceReadReplicaArgs]
List of read replicas of the Database Instance.
region Changes to this property will trigger replacement. str
region) The region in which the Database Instance should be created.
settings Mapping[str, str]
Map of engine settings to be set on a running instance.
snapshot_id Changes to this property will trigger replacement. str
ID of an existing snapshot to create a new instance from. This allows restoring a database instance to the state captured in the specified snapshot. Conflicts with the engine attribute.
tags Sequence[str]
The tags associated with the Database Instance.
user_name Changes to this property will trigger replacement. str

Identifier for the first user of the Database Instance.

Important Updates to user_name will recreate the Database Instance.

volume_size_in_gb int

Volume size (in GB). Cannot be used when volume_type is set to lssd.

Important Once your Database Instance reaches disk_full status, you should increase the volume size before making any other change to your Database Instance.

volume_type str
Type of volume where data are stored (bssd, lssd, sbs_5k or sbs_15k).
backupSameRegion Boolean
Boolean to store logical backups in the same region as the database instance
backupScheduleFrequency Number
Backup schedule frequency in hours
backupScheduleRetention Number
Backup schedule retention in days
certificate String
Certificate of the Database Instance.
disableBackup Boolean
Disable automated backup for the database instance
encryptionAtRest Boolean
Enable or disable encryption at rest for the Database Instance.
endpointIp String
(Deprecated) The IP of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

endpointPort Number
(Deprecated) The port of the Database Instance. Please use the private_network or the load_balancer attribute.

Deprecated: Please use the private_network or the load_balancer attribute

engine Changes to this property will trigger replacement. String

Database Instance's engine version (e.g. PostgreSQL-11).

Important Updates to engine will recreate the Database Instance.

initSettings Changes to this property will trigger replacement. Map<String>
Map of engine settings to be set at database initialisation.
isHaCluster Boolean

Enable or disable high availability for the Database Instance.

Important Updates to is_ha_cluster will recreate the Database Instance.

loadBalancers List<Property Map>
List of Load Balancer endpoints of the Database Instance.
logsPolicy Property Map
Logs policy configuration
name String
The name of the Database Instance.
nodeType String

The type of Database Instance you want to create (e.g. db-dev-s).

Important Updates to node_type will upgrade the Database Instance to the desired node_type without any interruption.

Important Once your Database Instance reaches disk_full status, if you are using lssd storage, you should upgrade the node_type, and if you are using bssd storage, you should increase the volume size before making any other changes to your Database Instance.

organizationId String
The organization ID the Database Instance is associated with.
password String
Password for the first user of the Database Instance.
privateNetwork Property Map
List of Private Networks endpoints of the Database Instance.
projectId Changes to this property will trigger replacement. String
project_id) The ID of the project the Database Instance is associated with.
readReplicas List<Property Map>
List of read replicas of the Database Instance.
region Changes to this property will trigger replacement. String
region) The region in which the Database Instance should be created.
settings Map<String>
Map of engine settings to be set on a running instance.
snapshotId Changes to this property will trigger replacement. String
ID of an existing snapshot to create a new instance from. This allows restoring a database instance to the state captured in the specified snapshot. Conflicts with the engine attribute.
tags List<String>
The tags associated with the Database Instance.
userName Changes to this property will trigger replacement. String

Identifier for the first user of the Database Instance.

Important Updates to user_name will recreate the Database Instance.

volumeSizeInGb Number

Volume size (in GB). Cannot be used when volume_type is set to lssd.

Important Once your Database Instance reaches disk_full status, you should increase the volume size before making any other change to your Database Instance.

volumeType String
Type of volume where data are stored (bssd, lssd, sbs_5k or sbs_15k).

Supporting Types

DatabaseInstanceLoadBalancer
, DatabaseInstanceLoadBalancerArgs

EndpointId string
The ID of the endpoint.
Hostname string
Hostname of the endpoint.
Ip string
IPv4 address on the network.
Name string
The name of the Database Instance.
Port int
Port in the Private Network.
EndpointId string
The ID of the endpoint.
Hostname string
Hostname of the endpoint.
Ip string
IPv4 address on the network.
Name string
The name of the Database Instance.
Port int
Port in the Private Network.
endpointId String
The ID of the endpoint.
hostname String
Hostname of the endpoint.
ip String
IPv4 address on the network.
name String
The name of the Database Instance.
port Integer
Port in the Private Network.
endpointId string
The ID of the endpoint.
hostname string
Hostname of the endpoint.
ip string
IPv4 address on the network.
name string
The name of the Database Instance.
port number
Port in the Private Network.
endpoint_id str
The ID of the endpoint.
hostname str
Hostname of the endpoint.
ip str
IPv4 address on the network.
name str
The name of the Database Instance.
port int
Port in the Private Network.
endpointId String
The ID of the endpoint.
hostname String
Hostname of the endpoint.
ip String
IPv4 address on the network.
name String
The name of the Database Instance.
port Number
Port in the Private Network.

DatabaseInstanceLogsPolicy
, DatabaseInstanceLogsPolicyArgs

MaxAgeRetention int
The max age (in days) of remote logs to keep on the Database Instance
TotalDiskRetention int
The max disk size of remote logs to keep on the Database Instance.
MaxAgeRetention int
The max age (in days) of remote logs to keep on the Database Instance
TotalDiskRetention int
The max disk size of remote logs to keep on the Database Instance.
maxAgeRetention Integer
The max age (in days) of remote logs to keep on the Database Instance
totalDiskRetention Integer
The max disk size of remote logs to keep on the Database Instance.
maxAgeRetention number
The max age (in days) of remote logs to keep on the Database Instance
totalDiskRetention number
The max disk size of remote logs to keep on the Database Instance.
max_age_retention int
The max age (in days) of remote logs to keep on the Database Instance
total_disk_retention int
The max disk size of remote logs to keep on the Database Instance.
maxAgeRetention Number
The max age (in days) of remote logs to keep on the Database Instance
totalDiskRetention Number
The max disk size of remote logs to keep on the Database Instance.

DatabaseInstancePrivateNetwork
, DatabaseInstancePrivateNetworkArgs

PnId This property is required. string
The private network ID
EnableIpam bool
Whether or not the private network endpoint should be configured with IPAM
EndpointId string
The ID of the endpoint.
Hostname string
Hostname of the endpoint.
Ip string
IPv4 address on the network.
IpNet string
The IP with the given mask within the private subnet
Name string
The name of the Database Instance.
Port int
Port in the Private Network.
Zone Changes to this property will trigger replacement. string
The zone you want to attach the resource to
PnId This property is required. string
The private network ID
EnableIpam bool
Whether or not the private network endpoint should be configured with IPAM
EndpointId string
The ID of the endpoint.
Hostname string
Hostname of the endpoint.
Ip string
IPv4 address on the network.
IpNet string
The IP with the given mask within the private subnet
Name string
The name of the Database Instance.
Port int
Port in the Private Network.
Zone Changes to this property will trigger replacement. string
The zone you want to attach the resource to
pnId This property is required. String
The private network ID
enableIpam Boolean
Whether or not the private network endpoint should be configured with IPAM
endpointId String
The ID of the endpoint.
hostname String
Hostname of the endpoint.
ip String
IPv4 address on the network.
ipNet String
The IP with the given mask within the private subnet
name String
The name of the Database Instance.
port Integer
Port in the Private Network.
zone Changes to this property will trigger replacement. String
The zone you want to attach the resource to
pnId This property is required. string
The private network ID
enableIpam boolean
Whether or not the private network endpoint should be configured with IPAM
endpointId string
The ID of the endpoint.
hostname string
Hostname of the endpoint.
ip string
IPv4 address on the network.
ipNet string
The IP with the given mask within the private subnet
name string
The name of the Database Instance.
port number
Port in the Private Network.
zone Changes to this property will trigger replacement. string
The zone you want to attach the resource to
pn_id This property is required. str
The private network ID
enable_ipam bool
Whether or not the private network endpoint should be configured with IPAM
endpoint_id str
The ID of the endpoint.
hostname str
Hostname of the endpoint.
ip str
IPv4 address on the network.
ip_net str
The IP with the given mask within the private subnet
name str
The name of the Database Instance.
port int
Port in the Private Network.
zone Changes to this property will trigger replacement. str
The zone you want to attach the resource to
pnId This property is required. String
The private network ID
enableIpam Boolean
Whether or not the private network endpoint should be configured with IPAM
endpointId String
The ID of the endpoint.
hostname String
Hostname of the endpoint.
ip String
IPv4 address on the network.
ipNet String
The IP with the given mask within the private subnet
name String
The name of the Database Instance.
port Number
Port in the Private Network.
zone Changes to this property will trigger replacement. String
The zone you want to attach the resource to

DatabaseInstanceReadReplica
, DatabaseInstanceReadReplicaArgs

Ip string
IPv4 address on the network.
Name string
The name of the Database Instance.
Port int
Port in the Private Network.
Ip string
IPv4 address on the network.
Name string
The name of the Database Instance.
Port int
Port in the Private Network.
ip String
IPv4 address on the network.
name String
The name of the Database Instance.
port Integer
Port in the Private Network.
ip string
IPv4 address on the network.
name string
The name of the Database Instance.
port number
Port in the Private Network.
ip str
IPv4 address on the network.
name str
The name of the Database Instance.
port int
Port in the Private Network.
ip String
IPv4 address on the network.
name String
The name of the Database Instance.
port Number
Port in the Private Network.

Import

Database Instance can be imported using the {region}/{id}, e.g.

bash

$ pulumi import scaleway:index/databaseInstance:DatabaseInstance rdb01 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.