-
Notifications
You must be signed in to change notification settings - Fork 35
/
rds-instance.yml
189 lines (189 loc) · 5.59 KB
/
rds-instance.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建RDS实例,可选引擎类型及版本、规格、存储容量、网络类型及白名单IP,支持VPC配置,提供实例连接信息输出。
en: Creating an RDS instance involves selecting the optional database engine type
and version, specifications, storage capacity, network type, and whitelist IP
addresses. It supports VPC configuration and provides output of instance connection
information.
Parameters:
DBInstanceEngineAndVersion:
Type: String
Label:
en: Engine And Version
zh-cn: 引擎类型加规格
Description:
en: Database instance engine type, default is 'Mysql'.Support MySQL/SQLServer/PostgreSQL/PPAS/MariaDB
now.
zh-cn: 数据库实例引擎类型,默认为Mysql,现在支持Mysql/SQLServer/PostgreSQL/PPAS/MariaDB。
Default: MySQL-5.6
AllowedValues:
- MySQL-5.6
- SQLServer-2008r2
- PostgreSQL-9.4
- PPAS-9.3
DBInstanceClass:
Type: String
Label:
en: DB Instance Class
zh-cn: 实例规格
Description:
en: 'Select the instance specification based on the type of database engine
and the available area support;<br>see detail: <a href=''https://www.alibabacloud.com/help/doc-detail/26312.html''
target=''_blank''><b><font color=''blue''>Instance specification sheet</font></b></a>'
zh-cn: 根据数据库引擎的类型和可用的区域支持选择实例规格;<br>请参见详细信息:<a href='https://help.aliyun.com/document_detail/26312.html'
target='_blank'><b><font color='blue'>实例规格表</font></b></a>
Default: rds.mysql.t1.small
AllowedValues:
- rds.mysql.t1.small
- rds.mys2.small
- rds.mys2.mid
- rds.mys2.standard
- rds.mys2.large
- rds.mys2.xlarge
- rds.mys2.2xlarge
- rds.mys2.4xlarge
- rds.mys2.8xlarge
- rds.mss1.small
- rds.mss1.mid
- rds.mss1.standard
- rds.mss1.large
- rds.mss1.xlarge
- rds.mss1.2xlarge
- rds.mss1.4xlarge
- rds.mss1.8xlarge
- rds.pg.t1.small
- rds.pg.s1.small
- rds.pg.s2.large
- rds.pg.s3.large
- rds.pg.c1.large
- rds.pg.c1.xlarge
- rds.ppas.s3.large
- rds.ppas.m1.medium
- rds.ppas.c1.xlarge
- rds.ppas.c2.xlarge
DBInstanceStorage:
Type: Number
Label:
en: Storage
zh-cn: 实例存储
Description:
en: The size range of RDS instances is 20 - 2000, Incrementing in every 5, unit
GB
zh-cn: RDS实例大小范围为20-2000,每5个增量,单位为GB
ConstraintDescription:
en: The size range of RDS instances is 20 - 2000, Incrementing in every 5, unit
GB
zh-cn: RDS实例大小范围为20-2000,每5个增量,单位为GB
Default: 20
MinValue: 20
MaxValue: 2000
DBInstanceNetType:
Type: String
Label:
en: Network Type
zh-cn: 网络类型
Description:
en: Database instance net type, default is Intranet.Internet for public access,
Intranet for private access.
zh-cn: 数据库实例网络类型,默认为Intranet.Internet用于公共访问,Intranet用于私人访问。
Default: Intranet
AllowedValues:
- Internet
- Intranet
SecurityIPList:
Type: String
Label:
en: Security IP List
zh-cn: 实例白名单IP列表
Description:
en: Instance Whitelist IP List, separated by commas, do not be repeated
zh-cn: 实例白名单IP列表,允许访问数据库,用逗号分隔,不重复。
Default: 0.0.0.0/0
VSwitchId:
Type: String
Label:
en: VSwitch ID
zh-cn: 网络交换机ID
Description:
en: Please search the business VSwitch ID starts with(vsw-xxx)from console-Virtual
Private Cloud-VSwitches
zh-cn: 现有业务网络交换机的实例ID,控制台-VPC-专有网络-交换机下查询
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
AssociationPropertyMetadata:
VpcId: VpcId
VpcId:
Type: String
Label:
en: Existing VPC ID
zh-cn: 现有VPC的实例ID
Description:
en: Please search the ID starts with (vpc-xxx)from console-Virtual Private Cloud
zh-cn: 控制台-VPC-专有网络下查询
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Resources:
Database:
Type: ALIYUN::RDS::DBInstance
Properties:
VpcId:
Ref: VpcId
VSwitchId:
Ref: VSwitchId
DBInstanceClass:
Ref: DBInstanceClass
DBInstanceNetType:
Ref: DBInstanceNetType
DBInstanceStorage:
Ref: DBInstanceStorage
Engine:
Fn::Select:
- '0'
- Fn::Split:
- '-'
- Ref: DBInstanceEngineAndVersion
EngineVersion:
Fn::Select:
- '1'
- Fn::Split:
- '-'
- Ref: DBInstanceEngineAndVersion
SecurityIPList:
Ref: SecurityIPList
Outputs:
DBInstanceId:
Value:
Fn::GetAtt:
- Database
- DBInstanceId
InnerConnectionString:
Value:
Fn::GetAtt:
- Database
- InnerConnectionString
InnerPort:
Value:
Fn::GetAtt:
- Database
- InnerPort
PublicConnectionString:
Value:
Fn::GetAtt:
- Database
- PublicConnectionString
PublicPort:
Value:
Fn::GetAtt:
- Database
- PublicPort
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- DBInstanceEngineAndVersion
- DBInstanceClass
- DBInstanceStorage
- DBInstanceNetType
- SecurityIPList
Label:
default: RDS
TemplateTags:
- acs:example:数据库:创建RDS实例