Terraform module which creates RDS on Flexible Engine. Available datastore are:
- PostgreSQL
- MySQL
- SQLServer
More details about supported version in followed link https://registry.terraform.io/providers/FlexibleEngineCloud/flexibleengine/latest/docs/resources/rds_instance_v3
module "rds" {
source = "FlexibleEngineCloud/rds/flexibleengine"
version = "2.1.5"
vpc_name = "vpc-main"
subnet_name = "subnet-cce"
db_type = "MySQL"
db_version = "5.6.35"
db_flavor = "rds.mysql.s1.medium"
db_sg = "sg-test-rds"
db_tcp_port = "8635"
db_backup_starttime = "08:00-09:00"
db_backup_keepdays = 4
db_root_password = "FooBarPasswd1234!"
rds_ha_enable = false
rds_ha_replicamode = "async"
rds_instance_name = "rds_mysql_foo"
rds_instance_volume_type = "COMMON"
rds_instance_volume_size = 100
rds_instance_az = ["eu-west-0a"]
}
################################
### Terragrunt Configuration ###
################################
terraform {
source = "FlexibleEngineCloud/rds/flexibleengine"
version = "2.1.5"
}
include {
path = find_in_parent_folders()
}
##################
### Parameters ###
##################
inputs = {
vpc_name = "vpc-main"
subnet_name = "subnet-cce"
db_type = "MySQL"
db_version = "5.6.35"
db_flavor = "rds.mysql.s1.medium"
db_sg = "sg-test-rds"
db_tcp_port = "8635"
db_backup_starttime = "08:00-09:00"
db_backup_keepdays = 4
db_root_password = "FooBarPasswd1234!"
rds_ha_enable = false
rds_ha_replicamode = "async"
rds_instance_name = "rds_mysql_foo"
rds_instance_volume_type = "COMMON"
rds_instance_volume_size = 100
rds_instance_az = ["eu-west-0a"]
}
If you are using an RDS in HA mode, you must add ".ha" to your flavor.
Exemple : if you are using the flavor rds.mysql.s1.medium, the HA flavor is rds.mysql.s1.medium.ha
Refer to the FE RDS Documentation
Name | Description | Type | Default | Required |
---|---|---|---|---|
db_backup_keepdays | keep days of database backup | number |
3 |
no |
db_backup_starttime | start time of database backup (Exemple : 08:00-09:00) | string |
"01:00-02:00" |
no |
db_flavor | Flavor of database. Check Terraform and FE documentation to get flavor list | string |
"" |
no |
db_root_password | root password of RDS | string |
"" |
no |
secgroup_id | Security group id to use for RDS | string |
"" |
no |
db_tcp_port | TCP port of database | string |
"" |
no |
db_type | Type of database. Can be MySQL, PostgreSQL, SQLServer | string |
"" |
no |
db_version | Version of database. Check Terraform and FE documentation to get version list | string |
"" |
no |
rds_ha_enable | To enable HA of RDS | bool |
false |
no |
rds_ha_replicamode | To enable HA of RDS | string |
"" |
no |
rds_instance_az | Availability zones of RDS instance (Multiple AZ must be specified if you are using HA) | list(string) |
[ |
no |
rds_instance_name | name of RDS instances | string |
"" |
no |
rds_instance_volume_encryption_id | KMS Key id for encryption | string |
null |
no |
rds_instance_volume_size | Volume size of instances | number |
0 |
no |
rds_instance_volume_type | Volume type of instances | string |
"COMMON" |
no |
rds_parametergroup_values | Map of the values of the parameter group | map(string) |
{} |
no |
rds_read_replicat_list | n/a | list(object({ |
n/a | yes |
subnet_id | ID of the subnet | string |
"" |
no |
vpc_id | ID of the VPC | string |
null |
no |
Name | Description |
---|---|
id | Instance id |
nodes | List of RDS nodes |
private_ips | Private IP address list of nodes |
public_ips | Public IP address list of nodes |