-
Notifications
You must be signed in to change notification settings - Fork 35
/
assign-private-ip-addresses.yml
46 lines (46 loc) · 1.31 KB
/
assign-private-ip-addresses.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
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建弹性网卡并分配 secondary private IP 地址至指定交换机与安全组,输出网卡 ID 与私有 IP 列表。
en: Create an Elastic Network Interface (ENI) and allocate a secondary private IP
address to the specified Virtual Switch (VSwitch) and Security Group, then output
the Network Interface ID and the list of private IP addresses.
Parameters:
VSwitchId:
Type: String
Label: VSwitch
Description: VSwitch ID
SecurityGroupId:
Type: String
Label: SecurityGroup
Description: Security Group Id.
SecondaryPrivateIpAddressCount:
Type: Number
Label: SecondaryPrivateIpAddressCount
Default: 1
Resources:
ENI:
Type: ALIYUN::ECS::NetworkInterface
Properties:
VSwitchId:
Ref: VSwitchId
SecurityGroupId:
Ref: SecurityGroupId
AssignPrivateIPAddr:
Type: ALIYUN::ECS::AssignPrivateIpAddresses
Properties:
NetworkInterfaceId:
Ref: ENI
SecondaryPrivateIpAddressCount:
Ref: SecondaryPrivateIpAddressCount
DependsOn: ENI
Outputs:
NetworkInterfaceId:
Value:
Fn::GetAtt:
- AssignPrivateIPAddr
- NetworkInterfaceId
PrivateIpAddresses:
Value:
Fn::GetAtt:
- AssignPrivateIPAddr
- PrivateIpAddresses