English | 简体中文
Terraform module which creates RDS instance(s) on Alibaba Cloud.
These types of resources are supported:
This module requires Terraform 0.12.
module "mysql" {
source = "terraform-alicloud-modules/rds/alicloud"
profile = "Your-Profile-Name"
region = "cn-beijing"
engine = "MySQL"
engine_version = "8.0"
connection_prefix = "developmentabc"
vswitch_id = "vsw-bp1tili2u5kpgdk84osjk"
instance_storage = 20
period = 1
instance_type = "rds.mysql.s2.large"
instance_name = "myDBInstance"
instance_charge_type = "Postpaid"
security_ips = [
"11.193.54.0/24",
"121.43.18.0/24"
]
tags = {
Created = "Terraform"
Environment = "dev"
}
###############
#backup_policy#
###############
preferred_backup_period = ["Monday", "Wednesday"]
preferred_backup_time = "00:00Z-01:00Z"
backup_retention_period = 7
log_backup_retention_period = 7
enable_backup_log = true
###########
#databases#
###########
account_name = "account_name1"
password = "1234abc"
type = "Normal"
privilege = "ReadWrite"
databases = [
{
name = "dbuserv1"
character_set = "utf8"
description = "db1"
},
{
name = "dbuserv2"
character_set = "utf8"
description = "db2"
},
]
}
- This module using AccessKey and SecretKey are from
profile
andshared_credentials_file
. If you have not set them yet, please install aliyun-cli and configure it.
Created and maintained by He Guimin(@xiaozhu36, [email protected])
Apache 2 Licensed. See LICENSE for full details.