DatabaseMysqlConfig

class DatabaseMysqlConfig : KotlinCustomResource

Provides a virtual resource that can be used to change advanced configuration options for a DigitalOcean managed MySQL database cluster.

Note MySQL configurations are only removed from state when destroyed. The remote configuration is not unset.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const exampleDatabaseCluster = new digitalocean.DatabaseCluster("example", {
name: "example-mysql-cluster",
engine: "mysql",
version: "8",
size: digitalocean.DatabaseSlug.DB_1VPCU1GB,
region: digitalocean.Region.NYC1,
nodeCount: 1,
});
const example = new digitalocean.DatabaseMysqlConfig("example", {
clusterId: exampleDatabaseCluster.id,
connectTimeout: 10,
defaultTimeZone: "UTC",
});
import pulumi
import pulumi_digitalocean as digitalocean
example_database_cluster = digitalocean.DatabaseCluster("example",
name="example-mysql-cluster",
engine="mysql",
version="8",
size=digitalocean.DatabaseSlug.D_B_1_VPCU1_GB,
region=digitalocean.Region.NYC1,
node_count=1)
example = digitalocean.DatabaseMysqlConfig("example",
cluster_id=example_database_cluster.id,
connect_timeout=10,
default_time_zone="UTC")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
return await Deployment.RunAsync(() =>
{
var exampleDatabaseCluster = new DigitalOcean.DatabaseCluster("example", new()
{
Name = "example-mysql-cluster",
Engine = "mysql",
Version = "8",
Size = DigitalOcean.DatabaseSlug.DB_1VPCU1GB,
Region = DigitalOcean.Region.NYC1,
NodeCount = 1,
});
var example = new DigitalOcean.DatabaseMysqlConfig("example", new()
{
ClusterId = exampleDatabaseCluster.Id,
ConnectTimeout = 10,
DefaultTimeZone = "UTC",
});
});
package main
import (
"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleDatabaseCluster, err := digitalocean.NewDatabaseCluster(ctx, "example", &digitalocean.DatabaseClusterArgs{
Name: pulumi.String("example-mysql-cluster"),
Engine: pulumi.String("mysql"),
Version: pulumi.String("8"),
Size: pulumi.String(digitalocean.DatabaseSlug_DB_1VPCU1GB),
Region: pulumi.String(digitalocean.RegionNYC1),
NodeCount: pulumi.Int(1),
})
if err != nil {
return err
}
_, err = digitalocean.NewDatabaseMysqlConfig(ctx, "example", &digitalocean.DatabaseMysqlConfigArgs{
ClusterId: exampleDatabaseCluster.ID(),
ConnectTimeout: pulumi.Int(10),
DefaultTimeZone: pulumi.String("UTC"),
})
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.digitalocean.DatabaseCluster;
import com.pulumi.digitalocean.DatabaseClusterArgs;
import com.pulumi.digitalocean.DatabaseMysqlConfig;
import com.pulumi.digitalocean.DatabaseMysqlConfigArgs;
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 exampleDatabaseCluster = new DatabaseCluster("exampleDatabaseCluster", DatabaseClusterArgs.builder()
.name("example-mysql-cluster")
.engine("mysql")
.version("8")
.size("db-s-1vcpu-1gb")
.region("nyc1")
.nodeCount(1)
.build());
var example = new DatabaseMysqlConfig("example", DatabaseMysqlConfigArgs.builder()
.clusterId(exampleDatabaseCluster.id())
.connectTimeout(10)
.defaultTimeZone("UTC")
.build());
}
}
resources:
example:
type: digitalocean:DatabaseMysqlConfig
properties:
clusterId: ${exampleDatabaseCluster.id}
connectTimeout: 10
defaultTimeZone: UTC
exampleDatabaseCluster:
type: digitalocean:DatabaseCluster
name: example
properties:
name: example-mysql-cluster
engine: mysql
version: '8'
size: db-s-1vcpu-1gb
region: nyc1
nodeCount: 1

Import

A MySQL database cluster's configuration can be imported using the id the parent cluster, e.g.

$ pulumi import digitalocean:index/databaseMysqlConfig:DatabaseMysqlConfig example 4b62829a-9c42-465b-aaa3-84051048e712

Properties

Link copied to clipboard
val backupHour: Output<Int>

The hour of day (in UTC) when backup for the service starts. New backup only starts if previous backup has already completed.

Link copied to clipboard
val backupMinute: Output<Int>

The minute of the backup hour when backup for the service starts. New backup only starts if previous backup has already completed.

Link copied to clipboard

The minimum amount of time, in seconds, to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default, for example if using the MySQL Debezium Kafka connector.

Link copied to clipboard
val clusterId: Output<String>

The ID of the target MySQL cluster.

Link copied to clipboard
val connectTimeout: Output<Int>

The number of seconds that the mysqld server waits for a connect packet before responding with bad handshake.

Link copied to clipboard
val defaultTimeZone: Output<String>

Default server time zone, in the form of an offset from UTC (from -12:00 to +12:00), a time zone name (EST), or SYSTEM to use the MySQL server default.

Link copied to clipboard
val groupConcatMaxLen: Output<Int>

The maximum permitted result length, in bytes, for the GROUP_CONCAT() function.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The time, in seconds, before cached statistics expire.

Link copied to clipboard

The minimum length of words that an InnoDB FULLTEXT index stores.

Link copied to clipboard

The InnoDB FULLTEXT index stopword list for all InnoDB tables.

Link copied to clipboard

The time, in seconds, that an InnoDB transaction waits for a row lock. before giving up.

Link copied to clipboard

The size of the buffer, in bytes, that InnoDB uses to write to the log files. on disk.

Link copied to clipboard

The upper limit, in bytes, of the size of the temporary log files used during online DDL operations for InnoDB tables.

Link copied to clipboard

When enabled, records information about all deadlocks in InnoDB user transactions in the error log. Disabled by default.

Link copied to clipboard

When enabled, transaction timeouts cause InnoDB to abort and roll back the entire transaction.

Link copied to clipboard
val interactiveTimeout: Output<Int>

The time, in seconds, the server waits for activity on an interactive. connection before closing it.

Link copied to clipboard

The storage engine for in-memory internal temporary tables. Supported values are: TempTable, MEMORY.

Link copied to clipboard
val longQueryTime: Output<Double>

The time, in seconds, for a query to take to execute before being captured by slow_query_logs. Default is 10 seconds.

Link copied to clipboard
val maxAllowedPacket: Output<Int>

The size of the largest message, in bytes, that can be received by the server. Default is 67108864 (64M).

Link copied to clipboard
val maxHeapTableSize: Output<Int>

The maximum size, in bytes, of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M)

Link copied to clipboard
val netReadTimeout: Output<Int>

The time, in seconds, to wait for more data from an existing connection. aborting the read.

Link copied to clipboard
val netWriteTimeout: Output<Int>

The number of seconds to wait for a block to be written to a connection before aborting the write.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val slowQueryLog: Output<Boolean>

When enabled, captures slow queries. When disabled, also truncates the mysql.slow_log table. Default is false.

Link copied to clipboard
val sortBufferSize: Output<Int>

The sort buffer size, in bytes, for ORDER BY optimization. Default is 262144. (256K).

Link copied to clipboard
val sqlMode: Output<String>

Global SQL mode. If empty, uses MySQL server defaults. Must only include uppercase alphabetic characters, underscores, and commas.

Link copied to clipboard

Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them.

Link copied to clipboard
val tmpTableSize: Output<Int>

The maximum size, in bytes, of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M).

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val waitTimeout: Output<Int>

The number of seconds the server waits for activity on a noninteractive connection before closing it.