Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

MySql

# MySQL Resource

The MySQL resource allows the creation and management of Aiven MySQL services.

Example Usage

using Pulumi;
using Aiven = Pulumi.Aiven;

class MyStack : Stack
{
    public MyStack()
    {
        var mysql1 = new Aiven.MySql("mysql1", new Aiven.MySqlArgs
        {
            Project = data.Aiven_project.Foo.Project,
            CloudName = "google-europe-west1",
            Plan = "business-4",
            ServiceName = "my-mysql1",
            MaintenanceWindowDow = "monday",
            MaintenanceWindowTime = "10:00:00",
            MysqlUserConfig = new Aiven.Inputs.MySqlMysqlUserConfigArgs
            {
                MysqlVersion = "8",
                Mysql = new Aiven.Inputs.MySqlMysqlUserConfigMysqlArgs
                {
                    SqlMode = "ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE",
                    SqlRequirePrimaryKey = "true",
                },
                PublicAccess = new Aiven.Inputs.MySqlMysqlUserConfigPublicAccessArgs
                {
                    Mysql = "true",
                },
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aiven/sdk/v3/go/aiven"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := aiven.NewMySql(ctx, "mysql1", &aiven.MySqlArgs{
            Project:               pulumi.Any(data.Aiven_project.Foo.Project),
            CloudName:             pulumi.String("google-europe-west1"),
            Plan:                  pulumi.String("business-4"),
            ServiceName:           pulumi.String("my-mysql1"),
            MaintenanceWindowDow:  pulumi.String("monday"),
            MaintenanceWindowTime: pulumi.String("10:00:00"),
            MysqlUserConfig: &aiven.MySqlMysqlUserConfigArgs{
                MysqlVersion: pulumi.String("8"),
                Mysql: &aiven.MySqlMysqlUserConfigMysqlArgs{
                    SqlMode:              pulumi.String("ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE"),
                    SqlRequirePrimaryKey: pulumi.String("true"),
                },
                PublicAccess: &aiven.MySqlMysqlUserConfigPublicAccessArgs{
                    Mysql: pulumi.String("true"),
                },
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aiven as aiven

mysql1 = aiven.MySql("mysql1",
    project=data["aiven_project"]["foo"]["project"],
    cloud_name="google-europe-west1",
    plan="business-4",
    service_name="my-mysql1",
    maintenance_window_dow="monday",
    maintenance_window_time="10:00:00",
    mysql_user_config=aiven.MySqlMysqlUserConfigArgs(
        mysql_version="8",
        mysql=aiven.MySqlMysqlUserConfigMysqlArgs(
            sql_mode="ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE",
            sql_require_primary_key="true",
        ),
        public_access=aiven.MySqlMysqlUserConfigPublicAccessArgs(
            mysql="true",
        ),
    ))
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";

const mysql1 = new aiven.MySql("mysql1", {
    project: data.aiven_project.foo.project,
    cloudName: "google-europe-west1",
    plan: "business-4",
    serviceName: "my-mysql1",
    maintenanceWindowDow: "monday",
    maintenanceWindowTime: "10:00:00",
    mysqlUserConfig: {
        mysqlVersion: 8,
        mysql: {
            sqlMode: "ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE",
            sqlRequirePrimaryKey: true,
        },
        publicAccess: {
            mysql: true,
        },
    },
});

Create a MySql Resource

new MySql(name: string, args: MySqlArgs, opts?: CustomResourceOptions);
def MySql(resource_name: str, opts: Optional[ResourceOptions] = None, cloud_name: Optional[str] = None, maintenance_window_dow: Optional[str] = None, maintenance_window_time: Optional[str] = None, mysql: Optional[MySqlMysqlArgs] = None, mysql_user_config: Optional[MySqlMysqlUserConfigArgs] = None, plan: Optional[str] = None, project: Optional[str] = None, project_vpc_id: Optional[str] = None, service_integrations: Optional[Sequence[MySqlServiceIntegrationArgs]] = None, service_name: Optional[str] = None, termination_protection: Optional[bool] = None)
func NewMySql(ctx *Context, name string, args MySqlArgs, opts ...ResourceOption) (*MySql, error)
public MySql(string name, MySqlArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args MySqlArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args MySqlArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args MySqlArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

MySql Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The MySql resource accepts the following input properties:

Project string

identifies the project the service belongs to. To set up proper dependency between the project and the service, refer to the project as shown in the above example. Project cannot be changed later without destroying and re-creating the service.

ServiceName string

specifies the actual name of the service. The name cannot be changed later without destroying and re-creating the service so name should be picked based on intended service usage rather than current attributes.

CloudName string

defines where the cloud provider and region where the service is hosted in. This can be changed freely after service is created. Changing the value will trigger a potentially lengthy migration process for the service. Format is cloud provider name (aws, azure, do google, upcloud, etc.), dash, and the cloud provider specific region name. These are documented on each Cloud provider’s own support articles, like here for Google and here for AWS.

MaintenanceWindowDow string

day of week when maintenance operations should be performed. On monday, tuesday, wednesday, etc.

MaintenanceWindowTime string

time of day when maintenance operations should be performed. UTC time in HH:mm:ss format.

Mysql MySqlMysqlArgs

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

MysqlUserConfig MySqlMysqlUserConfigArgs

defines MySQL specific additional configuration options. The following configuration options available:

Plan string

defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are hobbyist, startup-x, business-x and premium-x where x is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The exact options can be seen from the Aiven web console’s Create Service dialog.

ProjectVpcId string

optionally specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference as shown above to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data.

ServiceIntegrations List<MySqlServiceIntegrationArgs>

can be used to define service integrations that must exist immediately upon service creation. By the time of writing the only such integration is defining that MySQL service is a read-replica of another service. To define a read- replica the following configuration needs to be added:

TerminationProtection bool

prevents the service from being deleted. It is recommended to set this to true for all production services to prevent unintentional service deletion. This does not shield against deleting databases or topics but for services with backups much of the content can at least be restored from backup in case accidental deletion is done.

Project string

identifies the project the service belongs to. To set up proper dependency between the project and the service, refer to the project as shown in the above example. Project cannot be changed later without destroying and re-creating the service.

ServiceName string

specifies the actual name of the service. The name cannot be changed later without destroying and re-creating the service so name should be picked based on intended service usage rather than current attributes.

CloudName string

defines where the cloud provider and region where the service is hosted in. This can be changed freely after service is created. Changing the value will trigger a potentially lengthy migration process for the service. Format is cloud provider name (aws, azure, do google, upcloud, etc.), dash, and the cloud provider specific region name. These are documented on each Cloud provider’s own support articles, like here for Google and here for AWS.

MaintenanceWindowDow string

day of week when maintenance operations should be performed. On monday, tuesday, wednesday, etc.

MaintenanceWindowTime string

time of day when maintenance operations should be performed. UTC time in HH:mm:ss format.

Mysql MySqlMysql

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

MysqlUserConfig MySqlMysqlUserConfig

defines MySQL specific additional configuration options. The following configuration options available:

Plan string

defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are hobbyist, startup-x, business-x and premium-x where x is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The exact options can be seen from the Aiven web console’s Create Service dialog.

ProjectVpcId string

optionally specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference as shown above to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data.

ServiceIntegrations []MySqlServiceIntegration

can be used to define service integrations that must exist immediately upon service creation. By the time of writing the only such integration is defining that MySQL service is a read-replica of another service. To define a read- replica the following configuration needs to be added:

TerminationProtection bool

prevents the service from being deleted. It is recommended to set this to true for all production services to prevent unintentional service deletion. This does not shield against deleting databases or topics but for services with backups much of the content can at least be restored from backup in case accidental deletion is done.

project string

identifies the project the service belongs to. To set up proper dependency between the project and the service, refer to the project as shown in the above example. Project cannot be changed later without destroying and re-creating the service.

serviceName string

specifies the actual name of the service. The name cannot be changed later without destroying and re-creating the service so name should be picked based on intended service usage rather than current attributes.

cloudName string

defines where the cloud provider and region where the service is hosted in. This can be changed freely after service is created. Changing the value will trigger a potentially lengthy migration process for the service. Format is cloud provider name (aws, azure, do google, upcloud, etc.), dash, and the cloud provider specific region name. These are documented on each Cloud provider’s own support articles, like here for Google and here for AWS.

maintenanceWindowDow string

day of week when maintenance operations should be performed. On monday, tuesday, wednesday, etc.

maintenanceWindowTime string

time of day when maintenance operations should be performed. UTC time in HH:mm:ss format.

mysql MySqlMysql

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

mysqlUserConfig MySqlMysqlUserConfig

defines MySQL specific additional configuration options. The following configuration options available:

plan string

defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are hobbyist, startup-x, business-x and premium-x where x is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The exact options can be seen from the Aiven web console’s Create Service dialog.

projectVpcId string

optionally specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference as shown above to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data.

serviceIntegrations MySqlServiceIntegration[]

can be used to define service integrations that must exist immediately upon service creation. By the time of writing the only such integration is defining that MySQL service is a read-replica of another service. To define a read- replica the following configuration needs to be added:

terminationProtection boolean

prevents the service from being deleted. It is recommended to set this to true for all production services to prevent unintentional service deletion. This does not shield against deleting databases or topics but for services with backups much of the content can at least be restored from backup in case accidental deletion is done.

project str

identifies the project the service belongs to. To set up proper dependency between the project and the service, refer to the project as shown in the above example. Project cannot be changed later without destroying and re-creating the service.

service_name str

specifies the actual name of the service. The name cannot be changed later without destroying and re-creating the service so name should be picked based on intended service usage rather than current attributes.

cloud_name str

defines where the cloud provider and region where the service is hosted in. This can be changed freely after service is created. Changing the value will trigger a potentially lengthy migration process for the service. Format is cloud provider name (aws, azure, do google, upcloud, etc.), dash, and the cloud provider specific region name. These are documented on each Cloud provider’s own support articles, like here for Google and here for AWS.

maintenance_window_dow str

day of week when maintenance operations should be performed. On monday, tuesday, wednesday, etc.

maintenance_window_time str

time of day when maintenance operations should be performed. UTC time in HH:mm:ss format.

mysql MySqlMysqlArgs

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

mysql_user_config MySqlMysqlUserConfigArgs

defines MySQL specific additional configuration options. The following configuration options available:

plan str

defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are hobbyist, startup-x, business-x and premium-x where x is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The exact options can be seen from the Aiven web console’s Create Service dialog.

project_vpc_id str

optionally specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference as shown above to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data.

service_integrations Sequence[MySqlServiceIntegrationArgs]

can be used to define service integrations that must exist immediately upon service creation. By the time of writing the only such integration is defining that MySQL service is a read-replica of another service. To define a read- replica the following configuration needs to be added:

termination_protection bool

prevents the service from being deleted. It is recommended to set this to true for all production services to prevent unintentional service deletion. This does not shield against deleting databases or topics but for services with backups much of the content can at least be restored from backup in case accidental deletion is done.

Outputs

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

Components List<MySqlComponent>

Service component information objects

Id string
The provider-assigned unique ID for this managed resource.
ServiceHost string

MySQL hostname.

ServicePassword string

Password used for connecting to the MySQL service, if applicable.

ServicePort int

MySQL port.

ServiceType string

Aiven internal service type code

ServiceUri string

URI for connecting to the MySQL service.

ServiceUsername string

Username used for connecting to the MySQL service, if applicable.

State string

Service state.

Components []MySqlComponent

Service component information objects

Id string
The provider-assigned unique ID for this managed resource.
ServiceHost string

MySQL hostname.

ServicePassword string

Password used for connecting to the MySQL service, if applicable.

ServicePort int

MySQL port.

ServiceType string

Aiven internal service type code

ServiceUri string

URI for connecting to the MySQL service.

ServiceUsername string

Username used for connecting to the MySQL service, if applicable.

State string

Service state.

components MySqlComponent[]

Service component information objects

id string
The provider-assigned unique ID for this managed resource.
serviceHost string

MySQL hostname.

servicePassword string

Password used for connecting to the MySQL service, if applicable.

servicePort number

MySQL port.

serviceType string

Aiven internal service type code

serviceUri string

URI for connecting to the MySQL service.

serviceUsername string

Username used for connecting to the MySQL service, if applicable.

state string

Service state.

components Sequence[MySqlComponent]

Service component information objects

id str
The provider-assigned unique ID for this managed resource.
service_host str

MySQL hostname.

service_password str

Password used for connecting to the MySQL service, if applicable.

service_port int

MySQL port.

service_type str

Aiven internal service type code

service_uri str

URI for connecting to the MySQL service.

service_username str

Username used for connecting to the MySQL service, if applicable.

state str

Service state.

Look up an Existing MySql Resource

Get an existing MySql 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?: MySqlState, opts?: CustomResourceOptions): MySql
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, cloud_name: Optional[str] = None, components: Optional[Sequence[MySqlComponentArgs]] = None, maintenance_window_dow: Optional[str] = None, maintenance_window_time: Optional[str] = None, mysql: Optional[MySqlMysqlArgs] = None, mysql_user_config: Optional[MySqlMysqlUserConfigArgs] = None, plan: Optional[str] = None, project: Optional[str] = None, project_vpc_id: Optional[str] = None, service_host: Optional[str] = None, service_integrations: Optional[Sequence[MySqlServiceIntegrationArgs]] = None, service_name: Optional[str] = None, service_password: Optional[str] = None, service_port: Optional[int] = None, service_type: Optional[str] = None, service_uri: Optional[str] = None, service_username: Optional[str] = None, state: Optional[str] = None, termination_protection: Optional[bool] = None) -> MySql
func GetMySql(ctx *Context, name string, id IDInput, state *MySqlState, opts ...ResourceOption) (*MySql, error)
public static MySql Get(string name, Input<string> id, MySqlState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

CloudName string

defines where the cloud provider and region where the service is hosted in. This can be changed freely after service is created. Changing the value will trigger a potentially lengthy migration process for the service. Format is cloud provider name (aws, azure, do google, upcloud, etc.), dash, and the cloud provider specific region name. These are documented on each Cloud provider’s own support articles, like here for Google and here for AWS.

Components List<MySqlComponentArgs>

Service component information objects

MaintenanceWindowDow string

day of week when maintenance operations should be performed. On monday, tuesday, wednesday, etc.

MaintenanceWindowTime string

time of day when maintenance operations should be performed. UTC time in HH:mm:ss format.

Mysql MySqlMysqlArgs

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

MysqlUserConfig MySqlMysqlUserConfigArgs

defines MySQL specific additional configuration options. The following configuration options available:

Plan string

defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are hobbyist, startup-x, business-x and premium-x where x is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The exact options can be seen from the Aiven web console’s Create Service dialog.

Project string

identifies the project the service belongs to. To set up proper dependency between the project and the service, refer to the project as shown in the above example. Project cannot be changed later without destroying and re-creating the service.

ProjectVpcId string

optionally specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference as shown above to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data.

ServiceHost string

MySQL hostname.

ServiceIntegrations List<MySqlServiceIntegrationArgs>

can be used to define service integrations that must exist immediately upon service creation. By the time of writing the only such integration is defining that MySQL service is a read-replica of another service. To define a read- replica the following configuration needs to be added:

ServiceName string

specifies the actual name of the service. The name cannot be changed later without destroying and re-creating the service so name should be picked based on intended service usage rather than current attributes.

ServicePassword string

Password used for connecting to the MySQL service, if applicable.

ServicePort int

MySQL port.

ServiceType string

Aiven internal service type code

ServiceUri string

URI for connecting to the MySQL service.

ServiceUsername string

Username used for connecting to the MySQL service, if applicable.

State string

Service state.

TerminationProtection bool

prevents the service from being deleted. It is recommended to set this to true for all production services to prevent unintentional service deletion. This does not shield against deleting databases or topics but for services with backups much of the content can at least be restored from backup in case accidental deletion is done.

CloudName string

defines where the cloud provider and region where the service is hosted in. This can be changed freely after service is created. Changing the value will trigger a potentially lengthy migration process for the service. Format is cloud provider name (aws, azure, do google, upcloud, etc.), dash, and the cloud provider specific region name. These are documented on each Cloud provider’s own support articles, like here for Google and here for AWS.

Components []MySqlComponent

Service component information objects

MaintenanceWindowDow string

day of week when maintenance operations should be performed. On monday, tuesday, wednesday, etc.

MaintenanceWindowTime string

time of day when maintenance operations should be performed. UTC time in HH:mm:ss format.

Mysql MySqlMysql

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

MysqlUserConfig MySqlMysqlUserConfig

defines MySQL specific additional configuration options. The following configuration options available:

Plan string

defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are hobbyist, startup-x, business-x and premium-x where x is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The exact options can be seen from the Aiven web console’s Create Service dialog.

Project string

identifies the project the service belongs to. To set up proper dependency between the project and the service, refer to the project as shown in the above example. Project cannot be changed later without destroying and re-creating the service.

ProjectVpcId string

optionally specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference as shown above to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data.

ServiceHost string

MySQL hostname.

ServiceIntegrations []MySqlServiceIntegration

can be used to define service integrations that must exist immediately upon service creation. By the time of writing the only such integration is defining that MySQL service is a read-replica of another service. To define a read- replica the following configuration needs to be added:

ServiceName string

specifies the actual name of the service. The name cannot be changed later without destroying and re-creating the service so name should be picked based on intended service usage rather than current attributes.

ServicePassword string

Password used for connecting to the MySQL service, if applicable.

ServicePort int

MySQL port.

ServiceType string

Aiven internal service type code

ServiceUri string

URI for connecting to the MySQL service.

ServiceUsername string

Username used for connecting to the MySQL service, if applicable.

State string

Service state.

TerminationProtection bool

prevents the service from being deleted. It is recommended to set this to true for all production services to prevent unintentional service deletion. This does not shield against deleting databases or topics but for services with backups much of the content can at least be restored from backup in case accidental deletion is done.

cloudName string

defines where the cloud provider and region where the service is hosted in. This can be changed freely after service is created. Changing the value will trigger a potentially lengthy migration process for the service. Format is cloud provider name (aws, azure, do google, upcloud, etc.), dash, and the cloud provider specific region name. These are documented on each Cloud provider’s own support articles, like here for Google and here for AWS.

components MySqlComponent[]

Service component information objects

maintenanceWindowDow string

day of week when maintenance operations should be performed. On monday, tuesday, wednesday, etc.

maintenanceWindowTime string

time of day when maintenance operations should be performed. UTC time in HH:mm:ss format.

mysql MySqlMysql

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

mysqlUserConfig MySqlMysqlUserConfig

defines MySQL specific additional configuration options. The following configuration options available:

plan string

defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are hobbyist, startup-x, business-x and premium-x where x is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The exact options can be seen from the Aiven web console’s Create Service dialog.

project string

identifies the project the service belongs to. To set up proper dependency between the project and the service, refer to the project as shown in the above example. Project cannot be changed later without destroying and re-creating the service.

projectVpcId string

optionally specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference as shown above to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data.

serviceHost string

MySQL hostname.

serviceIntegrations MySqlServiceIntegration[]

can be used to define service integrations that must exist immediately upon service creation. By the time of writing the only such integration is defining that MySQL service is a read-replica of another service. To define a read- replica the following configuration needs to be added:

serviceName string

specifies the actual name of the service. The name cannot be changed later without destroying and re-creating the service so name should be picked based on intended service usage rather than current attributes.

servicePassword string

Password used for connecting to the MySQL service, if applicable.

servicePort number

MySQL port.

serviceType string

Aiven internal service type code

serviceUri string

URI for connecting to the MySQL service.

serviceUsername string

Username used for connecting to the MySQL service, if applicable.

state string

Service state.

terminationProtection boolean

prevents the service from being deleted. It is recommended to set this to true for all production services to prevent unintentional service deletion. This does not shield against deleting databases or topics but for services with backups much of the content can at least be restored from backup in case accidental deletion is done.

cloud_name str

defines where the cloud provider and region where the service is hosted in. This can be changed freely after service is created. Changing the value will trigger a potentially lengthy migration process for the service. Format is cloud provider name (aws, azure, do google, upcloud, etc.), dash, and the cloud provider specific region name. These are documented on each Cloud provider’s own support articles, like here for Google and here for AWS.

components Sequence[MySqlComponentArgs]

Service component information objects

maintenance_window_dow str

day of week when maintenance operations should be performed. On monday, tuesday, wednesday, etc.

maintenance_window_time str

time of day when maintenance operations should be performed. UTC time in HH:mm:ss format.

mysql MySqlMysqlArgs

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

mysql_user_config MySqlMysqlUserConfigArgs

defines MySQL specific additional configuration options. The following configuration options available:

plan str

defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are hobbyist, startup-x, business-x and premium-x where x is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The exact options can be seen from the Aiven web console’s Create Service dialog.

project str

identifies the project the service belongs to. To set up proper dependency between the project and the service, refer to the project as shown in the above example. Project cannot be changed later without destroying and re-creating the service.

project_vpc_id str

optionally specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference as shown above to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data.

service_host str

MySQL hostname.

service_integrations Sequence[MySqlServiceIntegrationArgs]

can be used to define service integrations that must exist immediately upon service creation. By the time of writing the only such integration is defining that MySQL service is a read-replica of another service. To define a read- replica the following configuration needs to be added:

service_name str

specifies the actual name of the service. The name cannot be changed later without destroying and re-creating the service so name should be picked based on intended service usage rather than current attributes.

service_password str

Password used for connecting to the MySQL service, if applicable.

service_port int

MySQL port.

service_type str

Aiven internal service type code

service_uri str

URI for connecting to the MySQL service.

service_username str

Username used for connecting to the MySQL service, if applicable.

state str

Service state.

termination_protection bool

prevents the service from being deleted. It is recommended to set this to true for all production services to prevent unintentional service deletion. This does not shield against deleting databases or topics but for services with backups much of the content can at least be restored from backup in case accidental deletion is done.

Supporting Types

MySqlComponent

Component string
Host string
KafkaAuthenticationMethod string
Port int
Route string
Ssl bool
Usage string
Component string
Host string
KafkaAuthenticationMethod string
Port int
Route string
Ssl bool
Usage string
component string
host string
kafkaAuthenticationMethod string
port number
route string
ssl boolean
usage string

MySqlMysqlUserConfig

AdminPassword string

Custom password for admin user. Defaults to random string. This must be set only when a new service is being created.

AdminUsername string

Custom username for admin user. This must be set only when a new service is being created.

BackupHour string

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

BackupMinute string

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

IpFilters List<string>

Allow incoming connections from CIDR address block, e.g. ‘10.20.0.0/16’

Mysql MySqlMysqlUserConfigMysqlArgs

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

MysqlVersion string

MySQL major version

PrivateAccess MySqlMysqlUserConfigPrivateAccessArgs

Allow access to selected service ports from private networks

ProjectToForkFrom string

Name of another project to fork a service from. This has effect only when a new service is being created.

PublicAccess MySqlMysqlUserConfigPublicAccessArgs

Allow access to selected service ports from the public Internet

RecoveryTargetTime string

Recovery target time when forking a service. This has effect only when a new service is being created.

ServiceToForkFrom string

Name of another service to fork from. This has effect only when a new service is being created.

AdminPassword string

Custom password for admin user. Defaults to random string. This must be set only when a new service is being created.

AdminUsername string

Custom username for admin user. This must be set only when a new service is being created.

BackupHour string

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

BackupMinute string

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

IpFilters []string

Allow incoming connections from CIDR address block, e.g. ‘10.20.0.0/16’

Mysql MySqlMysqlUserConfigMysql

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

MysqlVersion string

MySQL major version

PrivateAccess MySqlMysqlUserConfigPrivateAccess

Allow access to selected service ports from private networks

ProjectToForkFrom string

Name of another project to fork a service from. This has effect only when a new service is being created.

PublicAccess MySqlMysqlUserConfigPublicAccess

Allow access to selected service ports from the public Internet

RecoveryTargetTime string

Recovery target time when forking a service. This has effect only when a new service is being created.

ServiceToForkFrom string

Name of another service to fork from. This has effect only when a new service is being created.

adminPassword string

Custom password for admin user. Defaults to random string. This must be set only when a new service is being created.

adminUsername string

Custom username for admin user. This must be set only when a new service is being created.

backupHour string

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

backupMinute string

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

ipFilters string[]

Allow incoming connections from CIDR address block, e.g. ‘10.20.0.0/16’

mysql MySqlMysqlUserConfigMysql

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

mysqlVersion string

MySQL major version

privateAccess MySqlMysqlUserConfigPrivateAccess

Allow access to selected service ports from private networks

projectToForkFrom string

Name of another project to fork a service from. This has effect only when a new service is being created.

publicAccess MySqlMysqlUserConfigPublicAccess

Allow access to selected service ports from the public Internet

recoveryTargetTime string

Recovery target time when forking a service. This has effect only when a new service is being created.

serviceToForkFrom string

Name of another service to fork from. This has effect only when a new service is being created.

admin_password str

Custom password for admin user. Defaults to random string. This must be set only when a new service is being created.

admin_username str

Custom username for admin user. This must be set only when a new service is being created.

backup_hour str

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

backup_minute str

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

ip_filters Sequence[str]

Allow incoming connections from CIDR address block, e.g. ‘10.20.0.0/16’

mysql MySqlMysqlUserConfigMysqlArgs

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

mysql_version str

MySQL major version

private_access MySqlMysqlUserConfigPrivateAccessArgs

Allow access to selected service ports from private networks

project_to_fork_from str

Name of another project to fork a service from. This has effect only when a new service is being created.

public_access MySqlMysqlUserConfigPublicAccessArgs

Allow access to selected service ports from the public Internet

recovery_target_time str

Recovery target time when forking a service. This has effect only when a new service is being created.

service_to_fork_from str

Name of another service to fork from. This has effect only when a new service is being created.

MySqlMysqlUserConfigMysql

ConnectTimeout string

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

DefaultTimeZone string

Default server time zone as an offset from UTC (from -12:00 to +12:00), a time zone name, or ‘SYSTEM’ to use the MySQL server default.

GroupConcatMaxLen string

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

InformationSchemaStatsExpiry string

The time, in seconds, before cached statistics expire

InnodbFtMinTokenSize string

Minimum length of words that are stored in an InnoDB FULLTEXT index.

InnodbFtServerStopwordTable string

This option is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB tables.

InnodbLockWaitTimeout string

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

InnodbLogBufferSize string

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

InnodbOnlineAlterLogMaxSize string

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

InnodbPrintAllDeadlocks string

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

InnodbRollbackOnTimeout string

When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction.

InteractiveTimeout string

The number of seconds the server waits for activity on an interactive connection before closing it.

MaxAllowedPacket string

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

MaxHeapTableSize string

Limits the size of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M)

NetReadTimeout string

The number of seconds to wait for more data from a connection before aborting the read.

NetWriteTimeout string

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

SortBufferSize string

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

SqlMode string

Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field Aiven default SQL mode (strict, SQL standard compliant) will be assigned.

SqlRequirePrimaryKey string

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.

TmpTableSize string

Limits the size of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M)

WaitTimeout string

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

ConnectTimeout string

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

DefaultTimeZone string

Default server time zone as an offset from UTC (from -12:00 to +12:00), a time zone name, or ‘SYSTEM’ to use the MySQL server default.

GroupConcatMaxLen string

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

InformationSchemaStatsExpiry string

The time, in seconds, before cached statistics expire

InnodbFtMinTokenSize string

Minimum length of words that are stored in an InnoDB FULLTEXT index.

InnodbFtServerStopwordTable string

This option is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB tables.

InnodbLockWaitTimeout string

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

InnodbLogBufferSize string

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

InnodbOnlineAlterLogMaxSize string

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

InnodbPrintAllDeadlocks string

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

InnodbRollbackOnTimeout string

When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction.

InteractiveTimeout string

The number of seconds the server waits for activity on an interactive connection before closing it.

MaxAllowedPacket string

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

MaxHeapTableSize string

Limits the size of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M)

NetReadTimeout string

The number of seconds to wait for more data from a connection before aborting the read.

NetWriteTimeout string

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

SortBufferSize string

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

SqlMode string

Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field Aiven default SQL mode (strict, SQL standard compliant) will be assigned.

SqlRequirePrimaryKey string

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.

TmpTableSize string

Limits the size of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M)

WaitTimeout string

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

connectTimeout string

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

defaultTimeZone string

Default server time zone as an offset from UTC (from -12:00 to +12:00), a time zone name, or ‘SYSTEM’ to use the MySQL server default.

groupConcatMaxLen string

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

informationSchemaStatsExpiry string

The time, in seconds, before cached statistics expire

innodbFtMinTokenSize string

Minimum length of words that are stored in an InnoDB FULLTEXT index.

innodbFtServerStopwordTable string

This option is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB tables.

innodbLockWaitTimeout string

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

innodbLogBufferSize string

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

innodbOnlineAlterLogMaxSize string

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

innodbPrintAllDeadlocks string

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

innodbRollbackOnTimeout string

When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction.

interactiveTimeout string

The number of seconds the server waits for activity on an interactive connection before closing it.

maxAllowedPacket string

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

maxHeapTableSize string

Limits the size of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M)

netReadTimeout string

The number of seconds to wait for more data from a connection before aborting the read.

netWriteTimeout string

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

sortBufferSize string

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

sqlMode string

Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field Aiven default SQL mode (strict, SQL standard compliant) will be assigned.

sqlRequirePrimaryKey string

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.

tmpTableSize string

Limits the size of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M)

waitTimeout string

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

connect_timeout str

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

default_time_zone str

Default server time zone as an offset from UTC (from -12:00 to +12:00), a time zone name, or ‘SYSTEM’ to use the MySQL server default.

group_concat_max_len str

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

information_schema_stats_expiry str

The time, in seconds, before cached statistics expire

innodb_ft_min_token_size str

Minimum length of words that are stored in an InnoDB FULLTEXT index.

innodb_ft_server_stopword_table str

This option is used to specify your own InnoDB FULLTEXT index stopword list for all InnoDB tables.

innodb_lock_wait_timeout str

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

innodb_log_buffer_size str

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

innodb_online_alter_log_max_size str

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

innodb_print_all_deadlocks str

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

innodb_rollback_on_timeout str

When enabled a transaction timeout causes InnoDB to abort and roll back the entire transaction.

interactive_timeout str

The number of seconds the server waits for activity on an interactive connection before closing it.

max_allowed_packet str

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

max_heap_table_size str

Limits the size of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M)

net_read_timeout str

The number of seconds to wait for more data from a connection before aborting the read.

net_write_timeout str

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

sort_buffer_size str

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

sql_mode str

Global SQL mode. Set to empty to use MySQL server defaults. When creating a new service and not setting this field Aiven default SQL mode (strict, SQL standard compliant) will be assigned.

sql_require_primary_key str

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.

tmp_table_size str

Limits the size of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M)

wait_timeout str

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

MySqlMysqlUserConfigPrivateAccess

Mysql string

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

Prometheus string

Allow clients to connect to prometheus from the public internet for service nodes that are in a project VPC or another type of private network

Mysql string

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

Prometheus string

Allow clients to connect to prometheus from the public internet for service nodes that are in a project VPC or another type of private network

mysql string

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

prometheus string

Allow clients to connect to prometheus from the public internet for service nodes that are in a project VPC or another type of private network

mysql str

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

prometheus str

Allow clients to connect to prometheus from the public internet for service nodes that are in a project VPC or another type of private network

MySqlMysqlUserConfigPublicAccess

Mysql string

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

Prometheus string

Allow clients to connect to prometheus from the public internet for service nodes that are in a project VPC or another type of private network

Mysql string

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

Prometheus string

Allow clients to connect to prometheus from the public internet for service nodes that are in a project VPC or another type of private network

mysql string

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

prometheus string

Allow clients to connect to prometheus from the public internet for service nodes that are in a project VPC or another type of private network

mysql str

Allow clients to connect to mysql from the public internet for service nodes that are in a project VPC or another type of private network

prometheus str

Allow clients to connect to prometheus from the public internet for service nodes that are in a project VPC or another type of private network

MySqlServiceIntegration

Package Details

Repository
https://github.com/pulumi/pulumi-aiven
License
Apache-2.0
Notes
This Pulumi package is based on the aiven Terraform Provider.