1. Packages
  2. Selectel Provider
  3. API Docs
  4. DbaasDatabaseV1
selectel 6.4.0 published on Monday, Apr 14, 2025 by selectel

selectel.DbaasDatabaseV1

Explore with Pulumi AI

WARNING: This resource is deprecated and is going to be removed soon. You should use database resource for specific datastore type.

Manages a V1 database resource within Selectel Managed Databases Service.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as selectel from "@pulumi/selectel";

const project1 = new selectel.VpcProjectV2("project1", {});
const subnet = new selectel.VpcSubnetV2("subnet", {
    projectId: project1.vpcProjectV2Id,
    region: "ru-3",
});
const dt = selectel.getDbaasDatastoreTypeV1Output({
    projectId: project1.vpcProjectV2Id,
    region: "ru-3",
    filters: [{
        engine: "postgresql",
        version: "12",
    }],
});
const datastore1 = new selectel.DbaasDatastoreV1("datastore1", {
    projectId: project1.vpcProjectV2Id,
    region: "ru-3",
    typeId: dt.apply(dt => dt.datastoreTypes?.[0]?.id),
    subnetId: subnet.subnetId,
    nodeCount: 3,
    flavors: [{
        vcpus: 4,
        ram: 4096,
        disk: 32,
    }],
    poolers: [{
        mode: "transaction",
        size: 50,
    }],
});
const user1 = new selectel.DbaasUserV1("user1", {
    projectId: project1.vpcProjectV2Id,
    region: "ru-3",
    datastoreId: datastore1.dbaasDatastoreV1Id,
    password: "secret",
});
const database1 = new selectel.DbaasDatabaseV1("database1", {
    projectId: project1.vpcProjectV2Id,
    region: "ru-3",
    datastoreId: datastore1.dbaasDatastoreV1Id,
    ownerId: user1.dbaasUserV1Id,
    lcCtype: "ru_RU.utf8",
    lcCollate: "ru_RU.utf8",
});
Copy
import pulumi
import pulumi_selectel as selectel

project1 = selectel.VpcProjectV2("project1")
subnet = selectel.VpcSubnetV2("subnet",
    project_id=project1.vpc_project_v2_id,
    region="ru-3")
dt = selectel.get_dbaas_datastore_type_v1_output(project_id=project1.vpc_project_v2_id,
    region="ru-3",
    filters=[{
        "engine": "postgresql",
        "version": "12",
    }])
datastore1 = selectel.DbaasDatastoreV1("datastore1",
    project_id=project1.vpc_project_v2_id,
    region="ru-3",
    type_id=dt.datastore_types[0].id,
    subnet_id=subnet.subnet_id,
    node_count=3,
    flavors=[{
        "vcpus": 4,
        "ram": 4096,
        "disk": 32,
    }],
    poolers=[{
        "mode": "transaction",
        "size": 50,
    }])
user1 = selectel.DbaasUserV1("user1",
    project_id=project1.vpc_project_v2_id,
    region="ru-3",
    datastore_id=datastore1.dbaas_datastore_v1_id,
    password="secret")
database1 = selectel.DbaasDatabaseV1("database1",
    project_id=project1.vpc_project_v2_id,
    region="ru-3",
    datastore_id=datastore1.dbaas_datastore_v1_id,
    owner_id=user1.dbaas_user_v1_id,
    lc_ctype="ru_RU.utf8",
    lc_collate="ru_RU.utf8")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v6/selectel"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		project1, err := selectel.NewVpcProjectV2(ctx, "project1", nil)
		if err != nil {
			return err
		}
		subnet, err := selectel.NewVpcSubnetV2(ctx, "subnet", &selectel.VpcSubnetV2Args{
			ProjectId: project1.VpcProjectV2Id,
			Region:    pulumi.String("ru-3"),
		})
		if err != nil {
			return err
		}
		dt := selectel.GetDbaasDatastoreTypeV1Output(ctx, selectel.GetDbaasDatastoreTypeV1OutputArgs{
			ProjectId: project1.VpcProjectV2Id,
			Region:    pulumi.String("ru-3"),
			Filters: selectel.GetDbaasDatastoreTypeV1FilterArray{
				&selectel.GetDbaasDatastoreTypeV1FilterArgs{
					Engine:  pulumi.String("postgresql"),
					Version: pulumi.String("12"),
				},
			},
		}, nil)
		datastore1, err := selectel.NewDbaasDatastoreV1(ctx, "datastore1", &selectel.DbaasDatastoreV1Args{
			ProjectId: project1.VpcProjectV2Id,
			Region:    pulumi.String("ru-3"),
			TypeId: pulumi.String(dt.ApplyT(func(dt selectel.GetDbaasDatastoreTypeV1Result) (*string, error) {
				return &dt.DatastoreTypes[0].Id, nil
			}).(pulumi.StringPtrOutput)),
			SubnetId:  subnet.SubnetId,
			NodeCount: pulumi.Float64(3),
			Flavors: selectel.DbaasDatastoreV1FlavorArray{
				&selectel.DbaasDatastoreV1FlavorArgs{
					Vcpus: pulumi.Float64(4),
					Ram:   pulumi.Float64(4096),
					Disk:  pulumi.Float64(32),
				},
			},
			Poolers: selectel.DbaasDatastoreV1PoolerArray{
				&selectel.DbaasDatastoreV1PoolerArgs{
					Mode: pulumi.String("transaction"),
					Size: pulumi.Float64(50),
				},
			},
		})
		if err != nil {
			return err
		}
		user1, err := selectel.NewDbaasUserV1(ctx, "user1", &selectel.DbaasUserV1Args{
			ProjectId:   project1.VpcProjectV2Id,
			Region:      pulumi.String("ru-3"),
			DatastoreId: datastore1.DbaasDatastoreV1Id,
			Password:    pulumi.String("secret"),
		})
		if err != nil {
			return err
		}
		_, err = selectel.NewDbaasDatabaseV1(ctx, "database1", &selectel.DbaasDatabaseV1Args{
			ProjectId:   project1.VpcProjectV2Id,
			Region:      pulumi.String("ru-3"),
			DatastoreId: datastore1.DbaasDatastoreV1Id,
			OwnerId:     user1.DbaasUserV1Id,
			LcCtype:     pulumi.String("ru_RU.utf8"),
			LcCollate:   pulumi.String("ru_RU.utf8"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Selectel = Pulumi.Selectel;

return await Deployment.RunAsync(() => 
{
    var project1 = new Selectel.VpcProjectV2("project1");

    var subnet = new Selectel.VpcSubnetV2("subnet", new()
    {
        ProjectId = project1.VpcProjectV2Id,
        Region = "ru-3",
    });

    var dt = Selectel.GetDbaasDatastoreTypeV1.Invoke(new()
    {
        ProjectId = project1.VpcProjectV2Id,
        Region = "ru-3",
        Filters = new[]
        {
            new Selectel.Inputs.GetDbaasDatastoreTypeV1FilterInputArgs
            {
                Engine = "postgresql",
                Version = "12",
            },
        },
    });

    var datastore1 = new Selectel.DbaasDatastoreV1("datastore1", new()
    {
        ProjectId = project1.VpcProjectV2Id,
        Region = "ru-3",
        TypeId = dt.Apply(getDbaasDatastoreTypeV1Result => getDbaasDatastoreTypeV1Result.DatastoreTypes[0]?.Id),
        SubnetId = subnet.SubnetId,
        NodeCount = 3,
        Flavors = new[]
        {
            new Selectel.Inputs.DbaasDatastoreV1FlavorArgs
            {
                Vcpus = 4,
                Ram = 4096,
                Disk = 32,
            },
        },
        Poolers = new[]
        {
            new Selectel.Inputs.DbaasDatastoreV1PoolerArgs
            {
                Mode = "transaction",
                Size = 50,
            },
        },
    });

    var user1 = new Selectel.DbaasUserV1("user1", new()
    {
        ProjectId = project1.VpcProjectV2Id,
        Region = "ru-3",
        DatastoreId = datastore1.DbaasDatastoreV1Id,
        Password = "secret",
    });

    var database1 = new Selectel.DbaasDatabaseV1("database1", new()
    {
        ProjectId = project1.VpcProjectV2Id,
        Region = "ru-3",
        DatastoreId = datastore1.DbaasDatastoreV1Id,
        OwnerId = user1.DbaasUserV1Id,
        LcCtype = "ru_RU.utf8",
        LcCollate = "ru_RU.utf8",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.selectel.VpcProjectV2;
import com.pulumi.selectel.VpcSubnetV2;
import com.pulumi.selectel.VpcSubnetV2Args;
import com.pulumi.selectel.SelectelFunctions;
import com.pulumi.selectel.inputs.GetDbaasDatastoreTypeV1Args;
import com.pulumi.selectel.DbaasDatastoreV1;
import com.pulumi.selectel.DbaasDatastoreV1Args;
import com.pulumi.selectel.inputs.DbaasDatastoreV1FlavorArgs;
import com.pulumi.selectel.inputs.DbaasDatastoreV1PoolerArgs;
import com.pulumi.selectel.DbaasUserV1;
import com.pulumi.selectel.DbaasUserV1Args;
import com.pulumi.selectel.DbaasDatabaseV1;
import com.pulumi.selectel.DbaasDatabaseV1Args;
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 project1 = new VpcProjectV2("project1");

        var subnet = new VpcSubnetV2("subnet", VpcSubnetV2Args.builder()
            .projectId(project1.vpcProjectV2Id())
            .region("ru-3")
            .build());

        final var dt = SelectelFunctions.getDbaasDatastoreTypeV1(GetDbaasDatastoreTypeV1Args.builder()
            .projectId(project1.vpcProjectV2Id())
            .region("ru-3")
            .filters(GetDbaasDatastoreTypeV1FilterArgs.builder()
                .engine("postgresql")
                .version("12")
                .build())
            .build());

        var datastore1 = new DbaasDatastoreV1("datastore1", DbaasDatastoreV1Args.builder()
            .projectId(project1.vpcProjectV2Id())
            .region("ru-3")
            .typeId(dt.applyValue(getDbaasDatastoreTypeV1Result -> getDbaasDatastoreTypeV1Result).applyValue(dt -> dt.applyValue(getDbaasDatastoreTypeV1Result -> getDbaasDatastoreTypeV1Result.datastoreTypes()[0].id())))
            .subnetId(subnet.subnetId())
            .nodeCount(3)
            .flavors(DbaasDatastoreV1FlavorArgs.builder()
                .vcpus(4)
                .ram(4096)
                .disk(32)
                .build())
            .poolers(DbaasDatastoreV1PoolerArgs.builder()
                .mode("transaction")
                .size(50)
                .build())
            .build());

        var user1 = new DbaasUserV1("user1", DbaasUserV1Args.builder()
            .projectId(project1.vpcProjectV2Id())
            .region("ru-3")
            .datastoreId(datastore1.dbaasDatastoreV1Id())
            .password("secret")
            .build());

        var database1 = new DbaasDatabaseV1("database1", DbaasDatabaseV1Args.builder()
            .projectId(project1.vpcProjectV2Id())
            .region("ru-3")
            .datastoreId(datastore1.dbaasDatastoreV1Id())
            .ownerId(user1.dbaasUserV1Id())
            .lcCtype("ru_RU.utf8")
            .lcCollate("ru_RU.utf8")
            .build());

    }
}
Copy
resources:
  project1:
    type: selectel:VpcProjectV2
  subnet:
    type: selectel:VpcSubnetV2
    properties:
      projectId: ${project1.vpcProjectV2Id}
      region: ru-3
  datastore1:
    type: selectel:DbaasDatastoreV1
    properties:
      projectId: ${project1.vpcProjectV2Id}
      region: ru-3
      typeId: ${dt.datastoreTypes[0].id}
      subnetId: ${subnet.subnetId}
      nodeCount: 3
      flavors:
        - vcpus: 4
          ram: 4096
          disk: 32
      poolers:
        - mode: transaction
          size: 50
  user1:
    type: selectel:DbaasUserV1
    properties:
      projectId: ${project1.vpcProjectV2Id}
      region: ru-3
      datastoreId: ${datastore1.dbaasDatastoreV1Id}
      password: secret
  database1:
    type: selectel:DbaasDatabaseV1
    properties:
      projectId: ${project1.vpcProjectV2Id}
      region: ru-3
      datastoreId: ${datastore1.dbaasDatastoreV1Id}
      ownerId: ${user1.dbaasUserV1Id}
      lcCtype: ru_RU.utf8
      lcCollate: ru_RU.utf8
variables:
  dt:
    fn::invoke:
      function: selectel:getDbaasDatastoreTypeV1
      arguments:
        projectId: ${project1.vpcProjectV2Id}
        region: ru-3
        filters:
          - engine: postgresql
            version: '12'
Copy

Create DbaasDatabaseV1 Resource

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

Constructor syntax

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

@overload
def DbaasDatabaseV1(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    datastore_id: Optional[str] = None,
                    project_id: Optional[str] = None,
                    region: Optional[str] = None,
                    dbaas_database_v1_id: Optional[str] = None,
                    lc_collate: Optional[str] = None,
                    lc_ctype: Optional[str] = None,
                    name: Optional[str] = None,
                    owner_id: Optional[str] = None,
                    timeouts: Optional[DbaasDatabaseV1TimeoutsArgs] = None)
func NewDbaasDatabaseV1(ctx *Context, name string, args DbaasDatabaseV1Args, opts ...ResourceOption) (*DbaasDatabaseV1, error)
public DbaasDatabaseV1(string name, DbaasDatabaseV1Args args, CustomResourceOptions? opts = null)
public DbaasDatabaseV1(String name, DbaasDatabaseV1Args args)
public DbaasDatabaseV1(String name, DbaasDatabaseV1Args args, CustomResourceOptions options)
type: selectel:DbaasDatabaseV1
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. DbaasDatabaseV1Args
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. DbaasDatabaseV1Args
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. DbaasDatabaseV1Args
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. DbaasDatabaseV1Args
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. DbaasDatabaseV1Args
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var dbaasDatabaseV1Resource = new Selectel.DbaasDatabaseV1("dbaasDatabaseV1Resource", new()
{
    DatastoreId = "string",
    ProjectId = "string",
    Region = "string",
    DbaasDatabaseV1Id = "string",
    LcCollate = "string",
    LcCtype = "string",
    Name = "string",
    OwnerId = "string",
    Timeouts = new Selectel.Inputs.DbaasDatabaseV1TimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Update = "string",
    },
});
Copy
example, err := selectel.NewDbaasDatabaseV1(ctx, "dbaasDatabaseV1Resource", &selectel.DbaasDatabaseV1Args{
DatastoreId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Region: pulumi.String("string"),
DbaasDatabaseV1Id: pulumi.String("string"),
LcCollate: pulumi.String("string"),
LcCtype: pulumi.String("string"),
Name: pulumi.String("string"),
OwnerId: pulumi.String("string"),
Timeouts: &.DbaasDatabaseV1TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
Copy
var dbaasDatabaseV1Resource = new DbaasDatabaseV1("dbaasDatabaseV1Resource", DbaasDatabaseV1Args.builder()
    .datastoreId("string")
    .projectId("string")
    .region("string")
    .dbaasDatabaseV1Id("string")
    .lcCollate("string")
    .lcCtype("string")
    .name("string")
    .ownerId("string")
    .timeouts(DbaasDatabaseV1TimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .update("string")
        .build())
    .build());
Copy
dbaas_database_v1_resource = selectel.DbaasDatabaseV1("dbaasDatabaseV1Resource",
    datastore_id="string",
    project_id="string",
    region="string",
    dbaas_database_v1_id="string",
    lc_collate="string",
    lc_ctype="string",
    name="string",
    owner_id="string",
    timeouts={
        "create": "string",
        "delete": "string",
        "update": "string",
    })
Copy
const dbaasDatabaseV1Resource = new selectel.DbaasDatabaseV1("dbaasDatabaseV1Resource", {
    datastoreId: "string",
    projectId: "string",
    region: "string",
    dbaasDatabaseV1Id: "string",
    lcCollate: "string",
    lcCtype: "string",
    name: "string",
    ownerId: "string",
    timeouts: {
        create: "string",
        "delete": "string",
        update: "string",
    },
});
Copy
type: selectel:DbaasDatabaseV1
properties:
    datastoreId: string
    dbaasDatabaseV1Id: string
    lcCollate: string
    lcCtype: string
    name: string
    ownerId: string
    projectId: string
    region: string
    timeouts:
        create: string
        delete: string
        update: string
Copy

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

DatastoreId This property is required. string
An associated datastore. Changing this creates a new database.
ProjectId This property is required. string
An associated Selectel VPC project. Changing this creates a new database.
Region This property is required. string
A Selectel VPC region of where the database is located. Changing this creates a new database.
DbaasDatabaseV1Id string
LcCollate string
A lc_collate option for the PostreSQL datastore.
LcCtype string
A lc_ctype option for the PostreSQL datastore.
Name string
A name of the database. Changing this creates a new database.
OwnerId string
Owner of the database. Required only for the PostgreSQL datastore. Can be omitted for the MySQL datastore.
Timeouts DbaasDatabaseV1Timeouts
DatastoreId This property is required. string
An associated datastore. Changing this creates a new database.
ProjectId This property is required. string
An associated Selectel VPC project. Changing this creates a new database.
Region This property is required. string
A Selectel VPC region of where the database is located. Changing this creates a new database.
DbaasDatabaseV1Id string
LcCollate string
A lc_collate option for the PostreSQL datastore.
LcCtype string
A lc_ctype option for the PostreSQL datastore.
Name string
A name of the database. Changing this creates a new database.
OwnerId string
Owner of the database. Required only for the PostgreSQL datastore. Can be omitted for the MySQL datastore.
Timeouts DbaasDatabaseV1TimeoutsArgs
datastoreId This property is required. String
An associated datastore. Changing this creates a new database.
projectId This property is required. String
An associated Selectel VPC project. Changing this creates a new database.
region This property is required. String
A Selectel VPC region of where the database is located. Changing this creates a new database.
dbaasDatabaseV1Id String
lcCollate String
A lc_collate option for the PostreSQL datastore.
lcCtype String
A lc_ctype option for the PostreSQL datastore.
name String
A name of the database. Changing this creates a new database.
ownerId String
Owner of the database. Required only for the PostgreSQL datastore. Can be omitted for the MySQL datastore.
timeouts DbaasDatabaseV1Timeouts
datastoreId This property is required. string
An associated datastore. Changing this creates a new database.
projectId This property is required. string
An associated Selectel VPC project. Changing this creates a new database.
region This property is required. string
A Selectel VPC region of where the database is located. Changing this creates a new database.
dbaasDatabaseV1Id string
lcCollate string
A lc_collate option for the PostreSQL datastore.
lcCtype string
A lc_ctype option for the PostreSQL datastore.
name string
A name of the database. Changing this creates a new database.
ownerId string
Owner of the database. Required only for the PostgreSQL datastore. Can be omitted for the MySQL datastore.
timeouts DbaasDatabaseV1Timeouts
datastore_id This property is required. str
An associated datastore. Changing this creates a new database.
project_id This property is required. str
An associated Selectel VPC project. Changing this creates a new database.
region This property is required. str
A Selectel VPC region of where the database is located. Changing this creates a new database.
dbaas_database_v1_id str
lc_collate str
A lc_collate option for the PostreSQL datastore.
lc_ctype str
A lc_ctype option for the PostreSQL datastore.
name str
A name of the database. Changing this creates a new database.
owner_id str
Owner of the database. Required only for the PostgreSQL datastore. Can be omitted for the MySQL datastore.
timeouts DbaasDatabaseV1TimeoutsArgs
datastoreId This property is required. String
An associated datastore. Changing this creates a new database.
projectId This property is required. String
An associated Selectel VPC project. Changing this creates a new database.
region This property is required. String
A Selectel VPC region of where the database is located. Changing this creates a new database.
dbaasDatabaseV1Id String
lcCollate String
A lc_collate option for the PostreSQL datastore.
lcCtype String
A lc_ctype option for the PostreSQL datastore.
name String
A name of the database. Changing this creates a new database.
ownerId String
Owner of the database. Required only for the PostgreSQL datastore. Can be omitted for the MySQL datastore.
timeouts Property Map

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Status string
Shows the current status of the database.
Id string
The provider-assigned unique ID for this managed resource.
Status string
Shows the current status of the database.
id String
The provider-assigned unique ID for this managed resource.
status String
Shows the current status of the database.
id string
The provider-assigned unique ID for this managed resource.
status string
Shows the current status of the database.
id str
The provider-assigned unique ID for this managed resource.
status str
Shows the current status of the database.
id String
The provider-assigned unique ID for this managed resource.
status String
Shows the current status of the database.

Look up Existing DbaasDatabaseV1 Resource

Get an existing DbaasDatabaseV1 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?: DbaasDatabaseV1State, opts?: CustomResourceOptions): DbaasDatabaseV1
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        datastore_id: Optional[str] = None,
        dbaas_database_v1_id: Optional[str] = None,
        lc_collate: Optional[str] = None,
        lc_ctype: Optional[str] = None,
        name: Optional[str] = None,
        owner_id: Optional[str] = None,
        project_id: Optional[str] = None,
        region: Optional[str] = None,
        status: Optional[str] = None,
        timeouts: Optional[DbaasDatabaseV1TimeoutsArgs] = None) -> DbaasDatabaseV1
func GetDbaasDatabaseV1(ctx *Context, name string, id IDInput, state *DbaasDatabaseV1State, opts ...ResourceOption) (*DbaasDatabaseV1, error)
public static DbaasDatabaseV1 Get(string name, Input<string> id, DbaasDatabaseV1State? state, CustomResourceOptions? opts = null)
public static DbaasDatabaseV1 get(String name, Output<String> id, DbaasDatabaseV1State state, CustomResourceOptions options)
resources:  _:    type: selectel:DbaasDatabaseV1    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:
DatastoreId string
An associated datastore. Changing this creates a new database.
DbaasDatabaseV1Id string
LcCollate string
A lc_collate option for the PostreSQL datastore.
LcCtype string
A lc_ctype option for the PostreSQL datastore.
Name string
A name of the database. Changing this creates a new database.
OwnerId string
Owner of the database. Required only for the PostgreSQL datastore. Can be omitted for the MySQL datastore.
ProjectId string
An associated Selectel VPC project. Changing this creates a new database.
Region string
A Selectel VPC region of where the database is located. Changing this creates a new database.
Status string
Shows the current status of the database.
Timeouts DbaasDatabaseV1Timeouts
DatastoreId string
An associated datastore. Changing this creates a new database.
DbaasDatabaseV1Id string
LcCollate string
A lc_collate option for the PostreSQL datastore.
LcCtype string
A lc_ctype option for the PostreSQL datastore.
Name string
A name of the database. Changing this creates a new database.
OwnerId string
Owner of the database. Required only for the PostgreSQL datastore. Can be omitted for the MySQL datastore.
ProjectId string
An associated Selectel VPC project. Changing this creates a new database.
Region string
A Selectel VPC region of where the database is located. Changing this creates a new database.
Status string
Shows the current status of the database.
Timeouts DbaasDatabaseV1TimeoutsArgs
datastoreId String
An associated datastore. Changing this creates a new database.
dbaasDatabaseV1Id String
lcCollate String
A lc_collate option for the PostreSQL datastore.
lcCtype String
A lc_ctype option for the PostreSQL datastore.
name String
A name of the database. Changing this creates a new database.
ownerId String
Owner of the database. Required only for the PostgreSQL datastore. Can be omitted for the MySQL datastore.
projectId String
An associated Selectel VPC project. Changing this creates a new database.
region String
A Selectel VPC region of where the database is located. Changing this creates a new database.
status String
Shows the current status of the database.
timeouts DbaasDatabaseV1Timeouts
datastoreId string
An associated datastore. Changing this creates a new database.
dbaasDatabaseV1Id string
lcCollate string
A lc_collate option for the PostreSQL datastore.
lcCtype string
A lc_ctype option for the PostreSQL datastore.
name string
A name of the database. Changing this creates a new database.
ownerId string
Owner of the database. Required only for the PostgreSQL datastore. Can be omitted for the MySQL datastore.
projectId string
An associated Selectel VPC project. Changing this creates a new database.
region string
A Selectel VPC region of where the database is located. Changing this creates a new database.
status string
Shows the current status of the database.
timeouts DbaasDatabaseV1Timeouts
datastore_id str
An associated datastore. Changing this creates a new database.
dbaas_database_v1_id str
lc_collate str
A lc_collate option for the PostreSQL datastore.
lc_ctype str
A lc_ctype option for the PostreSQL datastore.
name str
A name of the database. Changing this creates a new database.
owner_id str
Owner of the database. Required only for the PostgreSQL datastore. Can be omitted for the MySQL datastore.
project_id str
An associated Selectel VPC project. Changing this creates a new database.
region str
A Selectel VPC region of where the database is located. Changing this creates a new database.
status str
Shows the current status of the database.
timeouts DbaasDatabaseV1TimeoutsArgs
datastoreId String
An associated datastore. Changing this creates a new database.
dbaasDatabaseV1Id String
lcCollate String
A lc_collate option for the PostreSQL datastore.
lcCtype String
A lc_ctype option for the PostreSQL datastore.
name String
A name of the database. Changing this creates a new database.
ownerId String
Owner of the database. Required only for the PostgreSQL datastore. Can be omitted for the MySQL datastore.
projectId String
An associated Selectel VPC project. Changing this creates a new database.
region String
A Selectel VPC region of where the database is located. Changing this creates a new database.
status String
Shows the current status of the database.
timeouts Property Map

Supporting Types

DbaasDatabaseV1Timeouts
, DbaasDatabaseV1TimeoutsArgs

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

Import

Database can be imported using the id, e.g.

export OS_DOMAIN_NAME=999999

export OS_USERNAME=example_user

export OS_PASSWORD=example_password

export INFRA_PROJECT_ID=SELECTEL_VPC_PROJECT_ID

export INFRA_REGION=SELECTEL_VPC_REGION

$ pulumi import selectel:index/dbaasDatabaseV1:DbaasDatabaseV1 database_1 b311ce58-2658-46b5-b733-7a0f418703f2
Copy

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

Package Details

Repository
selectel selectel/terraform-provider-selectel
License
Notes
This Pulumi package is based on the selectel Terraform Provider.