-
Notifications
You must be signed in to change notification settings - Fork 35
/
ecs-image-disk-snapshot.yml
173 lines (173 loc) · 5.18 KB
/
ecs-image-disk-snapshot.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: 通过指定镜像ID和快照,配置ECS实例属性,如系统盘、网络、安全组等,批量创建云端服务器实例。
en: Configure ECS instance properties, such as system disks, networking, security
groups, by specifying image IDs and snapshots to batch create cloud server instances.
Parameters:
AllocatePublicIP:
Type: Boolean
Label: Allocate Public IP
Description: If selected, a public IP will be allocated to the created ECS instance.
This attribute only takes effect for classic instances.
Default: true
DiskName:
Type: String
Label: Disk Name
Description: Display name of the disk, [2, 128] English or Chinese characters,
must start with a letter or Chinese in size, can contain numbers, '_' or '.',
'-'.
Default: mydiskname
DiskSize:
Type: Number
Label: Disk Size
Description: 'The size of the volume, unit in GB.Value range: cloud: [5,2000],
cloud_efficiency: [20,32768], cloud_ssd: [20,32768], ephemeral_ssd: [5,800].The
value should be equal to or greater than the specific snapshot.'
Default: 40
ImageId:
Type: String
Label: Ecs Image Id
Description: Image Id, represents the image resource to startup the ECS instance,
<a href='#/product/cn-beijing/list/imageList' target='_blank'>View image resources</a>
Default: centos_7
SnapshotId:
Type: String
Label: Snapshot Id
Description: ID of the snapshot to create the volume.
InstanceName:
Type: String
Label: ECS Instance Name
Description: The name of ECS instance
Default: myecsInstance
InstanceType:
Type: String
Label: Ecs Instance type
Description: The ECS instance type, <a href='#/product/cn-beijing/list/typeList'
target='_blank'>View instance types</a>
Default: ecs.n1.large
AllowedValues:
- ecs.n1.large
- ecs.n1.xlarge
- ecs.n1.3xlarge
- ecs.sn2.medium
InternetChargeType:
Type: String
Label: Internet ChargeType
Description: Instance internet access charge type.Support 'PayByBandwidth' and
'PayByTraffic' only.
Default: PayByBandwidth
AllowedValues:
- PayByBandwidth
- PayByTraffic
IoOptimized:
Type: String
Label: Io Optimized
Description: The 'optimized' instance can provide better IO performance. Support
'none' and 'optimized' only, default is 'optimized'.
Default: optimized
AllowedValues:
- none
- optimized
MaxAmount:
Type: Number
Label: The Maximum Of ECS Instances
Description: The maximum of ECS instances, must be greater than or equal to the
minimum.
ConstraintDescription: An integer within [1, 100]
Default: 1
MinValue: 1
MaxValue: 100
MinAmount:
Type: Number
Label: The Minimum Of ECS Instances
Description: The minimum of ECS instances, must be greater than or equal to the
minimum.
ConstraintDescription: An integer within [1, 100]
Default: 1
MinValue: 1
MaxValue: 100
Password:
Type: String
Label: Ecs Instance Password
Description: The login password of ECS instance
ConstraintDescription: '[8, 30] characters, consists of uppercase letter, lowercase
letter, number or special characters.'
AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
MinLength: 8
MaxLength: 30
NoEcho: true
Confirm: true
SecurityGroupId:
Type: String
Label: Security Group Id
Description: The existing security group Id that the ECS instance belongs to.
net type is classic. default is None, new create SG.
SystemDiskCategory:
Type: String
Label: System Disk Category
Description: 'System disk category: average cloud disk(cloud), efficient cloud
disk(cloud_efficiency) or SSD cloud disk(cloud_ssd)'
Default: cloud_ssd
AllowedValues:
- cloud
- cloud_efficiency
- cloud_ssd
Resources:
ecsInstanceGroup:
Type: ALIYUN::ECS::InstanceGroup
Properties:
SecurityGroupId:
Ref: SecurityGroupId
ImageId:
Ref: ImageId
AllocatePublicIP:
Ref: AllocatePublicIP
DiskMappings:
- DiskName:
Ref: DiskName
Size:
Ref: DiskSize
SnapshotId:
Ref: SnapshotId
InstanceName:
Ref: InstanceName
InstanceType:
Ref: InstanceType
InternetChargeType:
Ref: InternetChargeType
IoOptimized:
Ref: IoOptimized
MaxAmount:
Ref: MaxAmount
MinAmount:
Ref: MinAmount
Password:
Ref: Password
SystemDiskCategory:
Ref: SystemDiskCategory
Outputs:
InnerIps:
Description: Inner IP address list of the specified instance. Only for classical
instance.
Value:
Fn::GetAtt:
- ecsInstanceGroup
- InnerIps
InstanceIds:
Description: The instance id list of created ecs instance
Value:
Fn::GetAtt:
- ecsInstanceGroup
- InstanceIds
PublicIps:
Description: Public IP address list of created ecs instance.
Value:
Fn::GetAtt:
- ecsInstanceGroup
- PublicIps
ZoneIds:
Description: Zone id of created instance.
Value:
Fn::GetAtt:
- ecsInstanceGroup
- ZoneIds