import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides a Vultr database resource. This can be used to create, read, modify, and delete managed databases on your Vultr account. * * ## Example Usage * * Create a new database: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vultr from "@ediri/vultr"; * * const myDatabase = new vultr.Database("myDatabase", { * databaseEngine: "pg", * databaseEngineVersion: "15", * label: "my_database_label", * plan: "vultr-dbaas-startup-cc-1-55-2", * region: "ewr", * }); * ``` * * Create a new database with options: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vultr from "@ediri/vultr"; * * const myDatabase = new vultr.Database("myDatabase", { * clusterTimeZone: "America/New_York", * databaseEngine: "pg", * databaseEngineVersion: "15", * label: "my_database_label", * maintenanceDow: "sunday", * maintenanceTime: "01:00", * plan: "vultr-dbaas-startup-cc-1-55-2", * region: "ewr", * tag: "some tag", * }); * ``` * * ## Import * * Database can be imported using the database `ID`, e.g. * * ```sh * $ pulumi import vultr:index/database:Database my_database b6a859c5-b299-49dd-8888-b1abbc517d08 * ``` */ export declare class Database extends pulumi.CustomResource { /** * Get an existing Database resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: DatabaseState, opts?: pulumi.CustomResourceOptions): Database; /** * Returns true if the given object is an instance of Database. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Database; /** * The certificate to authenticate the default user (Kafka engine types only). */ readonly accessCert: pulumi.Output; /** * The private key to authenticate the default user (Kafka engine types only). */ readonly accessKey: pulumi.Output; /** * The preferred hour of the day (UTC) for daily backups to take place (unavailable for Kafka engine types). */ readonly backupHour: pulumi.Output; /** * The preferred minute of the backup hour for daily backups to take place (unavailable for Kafka engine types). */ readonly backupMinute: pulumi.Output; /** * The configured time zone for the Managed Database in TZ database format (e.g. `UTC`, `America/New_York`, `Europe/London`). */ readonly clusterTimeZone: pulumi.Output; /** * The database engine of the new managed database. */ readonly databaseEngine: pulumi.Output; /** * The database engine version of the new managed database. */ readonly databaseEngineVersion: pulumi.Output; /** * The date the managed database was added to your Vultr account. */ readonly dateCreated: pulumi.Output; /** * The managed database's default logical database. */ readonly dbname: pulumi.Output; /** * The configuration value for Kafka Connect support (Kafka engine types only). */ readonly enableKafkaConnect: pulumi.Output; /** * The configuration value for Kafka REST support (Kafka engine types only). */ readonly enableKafkaRest: pulumi.Output; /** * The configuration value for Schema Registry support (Kafka engine types only). */ readonly enableSchemaRegistry: pulumi.Output; /** * The configuration value for the data eviction policy on the managed database (Valkey engine types only - `noeviction`, `allkeys-lru`, `volatile-lru`, `allkeys-random`, `volatile-random`, `volatile-ttl`, `volatile-lfu`, `allkeys-lfu`). */ readonly evictionPolicy: pulumi.Output; readonly ferretdbCredentials: pulumi.Output<{ [key: string]: string; }>; /** * The hostname assigned to the managed database. */ readonly host: pulumi.Output; /** * The URI to access the RESTful interface of your Kafka cluster if Kafka REST is enabled (Kafka engine types only). */ readonly kafkaRestUri: pulumi.Output; /** * A label for the managed database. */ readonly label: pulumi.Output; /** * The date of the latest backup available on the managed database. */ readonly latestBackup: pulumi.Output; /** * The preferred maintenance day of week for the managed database. */ readonly maintenanceDow: pulumi.Output; /** * The preferred maintenance time for the managed database. */ readonly maintenanceTime: pulumi.Output; /** * The configuration value for the long query time (in seconds) on the managed database (MySQL engine types only). */ readonly mysqlLongQueryTime: pulumi.Output; /** * The configuration value for whether primary keys are required on the managed database (MySQL engine types only). */ readonly mysqlRequirePrimaryKey: pulumi.Output; /** * The configuration value for slow query logging on the managed database (MySQL engine types only). */ readonly mysqlSlowQueryLog: pulumi.Output; /** * A list of SQL modes to configure for the managed database (MySQL engine types only - `ALLOW_INVALID_DATES`, `ANSI`, `ANSI_QUOTES`, `ERROR_FOR_DIVISION_BY_ZERO`, `HIGH_NOT_PRECEDENCE`, `IGNORE_SPACE`, `NO_AUTO_VALUE_ON_ZERO`, `NO_DIR_IN_CREATE`, `NO_ENGINE_SUBSTITUTION`, `NO_UNSIGNED_SUBTRACTION`, `NO_ZERO_DATE`, `NO_ZERO_IN_DATE`, `ONLY_FULL_GROUP_BY`, `PIPES_AS_CONCAT`, `REAL_AS_FLOAT`, `STRICT_ALL_TABLES`, `STRICT_TRANS_TABLES`, `TIME_TRUNCATE_FRACTIONAL`, `TRADITIONAL`). */ readonly mysqlSqlModes: pulumi.Output; /** * The password for the managed database's primary admin user. */ readonly password: pulumi.Output; /** * The ID of the plan that you want the managed database to subscribe to. [See List Managed Database Plans](https://www.vultr.com/api/#tag/managed-databases/operation/list-database-plans) */ readonly plan: pulumi.Output; /** * The number of brokers available on the managed database (Kafka engine types only). */ readonly planBrokers: pulumi.Output; /** * The description of the disk(s) on the managed database. */ readonly planDisk: pulumi.Output; /** * The amount of memory available on the managed database in MB. */ readonly planRam: pulumi.Output; /** * The number of standby nodes available on the managed database (excluded for Kafka engine types). */ readonly planReplicas: pulumi.Output; /** * The number of virtual CPUs available on the managed database. */ readonly planVcpus: pulumi.Output; /** * The connection port for the managed database. */ readonly port: pulumi.Output; /** * The public hostname assigned to the managed database (VPC-attached only). */ readonly publicHost: pulumi.Output; /** * A list of read replicas attached to the managed database. */ readonly readReplicas: pulumi.Output; /** * The ID of the region that the managed database is to be created in. [See List Regions](https://www.vultr.com/api/#operation/list-regions) */ readonly region: pulumi.Output; /** * The SASL connection port for the managed database (Kafka engine types only). */ readonly saslPort: pulumi.Output; /** * The URI to access the Schema Registry service of your Kafka cluster if Schema Registry is enabled (Kafka engine types only). */ readonly schemaRegistryUri: pulumi.Output; /** * The current status of the managed database (poweroff, rebuilding, rebalancing, configuring, running). */ readonly status: pulumi.Output; /** * The tag to assign to the managed database. */ readonly tag: pulumi.Output; /** * A list of allowed IP addresses for the managed database. */ readonly trustedIps: pulumi.Output; /** * The primary admin user for the managed database. */ readonly user: pulumi.Output; /** * The ID of the VPC Network to attach to the Managed Database. */ readonly vpcId: pulumi.Output; /** * Create a Database resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: DatabaseArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Database resources. */ export interface DatabaseState { /** * The certificate to authenticate the default user (Kafka engine types only). */ accessCert?: pulumi.Input; /** * The private key to authenticate the default user (Kafka engine types only). */ accessKey?: pulumi.Input; /** * The preferred hour of the day (UTC) for daily backups to take place (unavailable for Kafka engine types). */ backupHour?: pulumi.Input; /** * The preferred minute of the backup hour for daily backups to take place (unavailable for Kafka engine types). */ backupMinute?: pulumi.Input; /** * The configured time zone for the Managed Database in TZ database format (e.g. `UTC`, `America/New_York`, `Europe/London`). */ clusterTimeZone?: pulumi.Input; /** * The database engine of the new managed database. */ databaseEngine?: pulumi.Input; /** * The database engine version of the new managed database. */ databaseEngineVersion?: pulumi.Input; /** * The date the managed database was added to your Vultr account. */ dateCreated?: pulumi.Input; /** * The managed database's default logical database. */ dbname?: pulumi.Input; /** * The configuration value for Kafka Connect support (Kafka engine types only). */ enableKafkaConnect?: pulumi.Input; /** * The configuration value for Kafka REST support (Kafka engine types only). */ enableKafkaRest?: pulumi.Input; /** * The configuration value for Schema Registry support (Kafka engine types only). */ enableSchemaRegistry?: pulumi.Input; /** * The configuration value for the data eviction policy on the managed database (Valkey engine types only - `noeviction`, `allkeys-lru`, `volatile-lru`, `allkeys-random`, `volatile-random`, `volatile-ttl`, `volatile-lfu`, `allkeys-lfu`). */ evictionPolicy?: pulumi.Input; ferretdbCredentials?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The hostname assigned to the managed database. */ host?: pulumi.Input; /** * The URI to access the RESTful interface of your Kafka cluster if Kafka REST is enabled (Kafka engine types only). */ kafkaRestUri?: pulumi.Input; /** * A label for the managed database. */ label?: pulumi.Input; /** * The date of the latest backup available on the managed database. */ latestBackup?: pulumi.Input; /** * The preferred maintenance day of week for the managed database. */ maintenanceDow?: pulumi.Input; /** * The preferred maintenance time for the managed database. */ maintenanceTime?: pulumi.Input; /** * The configuration value for the long query time (in seconds) on the managed database (MySQL engine types only). */ mysqlLongQueryTime?: pulumi.Input; /** * The configuration value for whether primary keys are required on the managed database (MySQL engine types only). */ mysqlRequirePrimaryKey?: pulumi.Input; /** * The configuration value for slow query logging on the managed database (MySQL engine types only). */ mysqlSlowQueryLog?: pulumi.Input; /** * A list of SQL modes to configure for the managed database (MySQL engine types only - `ALLOW_INVALID_DATES`, `ANSI`, `ANSI_QUOTES`, `ERROR_FOR_DIVISION_BY_ZERO`, `HIGH_NOT_PRECEDENCE`, `IGNORE_SPACE`, `NO_AUTO_VALUE_ON_ZERO`, `NO_DIR_IN_CREATE`, `NO_ENGINE_SUBSTITUTION`, `NO_UNSIGNED_SUBTRACTION`, `NO_ZERO_DATE`, `NO_ZERO_IN_DATE`, `ONLY_FULL_GROUP_BY`, `PIPES_AS_CONCAT`, `REAL_AS_FLOAT`, `STRICT_ALL_TABLES`, `STRICT_TRANS_TABLES`, `TIME_TRUNCATE_FRACTIONAL`, `TRADITIONAL`). */ mysqlSqlModes?: pulumi.Input[]>; /** * The password for the managed database's primary admin user. */ password?: pulumi.Input; /** * The ID of the plan that you want the managed database to subscribe to. [See List Managed Database Plans](https://www.vultr.com/api/#tag/managed-databases/operation/list-database-plans) */ plan?: pulumi.Input; /** * The number of brokers available on the managed database (Kafka engine types only). */ planBrokers?: pulumi.Input; /** * The description of the disk(s) on the managed database. */ planDisk?: pulumi.Input; /** * The amount of memory available on the managed database in MB. */ planRam?: pulumi.Input; /** * The number of standby nodes available on the managed database (excluded for Kafka engine types). */ planReplicas?: pulumi.Input; /** * The number of virtual CPUs available on the managed database. */ planVcpus?: pulumi.Input; /** * The connection port for the managed database. */ port?: pulumi.Input; /** * The public hostname assigned to the managed database (VPC-attached only). */ publicHost?: pulumi.Input; /** * A list of read replicas attached to the managed database. */ readReplicas?: pulumi.Input[]>; /** * The ID of the region that the managed database is to be created in. [See List Regions](https://www.vultr.com/api/#operation/list-regions) */ region?: pulumi.Input; /** * The SASL connection port for the managed database (Kafka engine types only). */ saslPort?: pulumi.Input; /** * The URI to access the Schema Registry service of your Kafka cluster if Schema Registry is enabled (Kafka engine types only). */ schemaRegistryUri?: pulumi.Input; /** * The current status of the managed database (poweroff, rebuilding, rebalancing, configuring, running). */ status?: pulumi.Input; /** * The tag to assign to the managed database. */ tag?: pulumi.Input; /** * A list of allowed IP addresses for the managed database. */ trustedIps?: pulumi.Input[]>; /** * The primary admin user for the managed database. */ user?: pulumi.Input; /** * The ID of the VPC Network to attach to the Managed Database. */ vpcId?: pulumi.Input; } /** * The set of arguments for constructing a Database resource. */ export interface DatabaseArgs { /** * The certificate to authenticate the default user (Kafka engine types only). */ accessCert?: pulumi.Input; /** * The private key to authenticate the default user (Kafka engine types only). */ accessKey?: pulumi.Input; /** * The preferred hour of the day (UTC) for daily backups to take place (unavailable for Kafka engine types). */ backupHour?: pulumi.Input; /** * The preferred minute of the backup hour for daily backups to take place (unavailable for Kafka engine types). */ backupMinute?: pulumi.Input; /** * The configured time zone for the Managed Database in TZ database format (e.g. `UTC`, `America/New_York`, `Europe/London`). */ clusterTimeZone?: pulumi.Input; /** * The database engine of the new managed database. */ databaseEngine: pulumi.Input; /** * The database engine version of the new managed database. */ databaseEngineVersion: pulumi.Input; /** * The configuration value for Kafka Connect support (Kafka engine types only). */ enableKafkaConnect?: pulumi.Input; /** * The configuration value for Kafka REST support (Kafka engine types only). */ enableKafkaRest?: pulumi.Input; /** * The configuration value for Schema Registry support (Kafka engine types only). */ enableSchemaRegistry?: pulumi.Input; /** * The configuration value for the data eviction policy on the managed database (Valkey engine types only - `noeviction`, `allkeys-lru`, `volatile-lru`, `allkeys-random`, `volatile-random`, `volatile-ttl`, `volatile-lfu`, `allkeys-lfu`). */ evictionPolicy?: pulumi.Input; ferretdbCredentials?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The URI to access the RESTful interface of your Kafka cluster if Kafka REST is enabled (Kafka engine types only). */ kafkaRestUri?: pulumi.Input; /** * A label for the managed database. */ label: pulumi.Input; /** * The preferred maintenance day of week for the managed database. */ maintenanceDow?: pulumi.Input; /** * The preferred maintenance time for the managed database. */ maintenanceTime?: pulumi.Input; /** * The configuration value for the long query time (in seconds) on the managed database (MySQL engine types only). */ mysqlLongQueryTime?: pulumi.Input; /** * The configuration value for whether primary keys are required on the managed database (MySQL engine types only). */ mysqlRequirePrimaryKey?: pulumi.Input; /** * The configuration value for slow query logging on the managed database (MySQL engine types only). */ mysqlSlowQueryLog?: pulumi.Input; /** * A list of SQL modes to configure for the managed database (MySQL engine types only - `ALLOW_INVALID_DATES`, `ANSI`, `ANSI_QUOTES`, `ERROR_FOR_DIVISION_BY_ZERO`, `HIGH_NOT_PRECEDENCE`, `IGNORE_SPACE`, `NO_AUTO_VALUE_ON_ZERO`, `NO_DIR_IN_CREATE`, `NO_ENGINE_SUBSTITUTION`, `NO_UNSIGNED_SUBTRACTION`, `NO_ZERO_DATE`, `NO_ZERO_IN_DATE`, `ONLY_FULL_GROUP_BY`, `PIPES_AS_CONCAT`, `REAL_AS_FLOAT`, `STRICT_ALL_TABLES`, `STRICT_TRANS_TABLES`, `TIME_TRUNCATE_FRACTIONAL`, `TRADITIONAL`). */ mysqlSqlModes?: pulumi.Input[]>; /** * The password for the managed database's primary admin user. */ password?: pulumi.Input; /** * The ID of the plan that you want the managed database to subscribe to. [See List Managed Database Plans](https://www.vultr.com/api/#tag/managed-databases/operation/list-database-plans) */ plan: pulumi.Input; /** * The number of brokers available on the managed database (Kafka engine types only). */ planBrokers?: pulumi.Input; /** * The description of the disk(s) on the managed database. */ planDisk?: pulumi.Input; /** * The number of standby nodes available on the managed database (excluded for Kafka engine types). */ planReplicas?: pulumi.Input; /** * The public hostname assigned to the managed database (VPC-attached only). */ publicHost?: pulumi.Input; /** * A list of read replicas attached to the managed database. */ readReplicas?: pulumi.Input[]>; /** * The ID of the region that the managed database is to be created in. [See List Regions](https://www.vultr.com/api/#operation/list-regions) */ region: pulumi.Input; /** * The SASL connection port for the managed database (Kafka engine types only). */ saslPort?: pulumi.Input; /** * The URI to access the Schema Registry service of your Kafka cluster if Schema Registry is enabled (Kafka engine types only). */ schemaRegistryUri?: pulumi.Input; /** * The tag to assign to the managed database. */ tag?: pulumi.Input; /** * A list of allowed IP addresses for the managed database. */ trustedIps?: pulumi.Input[]>; /** * The ID of the VPC Network to attach to the Managed Database. */ vpcId?: pulumi.Input; }