forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ots.yml
173 lines (173 loc) · 3.46 KB
/
ots.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
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建OTS实例、表、搜索索引,配置VPC与VSwitch绑定,支持公网、私网访问,自动获取资源属性。
en: Create OTS (Table Store) instances, tables, and search indexes, configure VPC
(Virtual Private Cloud) and VSwitch bindings, supporting both public and private
network access, with automatic retrieval of resource attributes.
Parameters:
InstanceName:
Type: String
Default: mytest
TableName:
Type: String
Default: mytest
ClusterType:
Type: String
Default: HYBRID
PrimaryKey:
Type: Json
Default:
- Type: INTEGER
Name: id
Network:
Type: String
Default: VPC
AllowedValues:
- NORMAL
- VPC
- VPC_CONSOLE
VSwitchName:
Type: String
Default: mytest
VpcName:
Type: String
Default: mytest
InstanceVpcName:
Type: String
Default: mytest
SearchIndexName:
Type: String
Default: searchIndex
FieldSchemas:
Type: Json
Default:
- FieldName: id
FieldType: FieldType.LONG
IsArray: false
Index: true
EnableSortAndAgg: true
Store: true
ZoneId:
Type: String
Label:
en: Zone ID
zh-cn: 可用区ID
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
Resources:
Instance:
Type: ALIYUN::OTS::Instance
Properties:
Network: NORMAL
ClusterType:
Ref: ClusterType
InstanceName:
Ref: InstanceName
Description: Test Ots Instance
Tags:
- Key: mytest
Value: ''
Table:
Type: ALIYUN::OTS::Table
Properties:
TableName:
Fn::Join:
- ''
- Fn::Split:
- '-'
- Ref: TableName
InstanceName:
Ref: InstanceName
PrimaryKey:
Ref: PrimaryKey
DependsOn: Instance
SearchIndex:
Type: ALIYUN::OTS::SearchIndex
Properties:
IndexName:
Ref: SearchIndexName
InstanceName:
Fn::GetAtt:
- Instance
- InstanceName
TableName:
Fn::GetAtt:
- Table
- TableName
FieldSchemas:
Ref: FieldSchemas
DependsOn: Table
Vpc:
Type: ALIYUN::ECS::VPC
Properties:
VpcName:
Ref: VpcName
CidrBlock: 192.168.0.0/16
VSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: Vpc
VSwitchName:
Ref: VSwitchName
CidrBlock: 192.168.10.0/24
DependsOn: Vpc
VpcBinder:
Type: ALIYUN::OTS::VpcBinder
Properties:
InstanceName:
Fn::GetAtt:
- Instance
- InstanceName
Vpcs:
- VpcId:
Ref: Vpc
InstanceVpcName:
Ref: InstanceVpcName
VirtualSwitchId:
Ref: VSwitch
Network:
Ref: Network
DependsOn: VSwitch
Outputs:
TableName:
Value:
Fn::GetAtt:
- Table
- TableName
InstanceName:
Value:
Fn::GetAtt:
- Instance
- InstanceName
IndexName:
Value:
Fn::GetAtt:
- SearchIndex
- IndexName
PublicEndpoint:
Value:
Fn::GetAtt:
- Instance
- PublicEndpoint
PrivateEndpoint:
Value:
Fn::GetAtt:
- Instance
- PrivateEndpoint
VpcEndpoint:
Value:
Fn::GetAtt:
- Instance
- VpcEndpoint
Domains:
Value:
Fn::GetAtt:
- VpcBinder
- Domains
Endpoints:
Value:
Fn::GetAtt:
- VpcBinder
- Endpoints