frostmoln_mysql_instance (Resource)
Manages a managed MySQL database instance in the Frostmoln platform.
Example Usage
terraform
resource "frostmoln_mysql_instance" "main" {
name = "my-mysql-db"
version = "8.4"
flavor_id = "db.gp1.small"
storage_gb = 50
vpc_id = frostmoln_vpc.main.id
subnet_id = frostmoln_subnet.db.id
backup_enabled = true
backup_schedule = "0 2 * * *"
backup_retention_days = 35
}
output "mysql_endpoint" {
value = "${frostmoln_mysql_instance.main.private_ip}:${frostmoln_mysql_instance.main.port}"
}Schema
Required
flavor_id(String) The flavor ID/size for the database instance (e.g. "db.gp1.small", "db.gp1.medium").name(String) The name of the MySQL instance.storage_gb(Number) The storage size in gigabytes. Can be increased in place (online resize); decreasing it is not supported.subnet_id(String) The subnet ID where the database instance will be deployed.version(String) The MySQL version (e.g. "8.0", "8.4", "9.2").vpc_id(String) The VPC ID where the database instance will be deployed.
Optional
backup_enabled(Boolean) Whether automated backups are enabled.backup_retention_days(Number) Number of days to retain backups. Minimum 35 (backups are immutably object-locked for 35 days); maximum 90. Defaults to 35 server-side.backup_schedule(String) Cron expression for the backup schedule. Defaults to "0 2 * * *" server-side.ha_enabled(Boolean) Whether high availability is enabled with a standby replica.parameter_group_id(String) The ID of the parameter group to apply to the instance.
Read-Only
admin_username(String) The admin username for the MySQL instance.created_at(String) The timestamp when the instance was created.id(String) The unique identifier of the MySQL instance.port(Number) The port number the MySQL instance is listening on.private_ip(String) The private IP address of the MySQL instance.public_ip(String) The public IP address, if assigned.status(String) The current status of the MySQL instance.tenant_id(String) The tenant ID that owns this instance.updated_at(String) The timestamp when the instance was last updated.