1. Packages
  2. Linode Provider
  3. API Docs
  4. DatabaseMysql
Linode v4.37.0 published on Thursday, Apr 10, 2025 by Pulumi

linode.DatabaseMysql

Explore with Pulumi AI

DEPRECATION NOTICE: This resource has been deprecated. Please use linode.DatabaseMysqlV2 for all future implementations.

Provides a Linode MySQL Database resource. This can be used to create, modify, and delete Linode MySQL Databases. For more information, see the Linode APIv4 docs.

Please keep in mind that Managed Databases can take up to an hour to provision.

Example Usage

Creating a simple MySQL database instance:

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

const foobar = new linode.DatabaseMysql("foobar", {
    label: "mydatabase",
    engineId: "mysql/8.0.30",
    region: "us-southeast",
    type: "g6-nanode-1",
});
Copy
import pulumi
import pulumi_linode as linode

foobar = linode.DatabaseMysql("foobar",
    label="mydatabase",
    engine_id="mysql/8.0.30",
    region="us-southeast",
    type="g6-nanode-1")
Copy
package main

import (
	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := linode.NewDatabaseMysql(ctx, "foobar", &linode.DatabaseMysqlArgs{
			Label:    pulumi.String("mydatabase"),
			EngineId: pulumi.String("mysql/8.0.30"),
			Region:   pulumi.String("us-southeast"),
			Type:     pulumi.String("g6-nanode-1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;

return await Deployment.RunAsync(() => 
{
    var foobar = new Linode.DatabaseMysql("foobar", new()
    {
        Label = "mydatabase",
        EngineId = "mysql/8.0.30",
        Region = "us-southeast",
        Type = "g6-nanode-1",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.DatabaseMysql;
import com.pulumi.linode.DatabaseMysqlArgs;
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 foobar = new DatabaseMysql("foobar", DatabaseMysqlArgs.builder()
            .label("mydatabase")
            .engineId("mysql/8.0.30")
            .region("us-southeast")
            .type("g6-nanode-1")
            .build());

    }
}
Copy
resources:
  foobar:
    type: linode:DatabaseMysql
    properties:
      label: mydatabase
      engineId: mysql/8.0.30
      region: us-southeast
      type: g6-nanode-1
Copy

Creating a complex MySQL database instance:

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

const foobar = new linode.DatabaseMysql("foobar", {
    label: "mydatabase",
    engineId: "mysql/8.0.30",
    region: "us-southeast",
    type: "g6-nanode-1",
    allowLists: ["0.0.0.0/0"],
    clusterSize: 3,
    encrypted: true,
    replicationType: "asynch",
    sslConnection: true,
    updates: {
        dayOfWeek: "saturday",
        duration: 1,
        frequency: "monthly",
        hourOfDay: 22,
        weekOfMonth: 2,
    },
});
Copy
import pulumi
import pulumi_linode as linode

foobar = linode.DatabaseMysql("foobar",
    label="mydatabase",
    engine_id="mysql/8.0.30",
    region="us-southeast",
    type="g6-nanode-1",
    allow_lists=["0.0.0.0/0"],
    cluster_size=3,
    encrypted=True,
    replication_type="asynch",
    ssl_connection=True,
    updates={
        "day_of_week": "saturday",
        "duration": 1,
        "frequency": "monthly",
        "hour_of_day": 22,
        "week_of_month": 2,
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := linode.NewDatabaseMysql(ctx, "foobar", &linode.DatabaseMysqlArgs{
			Label:    pulumi.String("mydatabase"),
			EngineId: pulumi.String("mysql/8.0.30"),
			Region:   pulumi.String("us-southeast"),
			Type:     pulumi.String("g6-nanode-1"),
			AllowLists: pulumi.StringArray{
				pulumi.String("0.0.0.0/0"),
			},
			ClusterSize:     pulumi.Int(3),
			Encrypted:       pulumi.Bool(true),
			ReplicationType: pulumi.String("asynch"),
			SslConnection:   pulumi.Bool(true),
			Updates: &linode.DatabaseMysqlUpdatesArgs{
				DayOfWeek:   pulumi.String("saturday"),
				Duration:    pulumi.Int(1),
				Frequency:   pulumi.String("monthly"),
				HourOfDay:   pulumi.Int(22),
				WeekOfMonth: pulumi.Int(2),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;

return await Deployment.RunAsync(() => 
{
    var foobar = new Linode.DatabaseMysql("foobar", new()
    {
        Label = "mydatabase",
        EngineId = "mysql/8.0.30",
        Region = "us-southeast",
        Type = "g6-nanode-1",
        AllowLists = new[]
        {
            "0.0.0.0/0",
        },
        ClusterSize = 3,
        Encrypted = true,
        ReplicationType = "asynch",
        SslConnection = true,
        Updates = new Linode.Inputs.DatabaseMysqlUpdatesArgs
        {
            DayOfWeek = "saturday",
            Duration = 1,
            Frequency = "monthly",
            HourOfDay = 22,
            WeekOfMonth = 2,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.DatabaseMysql;
import com.pulumi.linode.DatabaseMysqlArgs;
import com.pulumi.linode.inputs.DatabaseMysqlUpdatesArgs;
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 foobar = new DatabaseMysql("foobar", DatabaseMysqlArgs.builder()
            .label("mydatabase")
            .engineId("mysql/8.0.30")
            .region("us-southeast")
            .type("g6-nanode-1")
            .allowLists("0.0.0.0/0")
            .clusterSize(3)
            .encrypted(true)
            .replicationType("asynch")
            .sslConnection(true)
            .updates(DatabaseMysqlUpdatesArgs.builder()
                .dayOfWeek("saturday")
                .duration(1)
                .frequency("monthly")
                .hourOfDay(22)
                .weekOfMonth(2)
                .build())
            .build());

    }
}
Copy
resources:
  foobar:
    type: linode:DatabaseMysql
    properties:
      label: mydatabase
      engineId: mysql/8.0.30
      region: us-southeast
      type: g6-nanode-1
      allowLists:
        - 0.0.0.0/0
      clusterSize: 3
      encrypted: true
      replicationType: asynch
      sslConnection: true
      updates:
        dayOfWeek: saturday
        duration: 1
        frequency: monthly
        hourOfDay: 22
        weekOfMonth: 2
Copy

updates

The following arguments are supported in the updates specification block:

  • day_of_week - (Required) The day to perform maintenance. (monday, tuesday, …)

  • duration - (Required) The maximum maintenance window time in hours. (1..3)

  • frequency - (Required) Whether maintenance occurs on a weekly or monthly basis. (weekly, monthly)

  • hour_of_day - (Required) The hour to begin maintenance based in UTC time. (0..23)

  • week_of_month - (Optional) The week of the month to perform monthly frequency updates. Required for monthly frequency updates. (1..4)

Create DatabaseMysql Resource

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

Constructor syntax

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

@overload
def DatabaseMysql(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  engine_id: Optional[str] = None,
                  label: Optional[str] = None,
                  region: Optional[str] = None,
                  type: Optional[str] = None,
                  allow_lists: Optional[Sequence[str]] = None,
                  cluster_size: Optional[int] = None,
                  encrypted: Optional[bool] = None,
                  replication_type: Optional[str] = None,
                  ssl_connection: Optional[bool] = None,
                  updates: Optional[DatabaseMysqlUpdatesArgs] = None)
func NewDatabaseMysql(ctx *Context, name string, args DatabaseMysqlArgs, opts ...ResourceOption) (*DatabaseMysql, error)
public DatabaseMysql(string name, DatabaseMysqlArgs args, CustomResourceOptions? opts = null)
public DatabaseMysql(String name, DatabaseMysqlArgs args)
public DatabaseMysql(String name, DatabaseMysqlArgs args, CustomResourceOptions options)
type: linode:DatabaseMysql
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. DatabaseMysqlArgs
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. DatabaseMysqlArgs
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. DatabaseMysqlArgs
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. DatabaseMysqlArgs
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. DatabaseMysqlArgs
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 databaseMysqlResource = new Linode.DatabaseMysql("databaseMysqlResource", new()
{
    EngineId = "string",
    Label = "string",
    Region = "string",
    Type = "string",
    AllowLists = new[]
    {
        "string",
    },
    ClusterSize = 0,
    Encrypted = false,
    ReplicationType = "string",
    SslConnection = false,
    Updates = new Linode.Inputs.DatabaseMysqlUpdatesArgs
    {
        DayOfWeek = "string",
        Duration = 0,
        Frequency = "string",
        HourOfDay = 0,
        WeekOfMonth = 0,
    },
});
Copy
example, err := linode.NewDatabaseMysql(ctx, "databaseMysqlResource", &linode.DatabaseMysqlArgs{
	EngineId: pulumi.String("string"),
	Label:    pulumi.String("string"),
	Region:   pulumi.String("string"),
	Type:     pulumi.String("string"),
	AllowLists: pulumi.StringArray{
		pulumi.String("string"),
	},
	ClusterSize:     pulumi.Int(0),
	Encrypted:       pulumi.Bool(false),
	ReplicationType: pulumi.String("string"),
	SslConnection:   pulumi.Bool(false),
	Updates: &linode.DatabaseMysqlUpdatesArgs{
		DayOfWeek:   pulumi.String("string"),
		Duration:    pulumi.Int(0),
		Frequency:   pulumi.String("string"),
		HourOfDay:   pulumi.Int(0),
		WeekOfMonth: pulumi.Int(0),
	},
})
Copy
var databaseMysqlResource = new DatabaseMysql("databaseMysqlResource", DatabaseMysqlArgs.builder()
    .engineId("string")
    .label("string")
    .region("string")
    .type("string")
    .allowLists("string")
    .clusterSize(0)
    .encrypted(false)
    .replicationType("string")
    .sslConnection(false)
    .updates(DatabaseMysqlUpdatesArgs.builder()
        .dayOfWeek("string")
        .duration(0)
        .frequency("string")
        .hourOfDay(0)
        .weekOfMonth(0)
        .build())
    .build());
Copy
database_mysql_resource = linode.DatabaseMysql("databaseMysqlResource",
    engine_id="string",
    label="string",
    region="string",
    type="string",
    allow_lists=["string"],
    cluster_size=0,
    encrypted=False,
    replication_type="string",
    ssl_connection=False,
    updates={
        "day_of_week": "string",
        "duration": 0,
        "frequency": "string",
        "hour_of_day": 0,
        "week_of_month": 0,
    })
Copy
const databaseMysqlResource = new linode.DatabaseMysql("databaseMysqlResource", {
    engineId: "string",
    label: "string",
    region: "string",
    type: "string",
    allowLists: ["string"],
    clusterSize: 0,
    encrypted: false,
    replicationType: "string",
    sslConnection: false,
    updates: {
        dayOfWeek: "string",
        duration: 0,
        frequency: "string",
        hourOfDay: 0,
        weekOfMonth: 0,
    },
});
Copy
type: linode:DatabaseMysql
properties:
    allowLists:
        - string
    clusterSize: 0
    encrypted: false
    engineId: string
    label: string
    region: string
    replicationType: string
    sslConnection: false
    type: string
    updates:
        dayOfWeek: string
        duration: 0
        frequency: string
        hourOfDay: 0
        weekOfMonth: 0
Copy

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

EngineId
This property is required.
Changes to this property will trigger replacement.
string
The Managed Database engine in engine/version format. (e.g. mysql/8.0.30)
Label This property is required. string
A unique, user-defined string referring to the Managed Database.
Region
This property is required.
Changes to this property will trigger replacement.
string
The region to use for the Managed Database.
Type
This property is required.
Changes to this property will trigger replacement.
string
The Linode Instance type used for the nodes of the Managed Database instance.


AllowLists List<string>
A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
ClusterSize Changes to this property will trigger replacement. int
The number of Linode Instance nodes deployed to the Managed Database. (default 1)
Encrypted Changes to this property will trigger replacement. bool
Whether the Managed Databases is encrypted. (default false)
ReplicationType Changes to this property will trigger replacement. string

The replication method used for the Managed Database. (none, asynch, semi_synch; default none)

  • Must be none for a single node cluster.

  • Must be asynch or semi_synch for a high availability cluster.

SslConnection Changes to this property will trigger replacement. bool
Whether to require SSL credentials to establish a connection to the Managed Database. (default false)

  • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
Updates DatabaseMysqlUpdates
Configuration settings for automated patch update maintenance for the Managed Database.
EngineId
This property is required.
Changes to this property will trigger replacement.
string
The Managed Database engine in engine/version format. (e.g. mysql/8.0.30)
Label This property is required. string
A unique, user-defined string referring to the Managed Database.
Region
This property is required.
Changes to this property will trigger replacement.
string
The region to use for the Managed Database.
Type
This property is required.
Changes to this property will trigger replacement.
string
The Linode Instance type used for the nodes of the Managed Database instance.


AllowLists []string
A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
ClusterSize Changes to this property will trigger replacement. int
The number of Linode Instance nodes deployed to the Managed Database. (default 1)
Encrypted Changes to this property will trigger replacement. bool
Whether the Managed Databases is encrypted. (default false)
ReplicationType Changes to this property will trigger replacement. string

The replication method used for the Managed Database. (none, asynch, semi_synch; default none)

  • Must be none for a single node cluster.

  • Must be asynch or semi_synch for a high availability cluster.

SslConnection Changes to this property will trigger replacement. bool
Whether to require SSL credentials to establish a connection to the Managed Database. (default false)

  • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
Updates DatabaseMysqlUpdatesArgs
Configuration settings for automated patch update maintenance for the Managed Database.
engineId
This property is required.
Changes to this property will trigger replacement.
String
The Managed Database engine in engine/version format. (e.g. mysql/8.0.30)
label This property is required. String
A unique, user-defined string referring to the Managed Database.
region
This property is required.
Changes to this property will trigger replacement.
String
The region to use for the Managed Database.
type
This property is required.
Changes to this property will trigger replacement.
String
The Linode Instance type used for the nodes of the Managed Database instance.


allowLists List<String>
A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
clusterSize Changes to this property will trigger replacement. Integer
The number of Linode Instance nodes deployed to the Managed Database. (default 1)
encrypted Changes to this property will trigger replacement. Boolean
Whether the Managed Databases is encrypted. (default false)
replicationType Changes to this property will trigger replacement. String

The replication method used for the Managed Database. (none, asynch, semi_synch; default none)

  • Must be none for a single node cluster.

  • Must be asynch or semi_synch for a high availability cluster.

sslConnection Changes to this property will trigger replacement. Boolean
Whether to require SSL credentials to establish a connection to the Managed Database. (default false)

  • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
updates DatabaseMysqlUpdates
Configuration settings for automated patch update maintenance for the Managed Database.
engineId
This property is required.
Changes to this property will trigger replacement.
string
The Managed Database engine in engine/version format. (e.g. mysql/8.0.30)
label This property is required. string
A unique, user-defined string referring to the Managed Database.
region
This property is required.
Changes to this property will trigger replacement.
string
The region to use for the Managed Database.
type
This property is required.
Changes to this property will trigger replacement.
string
The Linode Instance type used for the nodes of the Managed Database instance.


allowLists string[]
A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
clusterSize Changes to this property will trigger replacement. number
The number of Linode Instance nodes deployed to the Managed Database. (default 1)
encrypted Changes to this property will trigger replacement. boolean
Whether the Managed Databases is encrypted. (default false)
replicationType Changes to this property will trigger replacement. string

The replication method used for the Managed Database. (none, asynch, semi_synch; default none)

  • Must be none for a single node cluster.

  • Must be asynch or semi_synch for a high availability cluster.

sslConnection Changes to this property will trigger replacement. boolean
Whether to require SSL credentials to establish a connection to the Managed Database. (default false)

  • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
updates DatabaseMysqlUpdates
Configuration settings for automated patch update maintenance for the Managed Database.
engine_id
This property is required.
Changes to this property will trigger replacement.
str
The Managed Database engine in engine/version format. (e.g. mysql/8.0.30)
label This property is required. str
A unique, user-defined string referring to the Managed Database.
region
This property is required.
Changes to this property will trigger replacement.
str
The region to use for the Managed Database.
type
This property is required.
Changes to this property will trigger replacement.
str
The Linode Instance type used for the nodes of the Managed Database instance.


allow_lists Sequence[str]
A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
cluster_size Changes to this property will trigger replacement. int
The number of Linode Instance nodes deployed to the Managed Database. (default 1)
encrypted Changes to this property will trigger replacement. bool
Whether the Managed Databases is encrypted. (default false)
replication_type Changes to this property will trigger replacement. str

The replication method used for the Managed Database. (none, asynch, semi_synch; default none)

  • Must be none for a single node cluster.

  • Must be asynch or semi_synch for a high availability cluster.

ssl_connection Changes to this property will trigger replacement. bool
Whether to require SSL credentials to establish a connection to the Managed Database. (default false)

  • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
updates DatabaseMysqlUpdatesArgs
Configuration settings for automated patch update maintenance for the Managed Database.
engineId
This property is required.
Changes to this property will trigger replacement.
String
The Managed Database engine in engine/version format. (e.g. mysql/8.0.30)
label This property is required. String
A unique, user-defined string referring to the Managed Database.
region
This property is required.
Changes to this property will trigger replacement.
String
The region to use for the Managed Database.
type
This property is required.
Changes to this property will trigger replacement.
String
The Linode Instance type used for the nodes of the Managed Database instance.


allowLists List<String>
A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
clusterSize Changes to this property will trigger replacement. Number
The number of Linode Instance nodes deployed to the Managed Database. (default 1)
encrypted Changes to this property will trigger replacement. Boolean
Whether the Managed Databases is encrypted. (default false)
replicationType Changes to this property will trigger replacement. String

The replication method used for the Managed Database. (none, asynch, semi_synch; default none)

  • Must be none for a single node cluster.

  • Must be asynch or semi_synch for a high availability cluster.

sslConnection Changes to this property will trigger replacement. Boolean
Whether to require SSL credentials to establish a connection to the Managed Database. (default false)

  • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
updates Property Map
Configuration settings for automated patch update maintenance for the Managed Database.

Outputs

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

CaCert string
The base64-encoded SSL CA certificate for the Managed Database instance.
Created string
When this Managed Database was created.
Engine string
The Managed Database engine. (e.g. mysql)
HostPrimary string
The primary host for the Managed Database.
HostSecondary string
The secondary/private network host for the Managed Database.
Id string
The provider-assigned unique ID for this managed resource.
RootPassword string
The randomly-generated root password for the Managed Database instance.
RootUsername string
The root username for the Managed Database instance.
Status string
The operating status of the Managed Database.
Updated string
When this Managed Database was last updated.
Version string
The Managed Database engine version. (e.g. v8.0.26)
CaCert string
The base64-encoded SSL CA certificate for the Managed Database instance.
Created string
When this Managed Database was created.
Engine string
The Managed Database engine. (e.g. mysql)
HostPrimary string
The primary host for the Managed Database.
HostSecondary string
The secondary/private network host for the Managed Database.
Id string
The provider-assigned unique ID for this managed resource.
RootPassword string
The randomly-generated root password for the Managed Database instance.
RootUsername string
The root username for the Managed Database instance.
Status string
The operating status of the Managed Database.
Updated string
When this Managed Database was last updated.
Version string
The Managed Database engine version. (e.g. v8.0.26)
caCert String
The base64-encoded SSL CA certificate for the Managed Database instance.
created String
When this Managed Database was created.
engine String
The Managed Database engine. (e.g. mysql)
hostPrimary String
The primary host for the Managed Database.
hostSecondary String
The secondary/private network host for the Managed Database.
id String
The provider-assigned unique ID for this managed resource.
rootPassword String
The randomly-generated root password for the Managed Database instance.
rootUsername String
The root username for the Managed Database instance.
status String
The operating status of the Managed Database.
updated String
When this Managed Database was last updated.
version String
The Managed Database engine version. (e.g. v8.0.26)
caCert string
The base64-encoded SSL CA certificate for the Managed Database instance.
created string
When this Managed Database was created.
engine string
The Managed Database engine. (e.g. mysql)
hostPrimary string
The primary host for the Managed Database.
hostSecondary string
The secondary/private network host for the Managed Database.
id string
The provider-assigned unique ID for this managed resource.
rootPassword string
The randomly-generated root password for the Managed Database instance.
rootUsername string
The root username for the Managed Database instance.
status string
The operating status of the Managed Database.
updated string
When this Managed Database was last updated.
version string
The Managed Database engine version. (e.g. v8.0.26)
ca_cert str
The base64-encoded SSL CA certificate for the Managed Database instance.
created str
When this Managed Database was created.
engine str
The Managed Database engine. (e.g. mysql)
host_primary str
The primary host for the Managed Database.
host_secondary str
The secondary/private network host for the Managed Database.
id str
The provider-assigned unique ID for this managed resource.
root_password str
The randomly-generated root password for the Managed Database instance.
root_username str
The root username for the Managed Database instance.
status str
The operating status of the Managed Database.
updated str
When this Managed Database was last updated.
version str
The Managed Database engine version. (e.g. v8.0.26)
caCert String
The base64-encoded SSL CA certificate for the Managed Database instance.
created String
When this Managed Database was created.
engine String
The Managed Database engine. (e.g. mysql)
hostPrimary String
The primary host for the Managed Database.
hostSecondary String
The secondary/private network host for the Managed Database.
id String
The provider-assigned unique ID for this managed resource.
rootPassword String
The randomly-generated root password for the Managed Database instance.
rootUsername String
The root username for the Managed Database instance.
status String
The operating status of the Managed Database.
updated String
When this Managed Database was last updated.
version String
The Managed Database engine version. (e.g. v8.0.26)

Look up Existing DatabaseMysql Resource

Get an existing DatabaseMysql 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?: DatabaseMysqlState, opts?: CustomResourceOptions): DatabaseMysql
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allow_lists: Optional[Sequence[str]] = None,
        ca_cert: Optional[str] = None,
        cluster_size: Optional[int] = None,
        created: Optional[str] = None,
        encrypted: Optional[bool] = None,
        engine: Optional[str] = None,
        engine_id: Optional[str] = None,
        host_primary: Optional[str] = None,
        host_secondary: Optional[str] = None,
        label: Optional[str] = None,
        region: Optional[str] = None,
        replication_type: Optional[str] = None,
        root_password: Optional[str] = None,
        root_username: Optional[str] = None,
        ssl_connection: Optional[bool] = None,
        status: Optional[str] = None,
        type: Optional[str] = None,
        updated: Optional[str] = None,
        updates: Optional[DatabaseMysqlUpdatesArgs] = None,
        version: Optional[str] = None) -> DatabaseMysql
func GetDatabaseMysql(ctx *Context, name string, id IDInput, state *DatabaseMysqlState, opts ...ResourceOption) (*DatabaseMysql, error)
public static DatabaseMysql Get(string name, Input<string> id, DatabaseMysqlState? state, CustomResourceOptions? opts = null)
public static DatabaseMysql get(String name, Output<String> id, DatabaseMysqlState state, CustomResourceOptions options)
resources:  _:    type: linode:DatabaseMysql    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:
AllowLists List<string>
A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
CaCert string
The base64-encoded SSL CA certificate for the Managed Database instance.
ClusterSize Changes to this property will trigger replacement. int
The number of Linode Instance nodes deployed to the Managed Database. (default 1)
Created string
When this Managed Database was created.
Encrypted Changes to this property will trigger replacement. bool
Whether the Managed Databases is encrypted. (default false)
Engine string
The Managed Database engine. (e.g. mysql)
EngineId Changes to this property will trigger replacement. string
The Managed Database engine in engine/version format. (e.g. mysql/8.0.30)
HostPrimary string
The primary host for the Managed Database.
HostSecondary string
The secondary/private network host for the Managed Database.
Label string
A unique, user-defined string referring to the Managed Database.
Region Changes to this property will trigger replacement. string
The region to use for the Managed Database.
ReplicationType Changes to this property will trigger replacement. string

The replication method used for the Managed Database. (none, asynch, semi_synch; default none)

  • Must be none for a single node cluster.

  • Must be asynch or semi_synch for a high availability cluster.

RootPassword string
The randomly-generated root password for the Managed Database instance.
RootUsername string
The root username for the Managed Database instance.
SslConnection Changes to this property will trigger replacement. bool
Whether to require SSL credentials to establish a connection to the Managed Database. (default false)

  • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
Status string
The operating status of the Managed Database.
Type Changes to this property will trigger replacement. string
The Linode Instance type used for the nodes of the Managed Database instance.


Updated string
When this Managed Database was last updated.
Updates DatabaseMysqlUpdates
Configuration settings for automated patch update maintenance for the Managed Database.
Version string
The Managed Database engine version. (e.g. v8.0.26)
AllowLists []string
A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
CaCert string
The base64-encoded SSL CA certificate for the Managed Database instance.
ClusterSize Changes to this property will trigger replacement. int
The number of Linode Instance nodes deployed to the Managed Database. (default 1)
Created string
When this Managed Database was created.
Encrypted Changes to this property will trigger replacement. bool
Whether the Managed Databases is encrypted. (default false)
Engine string
The Managed Database engine. (e.g. mysql)
EngineId Changes to this property will trigger replacement. string
The Managed Database engine in engine/version format. (e.g. mysql/8.0.30)
HostPrimary string
The primary host for the Managed Database.
HostSecondary string
The secondary/private network host for the Managed Database.
Label string
A unique, user-defined string referring to the Managed Database.
Region Changes to this property will trigger replacement. string
The region to use for the Managed Database.
ReplicationType Changes to this property will trigger replacement. string

The replication method used for the Managed Database. (none, asynch, semi_synch; default none)

  • Must be none for a single node cluster.

  • Must be asynch or semi_synch for a high availability cluster.

RootPassword string
The randomly-generated root password for the Managed Database instance.
RootUsername string
The root username for the Managed Database instance.
SslConnection Changes to this property will trigger replacement. bool
Whether to require SSL credentials to establish a connection to the Managed Database. (default false)

  • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
Status string
The operating status of the Managed Database.
Type Changes to this property will trigger replacement. string
The Linode Instance type used for the nodes of the Managed Database instance.


Updated string
When this Managed Database was last updated.
Updates DatabaseMysqlUpdatesArgs
Configuration settings for automated patch update maintenance for the Managed Database.
Version string
The Managed Database engine version. (e.g. v8.0.26)
allowLists List<String>
A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
caCert String
The base64-encoded SSL CA certificate for the Managed Database instance.
clusterSize Changes to this property will trigger replacement. Integer
The number of Linode Instance nodes deployed to the Managed Database. (default 1)
created String
When this Managed Database was created.
encrypted Changes to this property will trigger replacement. Boolean
Whether the Managed Databases is encrypted. (default false)
engine String
The Managed Database engine. (e.g. mysql)
engineId Changes to this property will trigger replacement. String
The Managed Database engine in engine/version format. (e.g. mysql/8.0.30)
hostPrimary String
The primary host for the Managed Database.
hostSecondary String
The secondary/private network host for the Managed Database.
label String
A unique, user-defined string referring to the Managed Database.
region Changes to this property will trigger replacement. String
The region to use for the Managed Database.
replicationType Changes to this property will trigger replacement. String

The replication method used for the Managed Database. (none, asynch, semi_synch; default none)

  • Must be none for a single node cluster.

  • Must be asynch or semi_synch for a high availability cluster.

rootPassword String
The randomly-generated root password for the Managed Database instance.
rootUsername String
The root username for the Managed Database instance.
sslConnection Changes to this property will trigger replacement. Boolean
Whether to require SSL credentials to establish a connection to the Managed Database. (default false)

  • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
status String
The operating status of the Managed Database.
type Changes to this property will trigger replacement. String
The Linode Instance type used for the nodes of the Managed Database instance.


updated String
When this Managed Database was last updated.
updates DatabaseMysqlUpdates
Configuration settings for automated patch update maintenance for the Managed Database.
version String
The Managed Database engine version. (e.g. v8.0.26)
allowLists string[]
A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
caCert string
The base64-encoded SSL CA certificate for the Managed Database instance.
clusterSize Changes to this property will trigger replacement. number
The number of Linode Instance nodes deployed to the Managed Database. (default 1)
created string
When this Managed Database was created.
encrypted Changes to this property will trigger replacement. boolean
Whether the Managed Databases is encrypted. (default false)
engine string
The Managed Database engine. (e.g. mysql)
engineId Changes to this property will trigger replacement. string
The Managed Database engine in engine/version format. (e.g. mysql/8.0.30)
hostPrimary string
The primary host for the Managed Database.
hostSecondary string
The secondary/private network host for the Managed Database.
label string
A unique, user-defined string referring to the Managed Database.
region Changes to this property will trigger replacement. string
The region to use for the Managed Database.
replicationType Changes to this property will trigger replacement. string

The replication method used for the Managed Database. (none, asynch, semi_synch; default none)

  • Must be none for a single node cluster.

  • Must be asynch or semi_synch for a high availability cluster.

rootPassword string
The randomly-generated root password for the Managed Database instance.
rootUsername string
The root username for the Managed Database instance.
sslConnection Changes to this property will trigger replacement. boolean
Whether to require SSL credentials to establish a connection to the Managed Database. (default false)

  • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
status string
The operating status of the Managed Database.
type Changes to this property will trigger replacement. string
The Linode Instance type used for the nodes of the Managed Database instance.


updated string
When this Managed Database was last updated.
updates DatabaseMysqlUpdates
Configuration settings for automated patch update maintenance for the Managed Database.
version string
The Managed Database engine version. (e.g. v8.0.26)
allow_lists Sequence[str]
A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
ca_cert str
The base64-encoded SSL CA certificate for the Managed Database instance.
cluster_size Changes to this property will trigger replacement. int
The number of Linode Instance nodes deployed to the Managed Database. (default 1)
created str
When this Managed Database was created.
encrypted Changes to this property will trigger replacement. bool
Whether the Managed Databases is encrypted. (default false)
engine str
The Managed Database engine. (e.g. mysql)
engine_id Changes to this property will trigger replacement. str
The Managed Database engine in engine/version format. (e.g. mysql/8.0.30)
host_primary str
The primary host for the Managed Database.
host_secondary str
The secondary/private network host for the Managed Database.
label str
A unique, user-defined string referring to the Managed Database.
region Changes to this property will trigger replacement. str
The region to use for the Managed Database.
replication_type Changes to this property will trigger replacement. str

The replication method used for the Managed Database. (none, asynch, semi_synch; default none)

  • Must be none for a single node cluster.

  • Must be asynch or semi_synch for a high availability cluster.

root_password str
The randomly-generated root password for the Managed Database instance.
root_username str
The root username for the Managed Database instance.
ssl_connection Changes to this property will trigger replacement. bool
Whether to require SSL credentials to establish a connection to the Managed Database. (default false)

  • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
status str
The operating status of the Managed Database.
type Changes to this property will trigger replacement. str
The Linode Instance type used for the nodes of the Managed Database instance.


updated str
When this Managed Database was last updated.
updates DatabaseMysqlUpdatesArgs
Configuration settings for automated patch update maintenance for the Managed Database.
version str
The Managed Database engine version. (e.g. v8.0.26)
allowLists List<String>
A list of IP addresses that can access the Managed Database. Each item can be a single IP address or a range in CIDR format. Use linode.DatabaseAccessControls to manage your allow list separately.
caCert String
The base64-encoded SSL CA certificate for the Managed Database instance.
clusterSize Changes to this property will trigger replacement. Number
The number of Linode Instance nodes deployed to the Managed Database. (default 1)
created String
When this Managed Database was created.
encrypted Changes to this property will trigger replacement. Boolean
Whether the Managed Databases is encrypted. (default false)
engine String
The Managed Database engine. (e.g. mysql)
engineId Changes to this property will trigger replacement. String
The Managed Database engine in engine/version format. (e.g. mysql/8.0.30)
hostPrimary String
The primary host for the Managed Database.
hostSecondary String
The secondary/private network host for the Managed Database.
label String
A unique, user-defined string referring to the Managed Database.
region Changes to this property will trigger replacement. String
The region to use for the Managed Database.
replicationType Changes to this property will trigger replacement. String

The replication method used for the Managed Database. (none, asynch, semi_synch; default none)

  • Must be none for a single node cluster.

  • Must be asynch or semi_synch for a high availability cluster.

rootPassword String
The randomly-generated root password for the Managed Database instance.
rootUsername String
The root username for the Managed Database instance.
sslConnection Changes to this property will trigger replacement. Boolean
Whether to require SSL credentials to establish a connection to the Managed Database. (default false)

  • updates - (Optional) Configuration settings for automated patch update maintenance for the Managed Database.
status String
The operating status of the Managed Database.
type Changes to this property will trigger replacement. String
The Linode Instance type used for the nodes of the Managed Database instance.


updated String
When this Managed Database was last updated.
updates Property Map
Configuration settings for automated patch update maintenance for the Managed Database.
version String
The Managed Database engine version. (e.g. v8.0.26)

Supporting Types

DatabaseMysqlUpdates
, DatabaseMysqlUpdatesArgs

DayOfWeek This property is required. string
The day to perform maintenance.
Duration This property is required. int
The maximum maintenance window time in hours.
Frequency This property is required. string
Whether maintenance occurs on a weekly or monthly basis.
HourOfDay This property is required. int
The hour to begin maintenance based in UTC time.
WeekOfMonth int
The week of the month to perform monthly frequency updates. Required for monthly frequency updates.
DayOfWeek This property is required. string
The day to perform maintenance.
Duration This property is required. int
The maximum maintenance window time in hours.
Frequency This property is required. string
Whether maintenance occurs on a weekly or monthly basis.
HourOfDay This property is required. int
The hour to begin maintenance based in UTC time.
WeekOfMonth int
The week of the month to perform monthly frequency updates. Required for monthly frequency updates.
dayOfWeek This property is required. String
The day to perform maintenance.
duration This property is required. Integer
The maximum maintenance window time in hours.
frequency This property is required. String
Whether maintenance occurs on a weekly or monthly basis.
hourOfDay This property is required. Integer
The hour to begin maintenance based in UTC time.
weekOfMonth Integer
The week of the month to perform monthly frequency updates. Required for monthly frequency updates.
dayOfWeek This property is required. string
The day to perform maintenance.
duration This property is required. number
The maximum maintenance window time in hours.
frequency This property is required. string
Whether maintenance occurs on a weekly or monthly basis.
hourOfDay This property is required. number
The hour to begin maintenance based in UTC time.
weekOfMonth number
The week of the month to perform monthly frequency updates. Required for monthly frequency updates.
day_of_week This property is required. str
The day to perform maintenance.
duration This property is required. int
The maximum maintenance window time in hours.
frequency This property is required. str
Whether maintenance occurs on a weekly or monthly basis.
hour_of_day This property is required. int
The hour to begin maintenance based in UTC time.
week_of_month int
The week of the month to perform monthly frequency updates. Required for monthly frequency updates.
dayOfWeek This property is required. String
The day to perform maintenance.
duration This property is required. Number
The maximum maintenance window time in hours.
frequency This property is required. String
Whether maintenance occurs on a weekly or monthly basis.
hourOfDay This property is required. Number
The hour to begin maintenance based in UTC time.
weekOfMonth Number
The week of the month to perform monthly frequency updates. Required for monthly frequency updates.

Import

Linode MySQL Databases can be imported using the id, e.g.

$ pulumi import linode:index/databaseMysql:DatabaseMysql foobar 1234567
Copy

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

Package Details

Repository
Linode pulumi/pulumi-linode
License
Apache-2.0
Notes
This Pulumi package is based on the linode Terraform Provider.