# danubedata.Database
Manages a managed database instance (MySQL, PostgreSQL, or MariaDB).
Example Usage
MySQL Database
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
mysql:
type: danubedata:Database
properties:
databaseName: app_production
engine: mysql
version: '8.0'
storageSizeGb: 20
memorySizeMb: 2048
cpuCores: 2
datacenter: fsn1
outputs:
mysqlEndpoint: ${mysql.endpoint}
mysqlPort: ${mysql.port}
PostgreSQL Database
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
postgres:
type: danubedata:Database
properties:
cpuCores: 4
databaseName: analytics
datacenter: fsn1
engine: postgresql
memorySizeMb: 4096
storageSizeGb: 50
version: '16'
MariaDB Database
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
mariadb:
type: danubedata:Database
properties:
cpuCores: 2
databaseName: legacy_app
datacenter: fsn1
engine: mariadb
memorySizeMb: 2048
storageSizeGb: 20
Using Resource Profile
import * as pulumi from "@pulumi/pulumi";
import * as danubedata from "@danubedata/pulumi";
const standard = new danubedata.Database("standard", {
datacenter: "fsn1",
engine: "mysql",
resourceProfile: "db-medium",
});
import pulumi
import pulumi_danubedata as danubedata
standard = danubedata.Database("standard",
datacenter="fsn1",
engine="mysql",
resource_profile="db-medium")
package main
import (
"github.com/AdrianSilaghi/pulumi-danubedata/sdk/go/danubedata"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := danubedata.NewDatabase(ctx, "standard", &danubedata.DatabaseArgs{
Datacenter: pulumi.String("fsn1"),
Engine: pulumi.String("mysql"),
ResourceProfile: pulumi.String("db-medium"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DanubeData = DanubeData.DanubeData;
return await Deployment.RunAsync(() =>
{
var standard = new DanubeData.Database("standard", new()
{
Datacenter = "fsn1",
Engine = "mysql",
ResourceProfile = "db-medium",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.danubedata.Database;
import com.pulumi.danubedata.DatabaseArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var standard = new Database("standard", DatabaseArgs.builder()
.datacenter("fsn1")
.engine("mysql")
.resourceProfile("db-medium")
.build());
}
}
resources:
standard:
type: danubedata:Database
properties:
datacenter: fsn1
engine: mysql
resourceProfile: db-medium
Notes
- Database credentials are managed separately and can be retrieved via the API.
- Storage size can only be increased, not decreased.
- Version upgrades may cause brief downtime.
Create Database Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);@overload
def Database(resource_name: str,
args: DatabaseArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Database(resource_name: str,
opts: Optional[ResourceOptions] = None,
datacenter: Optional[str] = None,
engine: Optional[str] = None,
resource_profile: Optional[str] = None,
database_name: Optional[str] = None,
name: Optional[str] = None,
parameter_group_id: Optional[str] = None,
timeouts: Optional[DatabaseTimeoutsArgs] = None,
version: Optional[str] = None)func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)
public Database(String name, DatabaseArgs args)
public Database(String name, DatabaseArgs args, CustomResourceOptions options)
type: danubedata:Database
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var databaseResource = new DanubeData.Database("databaseResource", new()
{
Datacenter = "string",
Engine = "string",
ResourceProfile = "string",
DatabaseName = "string",
Name = "string",
ParameterGroupId = "string",
Timeouts = new DanubeData.Inputs.DatabaseTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
Version = "string",
});
example, err := danubedata.NewDatabase(ctx, "databaseResource", &danubedata.DatabaseArgs{
Datacenter: pulumi.String("string"),
Engine: pulumi.String("string"),
ResourceProfile: pulumi.String("string"),
DatabaseName: pulumi.String("string"),
Name: pulumi.String("string"),
ParameterGroupId: pulumi.String("string"),
Timeouts: &danubedata.DatabaseTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
Version: pulumi.String("string"),
})
var databaseResource = new Database("databaseResource", DatabaseArgs.builder()
.datacenter("string")
.engine("string")
.resourceProfile("string")
.databaseName("string")
.name("string")
.parameterGroupId("string")
.timeouts(DatabaseTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.version("string")
.build());
database_resource = danubedata.Database("databaseResource",
datacenter="string",
engine="string",
resource_profile="string",
database_name="string",
name="string",
parameter_group_id="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
},
version="string")
const databaseResource = new danubedata.Database("databaseResource", {
datacenter: "string",
engine: "string",
resourceProfile: "string",
databaseName: "string",
name: "string",
parameterGroupId: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
version: "string",
});
type: danubedata:Database
properties:
databaseName: string
datacenter: string
engine: string
name: string
parameterGroupId: string
resourceProfile: string
timeouts:
create: string
delete: string
update: string
version: string
Database Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Database resource accepts the following input properties:
- Datacenter string
- Datacenter location (fsn1, nbg1, hel1).
- Engine string
- Database engine (mysql, postgresql, mariadb).
- Resource
Profile string - Resource profile for the database (small, medium, large).
- Database
Name string - Name of the initial database to create. Must start with a letter and contain only letters, numbers, and underscores.
- Name string
- Name of the database instance. Must be lowercase alphanumeric with hyphens (DNS compatible).
- Parameter
Group stringId - ID of the parameter group to use for custom configuration.
- Timeouts
Danube
Data. Danube Data. Inputs. Database Timeouts - Version string
- Version of the database software.
- Datacenter string
- Datacenter location (fsn1, nbg1, hel1).
- Engine string
- Database engine (mysql, postgresql, mariadb).
- Resource
Profile string - Resource profile for the database (small, medium, large).
- Database
Name string - Name of the initial database to create. Must start with a letter and contain only letters, numbers, and underscores.
- Name string
- Name of the database instance. Must be lowercase alphanumeric with hyphens (DNS compatible).
- Parameter
Group stringId - ID of the parameter group to use for custom configuration.
- Timeouts
Database
Timeouts Args - Version string
- Version of the database software.
- datacenter String
- Datacenter location (fsn1, nbg1, hel1).
- engine String
- Database engine (mysql, postgresql, mariadb).
- resource
Profile String - Resource profile for the database (small, medium, large).
- database
Name String - Name of the initial database to create. Must start with a letter and contain only letters, numbers, and underscores.
- name String
- Name of the database instance. Must be lowercase alphanumeric with hyphens (DNS compatible).
- parameter
Group StringId - ID of the parameter group to use for custom configuration.
- timeouts
Database
Timeouts - version String
- Version of the database software.
- datacenter string
- Datacenter location (fsn1, nbg1, hel1).
- engine string
- Database engine (mysql, postgresql, mariadb).
- resource
Profile string - Resource profile for the database (small, medium, large).
- database
Name string - Name of the initial database to create. Must start with a letter and contain only letters, numbers, and underscores.
- name string
- Name of the database instance. Must be lowercase alphanumeric with hyphens (DNS compatible).
- parameter
Group stringId - ID of the parameter group to use for custom configuration.
- timeouts
Database
Timeouts - version string
- Version of the database software.
- datacenter str
- Datacenter location (fsn1, nbg1, hel1).
- engine str
- Database engine (mysql, postgresql, mariadb).
- resource_
profile str - Resource profile for the database (small, medium, large).
- database_
name str - Name of the initial database to create. Must start with a letter and contain only letters, numbers, and underscores.
- name str
- Name of the database instance. Must be lowercase alphanumeric with hyphens (DNS compatible).
- parameter_
group_ strid - ID of the parameter group to use for custom configuration.
- timeouts
Database
Timeouts Args - version str
- Version of the database software.
- datacenter String
- Datacenter location (fsn1, nbg1, hel1).
- engine String
- Database engine (mysql, postgresql, mariadb).
- resource
Profile String - Resource profile for the database (small, medium, large).
- database
Name String - Name of the initial database to create. Must start with a letter and contain only letters, numbers, and underscores.
- name String
- Name of the database instance. Must be lowercase alphanumeric with hyphens (DNS compatible).
- parameter
Group StringId - ID of the parameter group to use for custom configuration.
- timeouts Property Map
- version String
- Version of the database software.
Outputs
All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:
- Cpu
Cores int - Number of CPU cores. Derived from resource_profile.
- Created
At string - Creation timestamp.
- Deployed
At string - Deployment timestamp.
- Endpoint string
- Connection endpoint hostname.
- Id string
- The provider-assigned unique ID for this managed resource.
- Memory
Size intMb - Memory size in MB. Derived from resource_profile.
- Monthly
Cost double - Estimated monthly cost.
- Monthly
Cost intCents - Monthly cost in cents.
- Port int
- Connection port.
- Status string
- Current status.
- Storage
Size intGb - Storage size in GB. Derived from resource_profile.
- Updated
At string - Timestamp when the database instance was last updated.
- Username string
- Database admin username.
- Cpu
Cores int - Number of CPU cores. Derived from resource_profile.
- Created
At string - Creation timestamp.
- Deployed
At string - Deployment timestamp.
- Endpoint string
- Connection endpoint hostname.
- Id string
- The provider-assigned unique ID for this managed resource.
- Memory
Size intMb - Memory size in MB. Derived from resource_profile.
- Monthly
Cost float64 - Estimated monthly cost.
- Monthly
Cost intCents - Monthly cost in cents.
- Port int
- Connection port.
- Status string
- Current status.
- Storage
Size intGb - Storage size in GB. Derived from resource_profile.
- Updated
At string - Timestamp when the database instance was last updated.
- Username string
- Database admin username.
- cpu
Cores Integer - Number of CPU cores. Derived from resource_profile.
- created
At String - Creation timestamp.
- deployed
At String - Deployment timestamp.
- endpoint String
- Connection endpoint hostname.
- id String
- The provider-assigned unique ID for this managed resource.
- memory
Size IntegerMb - Memory size in MB. Derived from resource_profile.
- monthly
Cost Double - Estimated monthly cost.
- monthly
Cost IntegerCents - Monthly cost in cents.
- port Integer
- Connection port.
- status String
- Current status.
- storage
Size IntegerGb - Storage size in GB. Derived from resource_profile.
- updated
At String - Timestamp when the database instance was last updated.
- username String
- Database admin username.
- cpu
Cores number - Number of CPU cores. Derived from resource_profile.
- created
At string - Creation timestamp.
- deployed
At string - Deployment timestamp.
- endpoint string
- Connection endpoint hostname.
- id string
- The provider-assigned unique ID for this managed resource.
- memory
Size numberMb - Memory size in MB. Derived from resource_profile.
- monthly
Cost number - Estimated monthly cost.
- monthly
Cost numberCents - Monthly cost in cents.
- port number
- Connection port.
- status string
- Current status.
- storage
Size numberGb - Storage size in GB. Derived from resource_profile.
- updated
At string - Timestamp when the database instance was last updated.
- username string
- Database admin username.
- cpu_
cores int - Number of CPU cores. Derived from resource_profile.
- created_
at str - Creation timestamp.
- deployed_
at str - Deployment timestamp.
- endpoint str
- Connection endpoint hostname.
- id str
- The provider-assigned unique ID for this managed resource.
- memory_
size_ intmb - Memory size in MB. Derived from resource_profile.
- monthly_
cost float - Estimated monthly cost.
- monthly_
cost_ intcents - Monthly cost in cents.
- port int
- Connection port.
- status str
- Current status.
- storage_
size_ intgb - Storage size in GB. Derived from resource_profile.
- updated_
at str - Timestamp when the database instance was last updated.
- username str
- Database admin username.
- cpu
Cores Number - Number of CPU cores. Derived from resource_profile.
- created
At String - Creation timestamp.
- deployed
At String - Deployment timestamp.
- endpoint String
- Connection endpoint hostname.
- id String
- The provider-assigned unique ID for this managed resource.
- memory
Size NumberMb - Memory size in MB. Derived from resource_profile.
- monthly
Cost Number - Estimated monthly cost.
- monthly
Cost NumberCents - Monthly cost in cents.
- port Number
- Connection port.
- status String
- Current status.
- storage
Size NumberGb - Storage size in GB. Derived from resource_profile.
- updated
At String - Timestamp when the database instance was last updated.
- username String
- Database admin username.
Look up Existing Database Resource
Get an existing Database resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DatabaseState, opts?: CustomResourceOptions): Database@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cpu_cores: Optional[int] = None,
created_at: Optional[str] = None,
database_name: Optional[str] = None,
datacenter: Optional[str] = None,
deployed_at: Optional[str] = None,
endpoint: Optional[str] = None,
engine: Optional[str] = None,
memory_size_mb: Optional[int] = None,
monthly_cost: Optional[float] = None,
monthly_cost_cents: Optional[int] = None,
name: Optional[str] = None,
parameter_group_id: Optional[str] = None,
port: Optional[int] = None,
resource_profile: Optional[str] = None,
status: Optional[str] = None,
storage_size_gb: Optional[int] = None,
timeouts: Optional[DatabaseTimeoutsArgs] = None,
updated_at: Optional[str] = None,
username: Optional[str] = None,
version: Optional[str] = None) -> Databasefunc GetDatabase(ctx *Context, name string, id IDInput, state *DatabaseState, opts ...ResourceOption) (*Database, error)public static Database Get(string name, Input<string> id, DatabaseState? state, CustomResourceOptions? opts = null)public static Database get(String name, Output<String> id, DatabaseState state, CustomResourceOptions options)resources: _: type: danubedata:Database get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Cpu
Cores int - Number of CPU cores. Derived from resource_profile.
- Created
At string - Creation timestamp.
- Database
Name string - Name of the initial database to create. Must start with a letter and contain only letters, numbers, and underscores.
- Datacenter string
- Datacenter location (fsn1, nbg1, hel1).
- Deployed
At string - Deployment timestamp.
- Endpoint string
- Connection endpoint hostname.
- Engine string
- Database engine (mysql, postgresql, mariadb).
- Memory
Size intMb - Memory size in MB. Derived from resource_profile.
- Monthly
Cost double - Estimated monthly cost.
- Monthly
Cost intCents - Monthly cost in cents.
- Name string
- Name of the database instance. Must be lowercase alphanumeric with hyphens (DNS compatible).
- Parameter
Group stringId - ID of the parameter group to use for custom configuration.
- Port int
- Connection port.
- Resource
Profile string - Resource profile for the database (small, medium, large).
- Status string
- Current status.
- Storage
Size intGb - Storage size in GB. Derived from resource_profile.
- Timeouts
Danube
Data. Danube Data. Inputs. Database Timeouts - Updated
At string - Timestamp when the database instance was last updated.
- Username string
- Database admin username.
- Version string
- Version of the database software.
- Cpu
Cores int - Number of CPU cores. Derived from resource_profile.
- Created
At string - Creation timestamp.
- Database
Name string - Name of the initial database to create. Must start with a letter and contain only letters, numbers, and underscores.
- Datacenter string
- Datacenter location (fsn1, nbg1, hel1).
- Deployed
At string - Deployment timestamp.
- Endpoint string
- Connection endpoint hostname.
- Engine string
- Database engine (mysql, postgresql, mariadb).
- Memory
Size intMb - Memory size in MB. Derived from resource_profile.
- Monthly
Cost float64 - Estimated monthly cost.
- Monthly
Cost intCents - Monthly cost in cents.
- Name string
- Name of the database instance. Must be lowercase alphanumeric with hyphens (DNS compatible).
- Parameter
Group stringId - ID of the parameter group to use for custom configuration.
- Port int
- Connection port.
- Resource
Profile string - Resource profile for the database (small, medium, large).
- Status string
- Current status.
- Storage
Size intGb - Storage size in GB. Derived from resource_profile.
- Timeouts
Database
Timeouts Args - Updated
At string - Timestamp when the database instance was last updated.
- Username string
- Database admin username.
- Version string
- Version of the database software.
- cpu
Cores Integer - Number of CPU cores. Derived from resource_profile.
- created
At String - Creation timestamp.
- database
Name String - Name of the initial database to create. Must start with a letter and contain only letters, numbers, and underscores.
- datacenter String
- Datacenter location (fsn1, nbg1, hel1).
- deployed
At String - Deployment timestamp.
- endpoint String
- Connection endpoint hostname.
- engine String
- Database engine (mysql, postgresql, mariadb).
- memory
Size IntegerMb - Memory size in MB. Derived from resource_profile.
- monthly
Cost Double - Estimated monthly cost.
- monthly
Cost IntegerCents - Monthly cost in cents.
- name String
- Name of the database instance. Must be lowercase alphanumeric with hyphens (DNS compatible).
- parameter
Group StringId - ID of the parameter group to use for custom configuration.
- port Integer
- Connection port.
- resource
Profile String - Resource profile for the database (small, medium, large).
- status String
- Current status.
- storage
Size IntegerGb - Storage size in GB. Derived from resource_profile.
- timeouts
Database
Timeouts - updated
At String - Timestamp when the database instance was last updated.
- username String
- Database admin username.
- version String
- Version of the database software.
- cpu
Cores number - Number of CPU cores. Derived from resource_profile.
- created
At string - Creation timestamp.
- database
Name string - Name of the initial database to create. Must start with a letter and contain only letters, numbers, and underscores.
- datacenter string
- Datacenter location (fsn1, nbg1, hel1).
- deployed
At string - Deployment timestamp.
- endpoint string
- Connection endpoint hostname.
- engine string
- Database engine (mysql, postgresql, mariadb).
- memory
Size numberMb - Memory size in MB. Derived from resource_profile.
- monthly
Cost number - Estimated monthly cost.
- monthly
Cost numberCents - Monthly cost in cents.
- name string
- Name of the database instance. Must be lowercase alphanumeric with hyphens (DNS compatible).
- parameter
Group stringId - ID of the parameter group to use for custom configuration.
- port number
- Connection port.
- resource
Profile string - Resource profile for the database (small, medium, large).
- status string
- Current status.
- storage
Size numberGb - Storage size in GB. Derived from resource_profile.
- timeouts
Database
Timeouts - updated
At string - Timestamp when the database instance was last updated.
- username string
- Database admin username.
- version string
- Version of the database software.
- cpu_
cores int - Number of CPU cores. Derived from resource_profile.
- created_
at str - Creation timestamp.
- database_
name str - Name of the initial database to create. Must start with a letter and contain only letters, numbers, and underscores.
- datacenter str
- Datacenter location (fsn1, nbg1, hel1).
- deployed_
at str - Deployment timestamp.
- endpoint str
- Connection endpoint hostname.
- engine str
- Database engine (mysql, postgresql, mariadb).
- memory_
size_ intmb - Memory size in MB. Derived from resource_profile.
- monthly_
cost float - Estimated monthly cost.
- monthly_
cost_ intcents - Monthly cost in cents.
- name str
- Name of the database instance. Must be lowercase alphanumeric with hyphens (DNS compatible).
- parameter_
group_ strid - ID of the parameter group to use for custom configuration.
- port int
- Connection port.
- resource_
profile str - Resource profile for the database (small, medium, large).
- status str
- Current status.
- storage_
size_ intgb - Storage size in GB. Derived from resource_profile.
- timeouts
Database
Timeouts Args - updated_
at str - Timestamp when the database instance was last updated.
- username str
- Database admin username.
- version str
- Version of the database software.
- cpu
Cores Number - Number of CPU cores. Derived from resource_profile.
- created
At String - Creation timestamp.
- database
Name String - Name of the initial database to create. Must start with a letter and contain only letters, numbers, and underscores.
- datacenter String
- Datacenter location (fsn1, nbg1, hel1).
- deployed
At String - Deployment timestamp.
- endpoint String
- Connection endpoint hostname.
- engine String
- Database engine (mysql, postgresql, mariadb).
- memory
Size NumberMb - Memory size in MB. Derived from resource_profile.
- monthly
Cost Number - Estimated monthly cost.
- monthly
Cost NumberCents - Monthly cost in cents.
- name String
- Name of the database instance. Must be lowercase alphanumeric with hyphens (DNS compatible).
- parameter
Group StringId - ID of the parameter group to use for custom configuration.
- port Number
- Connection port.
- resource
Profile String - Resource profile for the database (small, medium, large).
- status String
- Current status.
- storage
Size NumberGb - Storage size in GB. Derived from resource_profile.
- timeouts Property Map
- updated
At String - Timestamp when the database instance was last updated.
- username String
- Database admin username.
- version String
- Version of the database software.
Supporting Types
DatabaseTimeouts, DatabaseTimeoutsArgs
Import
Database instances can be imported using their ID:
bash
$ pulumi import danubedata:index/database:Database example db-abc123
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- danubedata AdrianSilaghi/pulumi-danubedata
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
danubedataTerraform Provider.
