forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
polardb-x-best-practice.yml
106 lines (106 loc) · 3.73 KB
/
polardb-x-best-practice.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建PolarDBX数据库账号和数据库,设定权限与字符集,自动模式,输出数据库名和用户名。
en: Create a PolarDBX database account and database, set permissions and character
sets, use automatic mode, and output the database name and username.
Parameters:
PolarDBXInstanceId:
Type: String
Label:
en: PolarDBX-RdsInstanceId
zh-cn: PolarDBX数据库实例Id
Description:
en: The id of RDS instance, make sure the instance has entered the running state
zh-cn: 数据库实例Id,请确保实例已经进入运行中的状态。
DBName:
Type: String
Label:
en: Database Name
zh-cn: 数据库(DB)名称
Description:
en: The value can be up to 64 characters in length and can contain lowercase
letters, digits, underscores (_), and hyphens (-). It must start with a lowercase
letter and end with a lowercase letter or digit. An underscore (_) is regarded
as two characters.
zh-cn: 由小写字母、数字、下划线(_)、中划线(-)组成,以小写字母开头,小写字母或数字结尾,最多64个字符。注意:下划线(_)会被看作两个字符。
Default: testdb
AllowedPattern: ^[a-z][a-z0-9_-]{0,62}[a-z0-9]$
AccountName:
Type: String
Label:
en: Database Account
zh-cn: 数据库账号
Description:
en: The account name must be 2 to 32 characters in length and can contain lowercase
letters, digits, and underscores (_). It must start with a letter and end
with a letter or digit.
zh-cn: 由小写字母、数字、下划线(_)组成,以字母开头,以字母或数字结尾,最多32个字符。
Default: testuser
AllowedPattern: ^[a-z][a-z0-9_-]{0,30}[a-z0-9]$
Password:
Type: String
Label:
en: Database account password
zh-cn: 数据库账号密码
Description:
en: 'The password must be 8 to 32 characters in length and must contain at least
three of the following types: uppercase letters, lowercase letter, digits,
and special characters. Special characters include <span style="background:#E7E9EB;"><b>!@#$%^&*()_+-=</b></span>'
zh-cn: 必须包含三种及以上类型:大写字母、小写字母、数字、特殊符号。长度为8~32位。特殊字符包括<span style="background:#E7E9EB;"><b>!@#$%^&*()_+-=</b></span>
AssociationProperty: ALIYUN::RDS::Instance::AccountPassword
NoEcho: true
Confirm: true
Resources:
Account:
Type: ALIYUN::PolarDBX::Account
Properties:
AccountName:
Ref: AccountName
AccountDescription: tutorial account
AccountPassword:
Ref: Password
DBInstanceId:
Ref: PolarDBXInstanceId
DbBase:
Type: ALIYUN::PolarDBX::Database
Properties:
DBInstanceId:
Ref: PolarDBXInstanceId
CharacterSetName: utf8
DatabaseName:
Ref: DBName
DatabaseDescription: tutorial base
Mode: auto
Accounts:
- AccountPrivilege: ReadWrite
AccountName:
Fn::GetAtt:
- Account
- AccountName
Outputs:
DBName:
Description:
en: The name of database.
zh-cn: 数据库名称。
Value:
Fn::GetAtt:
- DbBase
- DatabaseName
AccountName:
Description:
en: Database username.
zh-cn: 数据库用户名。
Value:
Fn::GetAtt:
- Account
- AccountName
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- PolarDBXInstanceId
- DBName
- AccountName
- Password
TemplateTags:
- acs:document:试用教程:云原生数据库PolarDB分布式版企业版试用