Skip to content

shanye997/terraform-alicloud-polardb-mysql

 
 

Repository files navigation

Terraform module which creates polardb MySQL cluster service on Alibaba Cloud

terraform-alicloud-polardb-mysql

English | 简体中文

This module is used to create a polardb MySQL cluster service with VPC and VSwitch under Alibaba Cloud.

These types of resources are supported:

Usage

module "example" {
  source                        = "terraform-alicloud-modules/polardb-mysql/alicloud"
  #alicloud_polardb_cluster
  create_cluster                = true
  db_version                    = "8.0" 
  pay_type                      = "PostPaid"
  db_node_class                 = "polar.mysql.x4.medium"
  polardb_cluster_description   = "tf-test"
  modify_type                   = "Upgrade"
  renewal_status                = "Normal"
  tde_status                    = "Disabled"
  parameters = [
    {
      name  = "wait_timeout"
      value = "86"
    }
  ]
  #alicloud_polardb_database
  create_database               = true
  db_name                       = "tf-dbname"
  #alicloud_polardb_account
  create_account                = true
  account_name                  = "tf_test123" 
  account_password              = "tf_test123"
  account_type                  = "Normal"
  #alicloud_polardb_endpoint
  create_endpoint               = true
  endpoint_type                 = "Custom"
  read_write_mode               = "ReadOnly"
  auto_add_new_nodes            = "Enable"
  net_type                      = "Public"
  #alicloud_polardb_endpoint_address
  create_endpoint_address       = true
  connection_prefix             = "testpolardbconn"
  account_privilege             = "ReadOnly"
  #alicloud_polardb_account_privilege
  create_account_privilege      = true
  #alicloud_polardb_backup_policy
  create_backup_policy          = true
  preferred_backup_period                     = ["Tuesday", "Saturday"]
  preferred_backup_time                       = "02:00Z-03:00Z"
  data_level1_backup_retention_period         = "7"
  data_level2_backup_retention_period         = "60"
  backup_retention_policy_on_cluster_deletion = "LATEST"
  backup_frequency                            = "Normal"
  data_level1_backup_frequency                = "Normal"
  data_level1_backup_time                     = "02:00Z-03:00Z"
  data_level1_backup_period                   = ["Tuesday", "Saturday"]
  data_level2_backup_period                   = ["Tuesday", "Saturday"]
}

Examples

Notes

  • This module using AccessKey and SecretKey are from profile and shared_credentials_file. If you have not set them yet, please install aliyun-cli and configure it.

Requirements

Name Version
terraform > = 0.13.0
alicloud > = 1.130.0

Providers

Name Version
alicloud > = 1.130.0

Submit Issues

If you have any problems when using this module, please opening a provider issue and let us know.

Note: There does not recommend opening an issue on this repo.

Authors

Created and maintained by Alibaba Cloud Terraform Team(terraform@alibabacloud.com).

License

MIT Licensed. See LICENSE for full details.

Reference

About

Terraform Module for creating PolarDB for MySQL on Alibaba Cloud.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 100.0%