scaleway logo
Scaleway v1.7.0, Feb 19 23

scaleway.DatabaseInstance

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

Examples

Example Basic

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@lbrlabs/pulumi-scaleway";

const main = new scaleway.DatabaseInstance("main", {
    disableBackup: true,
    engine: "PostgreSQL-11",
    isHaCluster: true,
    nodeType: "DB-DEV-S",
    password: "thiZ_is_v&ry_s3cret",
    userName: "my_initial_user",
});
import pulumi
import lbrlabs_pulumi_scaleway as scaleway

main = scaleway.DatabaseInstance("main",
    disable_backup=True,
    engine="PostgreSQL-11",
    is_ha_cluster=True,
    node_type="DB-DEV-S",
    password="thiZ_is_v&ry_s3cret",
    user_name="my_initial_user")
using System.Collections.Generic;
using Pulumi;
using Scaleway = Lbrlabs.PulumiPackage.Scaleway;

return await Deployment.RunAsync(() => 
{
    var main = new Scaleway.DatabaseInstance("main", new()
    {
        DisableBackup = true,
        Engine = "PostgreSQL-11",
        IsHaCluster = true,
        NodeType = "DB-DEV-S",
        Password = "thiZ_is_v&ry_s3cret",
        UserName = "my_initial_user",
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := scaleway.NewDatabaseInstance(ctx, "main", &scaleway.DatabaseInstanceArgs{
			DisableBackup: pulumi.Bool(true),
			Engine:        pulumi.String("PostgreSQL-11"),
			IsHaCluster:   pulumi.Bool(true),
			NodeType:      pulumi.String("DB-DEV-S"),
			Password:      pulumi.String("thiZ_is_v&ry_s3cret"),
			UserName:      pulumi.String("my_initial_user"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.DatabaseInstance;
import com.pulumi.scaleway.DatabaseInstanceArgs;
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 DatabaseInstance("main", DatabaseInstanceArgs.builder()        
            .disableBackup(true)
            .engine("PostgreSQL-11")
            .isHaCluster(true)
            .nodeType("DB-DEV-S")
            .password("thiZ_is_v&ry_s3cret")
            .userName("my_initial_user")
            .build());

    }
}
resources:
  main:
    type: scaleway:DatabaseInstance
    properties:
      disableBackup: true
      engine: PostgreSQL-11
      isHaCluster: true
      nodeType: DB-DEV-S
      password: thiZ_is_v&ry_s3cret
      userName: my_initial_user

Example with Settings

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@lbrlabs/pulumi-scaleway";

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

main = scaleway.DatabaseInstance("main",
    disable_backup=True,
    engine="MySQL-8",
    init_settings={
        "lower_case_table_names": "1",
    },
    node_type="db-dev-s",
    password="thiZ_is_v&ry_s3cret",
    settings={
        "max_connections": "350",
    },
    user_name="my_initial_user")
using System.Collections.Generic;
using Pulumi;
using Scaleway = Lbrlabs.PulumiPackage.Scaleway;

return await Deployment.RunAsync(() => 
{
    var main = new Scaleway.DatabaseInstance("main", new()
    {
        DisableBackup = true,
        Engine = "MySQL-8",
        InitSettings = 
        {
            { "lower_case_table_names", "1" },
        },
        NodeType = "db-dev-s",
        Password = "thiZ_is_v&ry_s3cret",
        Settings = 
        {
            { "max_connections", "350" },
        },
        UserName = "my_initial_user",
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := scaleway.NewDatabaseInstance(ctx, "main", &scaleway.DatabaseInstanceArgs{
			DisableBackup: pulumi.Bool(true),
			Engine:        pulumi.String("MySQL-8"),
			InitSettings: pulumi.StringMap{
				"lower_case_table_names": pulumi.String("1"),
			},
			NodeType: pulumi.String("db-dev-s"),
			Password: pulumi.String("thiZ_is_v&ry_s3cret"),
			Settings: pulumi.StringMap{
				"max_connections": pulumi.String("350"),
			},
			UserName: pulumi.String("my_initial_user"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

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

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

Example with backup schedule

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@lbrlabs/pulumi-scaleway";

const main = new scaleway.DatabaseInstance("main", {
    backupScheduleFrequency: 24,
    backupScheduleRetention: 7,
    disableBackup: false,
    engine: "PostgreSQL-11",
    isHaCluster: true,
    nodeType: "DB-DEV-S",
    password: "thiZ_is_v&ry_s3cret",
    userName: "my_initial_user",
});
import pulumi
import lbrlabs_pulumi_scaleway as scaleway

main = scaleway.DatabaseInstance("main",
    backup_schedule_frequency=24,
    backup_schedule_retention=7,
    disable_backup=False,
    engine="PostgreSQL-11",
    is_ha_cluster=True,
    node_type="DB-DEV-S",
    password="thiZ_is_v&ry_s3cret",
    user_name="my_initial_user")
using System.Collections.Generic;
using Pulumi;
using Scaleway = Lbrlabs.PulumiPackage.Scaleway;

return await Deployment.RunAsync(() => 
{
    var main = new Scaleway.DatabaseInstance("main", new()
    {
        BackupScheduleFrequency = 24,
        BackupScheduleRetention = 7,
        DisableBackup = false,
        Engine = "PostgreSQL-11",
        IsHaCluster = true,
        NodeType = "DB-DEV-S",
        Password = "thiZ_is_v&ry_s3cret",
        UserName = "my_initial_user",
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := scaleway.NewDatabaseInstance(ctx, "main", &scaleway.DatabaseInstanceArgs{
			BackupScheduleFrequency: pulumi.Int(24),
			BackupScheduleRetention: pulumi.Int(7),
			DisableBackup:           pulumi.Bool(false),
			Engine:                  pulumi.String("PostgreSQL-11"),
			IsHaCluster:             pulumi.Bool(true),
			NodeType:                pulumi.String("DB-DEV-S"),
			Password:                pulumi.String("thiZ_is_v&ry_s3cret"),
			UserName:                pulumi.String("my_initial_user"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.DatabaseInstance;
import com.pulumi.scaleway.DatabaseInstanceArgs;
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 DatabaseInstance("main", DatabaseInstanceArgs.builder()        
            .backupScheduleFrequency(24)
            .backupScheduleRetention(7)
            .disableBackup(false)
            .engine("PostgreSQL-11")
            .isHaCluster(true)
            .nodeType("DB-DEV-S")
            .password("thiZ_is_v&ry_s3cret")
            .userName("my_initial_user")
            .build());

    }
}
resources:
  main:
    type: scaleway:DatabaseInstance
    properties:
      backupScheduleFrequency: 24
      # every day
      backupScheduleRetention: 7
      # keep it one week
      disableBackup: false
      engine: PostgreSQL-11
      isHaCluster: true
      nodeType: DB-DEV-S
      password: thiZ_is_v&ry_s3cret
      userName: my_initial_user

Example with private network and dhcp configuration

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@lbrlabs/pulumi-scaleway";

const pn02 = new scaleway.VpcPrivateNetwork("pn02", {});
const mainVpcPublicGatewayDhcp = new scaleway.VpcPublicGatewayDhcp("mainVpcPublicGatewayDhcp", {subnet: "192.168.1.0/24"});
const mainVpcPublicGatewayIp = new scaleway.VpcPublicGatewayIp("mainVpcPublicGatewayIp", {});
const mainVpcPublicGateway = new scaleway.VpcPublicGateway("mainVpcPublicGateway", {
    type: "VPC-GW-S",
    ipId: mainVpcPublicGatewayIp.id,
});
const mainVpcGatewayNetwork = new scaleway.VpcGatewayNetwork("mainVpcGatewayNetwork", {
    gatewayId: mainVpcPublicGateway.id,
    privateNetworkId: pn02.id,
    dhcpId: mainVpcPublicGatewayDhcp.id,
    cleanupDhcp: true,
    enableMasquerade: true,
}, {
    dependsOn: [
        mainVpcPublicGatewayIp,
        pn02,
    ],
});
const mainDatabaseInstance = new scaleway.DatabaseInstance("mainDatabaseInstance", {
    nodeType: "db-dev-s",
    engine: "PostgreSQL-11",
    isHaCluster: false,
    disableBackup: true,
    userName: "my_initial_user",
    password: "thiZ_is_v&ry_s3cret",
    region: "fr-par",
    tags: [
        "terraform-test",
        "scaleway_rdb_instance",
        "volume",
        "rdb_pn",
    ],
    volumeType: "bssd",
    volumeSizeInGb: 10,
    privateNetwork: {
        ipNet: "192.168.1.254/24",
        pnId: pn02.id,
    },
});
const mainVpcPublicGatewayPatRule = new scaleway.VpcPublicGatewayPatRule("mainVpcPublicGatewayPatRule", {
    gatewayId: mainVpcPublicGateway.id,
    privateIp: mainVpcPublicGatewayDhcp.address,
    privatePort: mainDatabaseInstance.privateNetwork.apply(privateNetwork => privateNetwork?.port),
    publicPort: 42,
    protocol: "both",
}, {
    dependsOn: [
        mainVpcGatewayNetwork,
        pn02,
    ],
});
import pulumi
import lbrlabs_pulumi_scaleway as scaleway

pn02 = scaleway.VpcPrivateNetwork("pn02")
main_vpc_public_gateway_dhcp = scaleway.VpcPublicGatewayDhcp("mainVpcPublicGatewayDhcp", subnet="192.168.1.0/24")
main_vpc_public_gateway_ip = scaleway.VpcPublicGatewayIp("mainVpcPublicGatewayIp")
main_vpc_public_gateway = scaleway.VpcPublicGateway("mainVpcPublicGateway",
    type="VPC-GW-S",
    ip_id=main_vpc_public_gateway_ip.id)
main_vpc_gateway_network = scaleway.VpcGatewayNetwork("mainVpcGatewayNetwork",
    gateway_id=main_vpc_public_gateway.id,
    private_network_id=pn02.id,
    dhcp_id=main_vpc_public_gateway_dhcp.id,
    cleanup_dhcp=True,
    enable_masquerade=True,
    opts=pulumi.ResourceOptions(depends_on=[
            main_vpc_public_gateway_ip,
            pn02,
        ]))
main_database_instance = scaleway.DatabaseInstance("mainDatabaseInstance",
    node_type="db-dev-s",
    engine="PostgreSQL-11",
    is_ha_cluster=False,
    disable_backup=True,
    user_name="my_initial_user",
    password="thiZ_is_v&ry_s3cret",
    region="fr-par",
    tags=[
        "terraform-test",
        "scaleway_rdb_instance",
        "volume",
        "rdb_pn",
    ],
    volume_type="bssd",
    volume_size_in_gb=10,
    private_network=scaleway.DatabaseInstancePrivateNetworkArgs(
        ip_net="192.168.1.254/24",
        pn_id=pn02.id,
    ))
main_vpc_public_gateway_pat_rule = scaleway.VpcPublicGatewayPatRule("mainVpcPublicGatewayPatRule",
    gateway_id=main_vpc_public_gateway.id,
    private_ip=main_vpc_public_gateway_dhcp.address,
    private_port=main_database_instance.private_network.port,
    public_port=42,
    protocol="both",
    opts=pulumi.ResourceOptions(depends_on=[
            main_vpc_gateway_network,
            pn02,
        ]))
using System.Collections.Generic;
using Pulumi;
using Scaleway = Lbrlabs.PulumiPackage.Scaleway;

return await Deployment.RunAsync(() => 
{
    var pn02 = new Scaleway.VpcPrivateNetwork("pn02");

    var mainVpcPublicGatewayDhcp = new Scaleway.VpcPublicGatewayDhcp("mainVpcPublicGatewayDhcp", new()
    {
        Subnet = "192.168.1.0/24",
    });

    var mainVpcPublicGatewayIp = new Scaleway.VpcPublicGatewayIp("mainVpcPublicGatewayIp");

    var mainVpcPublicGateway = new Scaleway.VpcPublicGateway("mainVpcPublicGateway", new()
    {
        Type = "VPC-GW-S",
        IpId = mainVpcPublicGatewayIp.Id,
    });

    var mainVpcGatewayNetwork = new Scaleway.VpcGatewayNetwork("mainVpcGatewayNetwork", new()
    {
        GatewayId = mainVpcPublicGateway.Id,
        PrivateNetworkId = pn02.Id,
        DhcpId = mainVpcPublicGatewayDhcp.Id,
        CleanupDhcp = true,
        EnableMasquerade = true,
    }, new CustomResourceOptions
    {
        DependsOn = new[]
        {
            mainVpcPublicGatewayIp,
            pn02,
        },
    });

    var mainDatabaseInstance = new Scaleway.DatabaseInstance("mainDatabaseInstance", new()
    {
        NodeType = "db-dev-s",
        Engine = "PostgreSQL-11",
        IsHaCluster = false,
        DisableBackup = true,
        UserName = "my_initial_user",
        Password = "thiZ_is_v&ry_s3cret",
        Region = "fr-par",
        Tags = new[]
        {
            "terraform-test",
            "scaleway_rdb_instance",
            "volume",
            "rdb_pn",
        },
        VolumeType = "bssd",
        VolumeSizeInGb = 10,
        PrivateNetwork = new Scaleway.Inputs.DatabaseInstancePrivateNetworkArgs
        {
            IpNet = "192.168.1.254/24",
            PnId = pn02.Id,
        },
    });

    var mainVpcPublicGatewayPatRule = new Scaleway.VpcPublicGatewayPatRule("mainVpcPublicGatewayPatRule", new()
    {
        GatewayId = mainVpcPublicGateway.Id,
        PrivateIp = mainVpcPublicGatewayDhcp.Address,
        PrivatePort = mainDatabaseInstance.PrivateNetwork.Apply(privateNetwork => privateNetwork?.Port),
        PublicPort = 42,
        Protocol = "both",
    }, new CustomResourceOptions
    {
        DependsOn = new[]
        {
            mainVpcGatewayNetwork,
            pn02,
        },
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		pn02, err := scaleway.NewVpcPrivateNetwork(ctx, "pn02", nil)
		if err != nil {
			return err
		}
		mainVpcPublicGatewayDhcp, err := scaleway.NewVpcPublicGatewayDhcp(ctx, "mainVpcPublicGatewayDhcp", &scaleway.VpcPublicGatewayDhcpArgs{
			Subnet: pulumi.String("192.168.1.0/24"),
		})
		if err != nil {
			return err
		}
		mainVpcPublicGatewayIp, err := scaleway.NewVpcPublicGatewayIp(ctx, "mainVpcPublicGatewayIp", nil)
		if err != nil {
			return err
		}
		mainVpcPublicGateway, err := scaleway.NewVpcPublicGateway(ctx, "mainVpcPublicGateway", &scaleway.VpcPublicGatewayArgs{
			Type: pulumi.String("VPC-GW-S"),
			IpId: mainVpcPublicGatewayIp.ID(),
		})
		if err != nil {
			return err
		}
		mainVpcGatewayNetwork, err := scaleway.NewVpcGatewayNetwork(ctx, "mainVpcGatewayNetwork", &scaleway.VpcGatewayNetworkArgs{
			GatewayId:        mainVpcPublicGateway.ID(),
			PrivateNetworkId: pn02.ID(),
			DhcpId:           mainVpcPublicGatewayDhcp.ID(),
			CleanupDhcp:      pulumi.Bool(true),
			EnableMasquerade: pulumi.Bool(true),
		}, pulumi.DependsOn([]pulumi.Resource{
			mainVpcPublicGatewayIp,
			pn02,
		}))
		if err != nil {
			return err
		}
		mainDatabaseInstance, err := scaleway.NewDatabaseInstance(ctx, "mainDatabaseInstance", &scaleway.DatabaseInstanceArgs{
			NodeType:      pulumi.String("db-dev-s"),
			Engine:        pulumi.String("PostgreSQL-11"),
			IsHaCluster:   pulumi.Bool(false),
			DisableBackup: pulumi.Bool(true),
			UserName:      pulumi.String("my_initial_user"),
			Password:      pulumi.String("thiZ_is_v&ry_s3cret"),
			Region:        pulumi.String("fr-par"),
			Tags: pulumi.StringArray{
				pulumi.String("terraform-test"),
				pulumi.String("scaleway_rdb_instance"),
				pulumi.String("volume"),
				pulumi.String("rdb_pn"),
			},
			VolumeType:     pulumi.String("bssd"),
			VolumeSizeInGb: pulumi.Int(10),
			PrivateNetwork: &scaleway.DatabaseInstancePrivateNetworkArgs{
				IpNet: pulumi.String("192.168.1.254/24"),
				PnId:  pn02.ID(),
			},
		})
		if err != nil {
			return err
		}
		_, err = scaleway.NewVpcPublicGatewayPatRule(ctx, "mainVpcPublicGatewayPatRule", &scaleway.VpcPublicGatewayPatRuleArgs{
			GatewayId: mainVpcPublicGateway.ID(),
			PrivateIp: mainVpcPublicGatewayDhcp.Address,
			PrivatePort: mainDatabaseInstance.PrivateNetwork.ApplyT(func(privateNetwork scaleway.DatabaseInstancePrivateNetwork) (*int, error) {
				return &privateNetwork.Port, nil
			}).(pulumi.IntPtrOutput),
			PublicPort: pulumi.Int(42),
			Protocol:   pulumi.String("both"),
		}, pulumi.DependsOn([]pulumi.Resource{
			mainVpcGatewayNetwork,
			pn02,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.VpcPrivateNetwork;
import com.pulumi.scaleway.VpcPublicGatewayDhcp;
import com.pulumi.scaleway.VpcPublicGatewayDhcpArgs;
import com.pulumi.scaleway.VpcPublicGatewayIp;
import com.pulumi.scaleway.VpcPublicGateway;
import com.pulumi.scaleway.VpcPublicGatewayArgs;
import com.pulumi.scaleway.VpcGatewayNetwork;
import com.pulumi.scaleway.VpcGatewayNetworkArgs;
import com.pulumi.scaleway.DatabaseInstance;
import com.pulumi.scaleway.DatabaseInstanceArgs;
import com.pulumi.scaleway.inputs.DatabaseInstancePrivateNetworkArgs;
import com.pulumi.scaleway.VpcPublicGatewayPatRule;
import com.pulumi.scaleway.VpcPublicGatewayPatRuleArgs;
import com.pulumi.resources.CustomResourceOptions;
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 pn02 = new VpcPrivateNetwork("pn02");

        var mainVpcPublicGatewayDhcp = new VpcPublicGatewayDhcp("mainVpcPublicGatewayDhcp", VpcPublicGatewayDhcpArgs.builder()        
            .subnet("192.168.1.0/24")
            .build());

        var mainVpcPublicGatewayIp = new VpcPublicGatewayIp("mainVpcPublicGatewayIp");

        var mainVpcPublicGateway = new VpcPublicGateway("mainVpcPublicGateway", VpcPublicGatewayArgs.builder()        
            .type("VPC-GW-S")
            .ipId(mainVpcPublicGatewayIp.id())
            .build());

        var mainVpcGatewayNetwork = new VpcGatewayNetwork("mainVpcGatewayNetwork", VpcGatewayNetworkArgs.builder()        
            .gatewayId(mainVpcPublicGateway.id())
            .privateNetworkId(pn02.id())
            .dhcpId(mainVpcPublicGatewayDhcp.id())
            .cleanupDhcp(true)
            .enableMasquerade(true)
            .build(), CustomResourceOptions.builder()
                .dependsOn(                
                    mainVpcPublicGatewayIp,
                    pn02)
                .build());

        var mainDatabaseInstance = new DatabaseInstance("mainDatabaseInstance", DatabaseInstanceArgs.builder()        
            .nodeType("db-dev-s")
            .engine("PostgreSQL-11")
            .isHaCluster(false)
            .disableBackup(true)
            .userName("my_initial_user")
            .password("thiZ_is_v&ry_s3cret")
            .region("fr-par")
            .tags(            
                "terraform-test",
                "scaleway_rdb_instance",
                "volume",
                "rdb_pn")
            .volumeType("bssd")
            .volumeSizeInGb(10)
            .privateNetwork(DatabaseInstancePrivateNetworkArgs.builder()
                .ipNet("192.168.1.254/24")
                .pnId(pn02.id())
                .build())
            .build());

        var mainVpcPublicGatewayPatRule = new VpcPublicGatewayPatRule("mainVpcPublicGatewayPatRule", VpcPublicGatewayPatRuleArgs.builder()        
            .gatewayId(mainVpcPublicGateway.id())
            .privateIp(mainVpcPublicGatewayDhcp.address())
            .privatePort(mainDatabaseInstance.privateNetwork().applyValue(privateNetwork -> privateNetwork.port()))
            .publicPort(42)
            .protocol("both")
            .build(), CustomResourceOptions.builder()
                .dependsOn(                
                    mainVpcGatewayNetwork,
                    pn02)
                .build());

    }
}
resources:
  pn02:
    type: scaleway:VpcPrivateNetwork
  mainVpcPublicGatewayDhcp:
    type: scaleway:VpcPublicGatewayDhcp
    properties:
      subnet: 192.168.1.0/24
  mainVpcPublicGatewayIp:
    type: scaleway:VpcPublicGatewayIp
  mainVpcPublicGateway:
    type: scaleway:VpcPublicGateway
    properties:
      type: VPC-GW-S
      ipId: ${mainVpcPublicGatewayIp.id}
  mainVpcPublicGatewayPatRule:
    type: scaleway:VpcPublicGatewayPatRule
    properties:
      gatewayId: ${mainVpcPublicGateway.id}
      privateIp: ${mainVpcPublicGatewayDhcp.address}
      privatePort: ${mainDatabaseInstance.privateNetwork.port}
      publicPort: 42
      protocol: both
    options:
      dependson:
        - ${mainVpcGatewayNetwork}
        - ${pn02}
  mainVpcGatewayNetwork:
    type: scaleway:VpcGatewayNetwork
    properties:
      gatewayId: ${mainVpcPublicGateway.id}
      privateNetworkId: ${pn02.id}
      dhcpId: ${mainVpcPublicGatewayDhcp.id}
      cleanupDhcp: true
      enableMasquerade: true
    options:
      dependson:
        - ${mainVpcPublicGatewayIp}
        - ${pn02}
  mainDatabaseInstance:
    type: scaleway:DatabaseInstance
    properties:
      nodeType: db-dev-s
      engine: PostgreSQL-11
      isHaCluster: false
      disableBackup: true
      userName: my_initial_user
      password: thiZ_is_v&ry_s3cret
      region: fr-par
      tags:
        - terraform-test
        - scaleway_rdb_instance
        - volume
        - rdb_pn
      volumeType: bssd
      volumeSizeInGb: 10
      privateNetwork:
        ipNet: 192.168.1.254/24
        pnId: ${pn02.id}

Settings

Please consult the GoDoc to list all available settings and init_settings on your node_type of your convenient.

Private Network

Important: Updates to private_network will recreate the attachment Instance.

  • ip_net - (Required) The IP network where to con.
  • pn_id - (Required) The ID of the private network. If not provided it will be randomly generated.

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

new DatabaseInstance(name: string, args: DatabaseInstanceArgs, opts?: CustomResourceOptions);
@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,
                     engine: Optional[str] = None,
                     init_settings: Optional[Mapping[str, str]] = None,
                     is_ha_cluster: Optional[bool] = 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,
                     tags: Optional[Sequence[str]] = None,
                     user_name: Optional[str] = None,
                     volume_size_in_gb: Optional[int] = None,
                     volume_type: Optional[str] = None)
@overload
def DatabaseInstance(resource_name: str,
                     args: DatabaseInstanceArgs,
                     opts: Optional[ResourceOptions] = 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.

name string
The unique name of the resource.
args DatabaseInstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args 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 string
The unique name of the resource.
args DatabaseInstanceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DatabaseInstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args 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

The DatabaseInstance resource accepts the following input properties:

Engine string

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

NodeType string

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

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.

InitSettings Dictionary<string, string>

Map of engine settings to be set at database initialisation.

IsHaCluster bool

Enable or disable high availability for the database instance.

Name string

The name of the Database Instance.

Password string

Password for the first user of the database instance.

PrivateNetwork Lbrlabs.PulumiPackage.Scaleway.Inputs.DatabaseInstancePrivateNetworkArgs

List of private networks endpoints of the database instance.

ProjectId string

project_id) The ID of the project the Database Instance is associated with.

Region string

region) The region in which the Database Instance should be created.

Settings Dictionary<string, string>

Map of engine settings to be set. Using this option will override default config.

Tags List<string>

The tags associated with the Database Instance.

UserName string

Identifier for the first user of the database instance.

VolumeSizeInGb int

Volume size (in GB) when volume_type is set to bssd. Must be a multiple of 5000000000.

VolumeType string

Type of volume where data are stored (bssd or lssd).

Engine string

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

NodeType string

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

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.

InitSettings map[string]string

Map of engine settings to be set at database initialisation.

IsHaCluster bool

Enable or disable high availability for the database instance.

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 string

project_id) The ID of the project the Database Instance is associated with.

Region string

region) The region in which the Database Instance should be created.

Settings map[string]string

Map of engine settings to be set. Using this option will override default config.

Tags []string

The tags associated with the Database Instance.

UserName string

Identifier for the first user of the database instance.

VolumeSizeInGb int

Volume size (in GB) when volume_type is set to bssd. Must be a multiple of 5000000000.

VolumeType string

Type of volume where data are stored (bssd or lssd).

engine String

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

nodeType String

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

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.

initSettings Map<String,String>

Map of engine settings to be set at database initialisation.

isHaCluster Boolean

Enable or disable high availability for the database instance.

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 String

project_id) The ID of the project the Database Instance is associated with.

region String

region) The region in which the Database Instance should be created.

settings Map<String,String>

Map of engine settings to be set. Using this option will override default config.

tags List<String>

The tags associated with the Database Instance.

userName String

Identifier for the first user of the database instance.

volumeSizeInGb Integer

Volume size (in GB) when volume_type is set to bssd. Must be a multiple of 5000000000.

volumeType String

Type of volume where data are stored (bssd or lssd).

engine string

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

nodeType string

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

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.

initSettings {[key: string]: string}

Map of engine settings to be set at database initialisation.

isHaCluster boolean

Enable or disable high availability for the database instance.

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 string

project_id) The ID of the project the Database Instance is associated with.

region string

region) The region in which the Database Instance should be created.

settings {[key: string]: string}

Map of engine settings to be set. Using this option will override default config.

tags string[]

The tags associated with the Database Instance.

userName string

Identifier for the first user of the database instance.

volumeSizeInGb number

Volume size (in GB) when volume_type is set to bssd. Must be a multiple of 5000000000.

volumeType string

Type of volume where data are stored (bssd or lssd).

engine str

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

node_type str

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

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.

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

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 str

project_id) The ID of the project the Database Instance is associated with.

region str

region) The region in which the Database Instance should be created.

settings Mapping[str, str]

Map of engine settings to be set. Using this option will override default config.

tags Sequence[str]

The tags associated with the Database Instance.

user_name str

Identifier for the first user of the database instance.

volume_size_in_gb int

Volume size (in GB) when volume_type is set to bssd. Must be a multiple of 5000000000.

volume_type str

Type of volume where data are stored (bssd or lssd).

engine String

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

nodeType String

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

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.

initSettings Map<String>

Map of engine settings to be set at database initialisation.

isHaCluster Boolean

Enable or disable high availability for the database instance.

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 String

project_id) The ID of the project the Database Instance is associated with.

region String

region) The region in which the Database Instance should be created.

settings Map<String>

Map of engine settings to be set. Using this option will override default config.

tags List<String>

The tags associated with the Database Instance.

userName String

Identifier for the first user of the database instance.

volumeSizeInGb Number

Volume size (in GB) when volume_type is set to bssd. Must be a multiple of 5000000000.

volumeType String

Type of volume where data are stored (bssd or lssd).

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.

Deprecated:

Please use the private_network or the load_balancer attribute

EndpointPort int

(Deprecated) The port of the Database Instance.

Id string

The provider-assigned unique ID for this managed resource.

LoadBalancers List<Lbrlabs.PulumiPackage.Scaleway.Outputs.DatabaseInstanceLoadBalancer>

List of load balancer endpoints of the database instance.

OrganizationId string

The organization ID the Database Instance is associated with.

ReadReplicas List<Lbrlabs.PulumiPackage.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.

Deprecated:

Please use the private_network or the load_balancer attribute

EndpointPort int

(Deprecated) The port of the Database Instance.

Id string

The provider-assigned unique ID for this managed resource.

LoadBalancers []DatabaseInstanceLoadBalancer

List of load balancer endpoints of the database instance.

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.

Deprecated:

Please use the private_network or the load_balancer attribute

endpointPort Integer

(Deprecated) The port of the Database Instance.

id String

The provider-assigned unique ID for this managed resource.

loadBalancers List<DatabaseInstanceLoadBalancer>

List of load balancer endpoints of the database instance.

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.

Deprecated:

Please use the private_network or the load_balancer attribute

endpointPort number

(Deprecated) The port of the Database Instance.

id string

The provider-assigned unique ID for this managed resource.

loadBalancers DatabaseInstanceLoadBalancer[]

List of load balancer endpoints of the database instance.

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.

Deprecated:

Please use the private_network or the load_balancer attribute

endpoint_port int

(Deprecated) The port of the Database Instance.

id str

The provider-assigned unique ID for this managed resource.

load_balancers Sequence[DatabaseInstanceLoadBalancer]

List of load balancer endpoints of the database instance.

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.

Deprecated:

Please use the private_network or the load_balancer attribute

endpointPort Number

(Deprecated) The port of the Database Instance.

id String

The provider-assigned unique ID for this managed resource.

loadBalancers List<Property Map>

List of load balancer endpoints of the database instance.

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,
        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,
        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,
        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)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
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.

EndpointIp string

(Deprecated) The IP of the Database Instance.

Deprecated:

Please use the private_network or the load_balancer attribute

EndpointPort int

(Deprecated) The port of the Database Instance.

Engine string

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

InitSettings Dictionary<string, string>

Map of engine settings to be set at database initialisation.

IsHaCluster bool

Enable or disable high availability for the database instance.

LoadBalancers List<Lbrlabs.PulumiPackage.Scaleway.Inputs.DatabaseInstanceLoadBalancerArgs>

List of load balancer endpoints of the database instance.

Name string

The name of the Database Instance.

NodeType string

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

OrganizationId string

The organization ID the Database Instance is associated with.

Password string

Password for the first user of the database instance.

PrivateNetwork Lbrlabs.PulumiPackage.Scaleway.Inputs.DatabaseInstancePrivateNetworkArgs

List of private networks endpoints of the database instance.

ProjectId string

project_id) The ID of the project the Database Instance is associated with.

ReadReplicas List<Lbrlabs.PulumiPackage.Scaleway.Inputs.DatabaseInstanceReadReplicaArgs>

List of read replicas of the database instance.

Region string

region) The region in which the Database Instance should be created.

Settings Dictionary<string, string>

Map of engine settings to be set. Using this option will override default config.

Tags List<string>

The tags associated with the Database Instance.

UserName string

Identifier for the first user of the database instance.

VolumeSizeInGb int

Volume size (in GB) when volume_type is set to bssd. Must be a multiple of 5000000000.

VolumeType string

Type of volume where data are stored (bssd or lssd).

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.

EndpointIp string

(Deprecated) The IP of the Database Instance.

Deprecated:

Please use the private_network or the load_balancer attribute

EndpointPort int

(Deprecated) The port of the Database Instance.

Engine string

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

InitSettings map[string]string

Map of engine settings to be set at database initialisation.

IsHaCluster bool

Enable or disable high availability for the database instance.

LoadBalancers []DatabaseInstanceLoadBalancerArgs

List of load balancer endpoints of the database instance.

Name string

The name of the Database Instance.

NodeType string

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

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 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 string

region) The region in which the Database Instance should be created.

Settings map[string]string

Map of engine settings to be set. Using this option will override default config.

Tags []string

The tags associated with the Database Instance.

UserName string

Identifier for the first user of the database instance.

VolumeSizeInGb int

Volume size (in GB) when volume_type is set to bssd. Must be a multiple of 5000000000.

VolumeType string

Type of volume where data are stored (bssd or lssd).

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.

endpointIp String

(Deprecated) The IP of the Database Instance.

Deprecated:

Please use the private_network or the load_balancer attribute

endpointPort Integer

(Deprecated) The port of the Database Instance.

engine String

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

initSettings Map<String,String>

Map of engine settings to be set at database initialisation.

isHaCluster Boolean

Enable or disable high availability for the database instance.

loadBalancers List<DatabaseInstanceLoadBalancerArgs>

List of load balancer endpoints of the database instance.

name String

The name of the Database Instance.

nodeType String

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

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 String

project_id) The ID of the project the Database Instance is associated with.

readReplicas List<DatabaseInstanceReadReplicaArgs>

List of read replicas of the database instance.

region String

region) The region in which the Database Instance should be created.

settings Map<String,String>

Map of engine settings to be set. Using this option will override default config.

tags List<String>

The tags associated with the Database Instance.

userName String

Identifier for the first user of the database instance.

volumeSizeInGb Integer

Volume size (in GB) when volume_type is set to bssd. Must be a multiple of 5000000000.

volumeType String

Type of volume where data are stored (bssd or lssd).

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.

endpointIp string

(Deprecated) The IP of the Database Instance.

Deprecated:

Please use the private_network or the load_balancer attribute

endpointPort number

(Deprecated) The port of the Database Instance.

engine string

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

initSettings {[key: string]: string}

Map of engine settings to be set at database initialisation.

isHaCluster boolean

Enable or disable high availability for the database instance.

loadBalancers DatabaseInstanceLoadBalancerArgs[]

List of load balancer endpoints of the database instance.

name string

The name of the Database Instance.

nodeType string

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

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 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 string

region) The region in which the Database Instance should be created.

settings {[key: string]: string}

Map of engine settings to be set. Using this option will override default config.

tags string[]

The tags associated with the Database Instance.

userName string

Identifier for the first user of the database instance.

volumeSizeInGb number

Volume size (in GB) when volume_type is set to bssd. Must be a multiple of 5000000000.

volumeType string

Type of volume where data are stored (bssd or lssd).

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.

endpoint_ip str

(Deprecated) The IP of the Database Instance.

Deprecated:

Please use the private_network or the load_balancer attribute

endpoint_port int

(Deprecated) The port of the Database Instance.

engine str

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

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

load_balancers Sequence[DatabaseInstanceLoadBalancerArgs]

List of load balancer endpoints of the database instance.

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

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 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 str

region) The region in which the Database Instance should be created.

settings Mapping[str, str]

Map of engine settings to be set. Using this option will override default config.

tags Sequence[str]

The tags associated with the Database Instance.

user_name str

Identifier for the first user of the database instance.

volume_size_in_gb int

Volume size (in GB) when volume_type is set to bssd. Must be a multiple of 5000000000.

volume_type str

Type of volume where data are stored (bssd or lssd).

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.

endpointIp String

(Deprecated) The IP of the Database Instance.

Deprecated:

Please use the private_network or the load_balancer attribute

endpointPort Number

(Deprecated) The port of the Database Instance.

engine String

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

initSettings Map<String>

Map of engine settings to be set at database initialisation.

isHaCluster Boolean

Enable or disable high availability for the database instance.

loadBalancers List<Property Map>

List of load balancer endpoints of the database instance.

name String

The name of the Database Instance.

nodeType String

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

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 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 String

region) The region in which the Database Instance should be created.

settings Map<String>

Map of engine settings to be set. Using this option will override default config.

tags List<String>

The tags associated with the Database Instance.

userName String

Identifier for the first user of the database instance.

volumeSizeInGb Number

Volume size (in GB) when volume_type is set to bssd. Must be a multiple of 5000000000.

volumeType String

Type of volume where data are stored (bssd or lssd).

Supporting Types

DatabaseInstanceLoadBalancer

EndpointId string

The ID of the endpoint of the private network.

Hostname string

Name of the endpoint.

Ip string

IP of the endpoint.

Name string

The name of the Database Instance.

Port int

Port of the endpoint.

EndpointId string

The ID of the endpoint of the private network.

Hostname string

Name of the endpoint.

Ip string

IP of the endpoint.

Name string

The name of the Database Instance.

Port int

Port of the endpoint.

endpointId String

The ID of the endpoint of the private network.

hostname String

Name of the endpoint.

ip String

IP of the endpoint.

name String

The name of the Database Instance.

port Integer

Port of the endpoint.

endpointId string

The ID of the endpoint of the private network.

hostname string

Name of the endpoint.

ip string

IP of the endpoint.

name string

The name of the Database Instance.

port number

Port of the endpoint.

endpoint_id str

The ID of the endpoint of the private network.

hostname str

Name of the endpoint.

ip str

IP of the endpoint.

name str

The name of the Database Instance.

port int

Port of the endpoint.

endpointId String

The ID of the endpoint of the private network.

hostname String

Name of the endpoint.

ip String

IP of the endpoint.

name String

The name of the Database Instance.

port Number

Port of the endpoint.

DatabaseInstancePrivateNetwork

IpNet string
PnId string
EndpointId string

The ID of the endpoint of the private network.

Hostname string

Name of the endpoint.

Ip string

IP of the endpoint.

Name string

The name of the Database Instance.

Port int

Port of the endpoint.

Zone string
IpNet string
PnId string
EndpointId string

The ID of the endpoint of the private network.

Hostname string

Name of the endpoint.

Ip string

IP of the endpoint.

Name string

The name of the Database Instance.

Port int

Port of the endpoint.

Zone string
ipNet String
pnId String
endpointId String

The ID of the endpoint of the private network.

hostname String

Name of the endpoint.

ip String

IP of the endpoint.

name String

The name of the Database Instance.

port Integer

Port of the endpoint.

zone String
ipNet string
pnId string
endpointId string

The ID of the endpoint of the private network.

hostname string

Name of the endpoint.

ip string

IP of the endpoint.

name string

The name of the Database Instance.

port number

Port of the endpoint.

zone string
ip_net str
pn_id str
endpoint_id str

The ID of the endpoint of the private network.

hostname str

Name of the endpoint.

ip str

IP of the endpoint.

name str

The name of the Database Instance.

port int

Port of the endpoint.

zone str
ipNet String
pnId String
endpointId String

The ID of the endpoint of the private network.

hostname String

Name of the endpoint.

ip String

IP of the endpoint.

name String

The name of the Database Instance.

port Number

Port of the endpoint.

zone String

DatabaseInstanceReadReplica

Ip string

IP of the endpoint.

Name string

The name of the Database Instance.

Port int

Port of the endpoint.

Ip string

IP of the endpoint.

Name string

The name of the Database Instance.

Port int

Port of the endpoint.

ip String

IP of the endpoint.

name String

The name of the Database Instance.

port Integer

Port of the endpoint.

ip string

IP of the endpoint.

name string

The name of the Database Instance.

port number

Port of the endpoint.

ip str

IP of the endpoint.

name str

The name of the Database Instance.

port int

Port of the endpoint.

ip String

IP of the endpoint.

name String

The name of the Database Instance.

port Number

Port of the endpoint.

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

Package Details

Repository
scaleway lbrlabs/pulumi-scaleway
License
Apache-2.0
Notes

This Pulumi package is based on the scaleway Terraform Provider.