-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add readme-cn and improve modules readme
- Loading branch information
Showing
29 changed files
with
343 additions
and
747 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
terraform-alicloud-rds | ||
===================================================================== | ||
|
||
|
||
本 Module 用于在阿里云的 VPC 下创建一个[云服务器rds实例(rds Instance)](https://help.aliyun.com/document_detail/26092.html?spm=a2c4g.11174283.2.2.19df4c22TsZmot). | ||
|
||
本 Module 支持创建以下资源: | ||
|
||
* [云服务器rds实例(rds Instance)](https://www.terraform.io/docs/providers/alicloud/r/db_instance.html) | ||
|
||
## Terraform 版本 | ||
|
||
如果您正在使用 Terraform 0.12,请使用此模块的`v2.*` and `v1.3.0` 版本。 | ||
|
||
如果您正在使用 Terraform 0.11,请使用此模块的`v1.2.*` 版本. | ||
|
||
## 用法 | ||
|
||
```hcl | ||
variable "region" { | ||
default = "cn-hangzhou" | ||
} | ||
provider "alicloud" { | ||
region = var.region | ||
} | ||
data "alicloud_vpcs" "default" { | ||
is_default = true | ||
} | ||
module "mysql" { | ||
source = "terraform-alicloud-modules/rds/alicloud/mysql-8.0-high-availability" | ||
region = var.region | ||
connection_prefix = "developmentabc" | ||
vswitch_id = data.alicloud_vpcs.default.vpcs.0.vswitch_ids.0 | ||
instance_name = "myDBInstance" | ||
security_ips = [ | ||
"11.193.54.0/24", | ||
"101.37.74.0/24", | ||
"10.137.42.0/24", | ||
"121.43.18.0/24"] | ||
preferred_backup_period = ["Monday", "Wednesday"] | ||
preferred_backup_time = "00:00Z-01:00Z" | ||
backup_retention_period = 7 | ||
log_backup_retention_period = 7 | ||
########### | ||
#databases# | ||
########### | ||
account_name = "account_name1" | ||
password = "1234abc" | ||
privilege = "ReadWrite" | ||
databases = [ | ||
{ | ||
name = "dbuserv1" | ||
character_set = "utf8" | ||
description = "db1" | ||
}, | ||
{ | ||
name = "dbuserv2" | ||
character_set = "utf8" | ||
description = "db2" | ||
}, | ||
] | ||
} | ||
``` | ||
|
||
## 示例 | ||
|
||
* [Mysql 实例完整创建示例创建示例](https://github.com/terraform-alicloud-modules/terraform-alicloud-rds/tree/master/examples/mysql) | ||
* [PostSQL 实例完整创建示例创建示例](https://github.com/terraform-alicloud-modules/terraform-alicloud-rds/tree/master/examples/postgre_sql) | ||
* [PPAS 实例完整创建示例创建示例](https://github.com/terraform-alicloud-modules/terraform-alicloud-rds/tree/master/examples/ppas) | ||
* [SQL Server 实例完整创建示例创建示例](https://github.com/terraform-alicloud-modules/terraform-alicloud-rds/tree/master/examples/sql_server) | ||
|
||
## 注意事项 | ||
|
||
* 本 Module 使用的 AccessKey 和 SecretKey 可以直接从 `profile` 和 `shared_credentials_file` 中获取。如果未设置,可通过下载安装 [aliyun-cli](https://github.com/aliyun/aliyun-cli#installation) 后进行配置. | ||
* 本 Module 用创建 VPC 实例,`vswitch_id` 和 `vswitch_ids` 至少要设置一个。如果两个都设置了,`vswitch_id` 将会优先于 `vswitch_ids` 被使用。 | ||
|
||
作者 | ||
------- | ||
Created and maintained by He Guimin(@xiaozhu36, heguimin36@163.com) | ||
|
||
许可 | ||
---- | ||
Apache 2 Licensed. See LICENSE for full details. | ||
|
||
参考 | ||
--------- | ||
* [Terraform-Provider-Alicloud Github](https://github.com/terraform-providers/terraform-provider-alicloud) | ||
* [Terraform-Provider-Alicloud Release](https://releases.hashicorp.com/terraform-provider-alicloud/) | ||
* [Terraform-Provider-Alicloud Docs](https://www.terraform.io/docs/providers/alicloud/index.html) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.