-
Notifications
You must be signed in to change notification settings - Fork 35
/
route.yml
153 lines (153 loc) · 3.88 KB
/
route.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
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建VPC、安全组、交换机、ECS实例,配置IPv6地址和路由,支持指定数量或列表的IPv6地址分配。
en: Create VPCs, security groups, switches, and ECS instances, configure IPv6 addresses
and routing, supporting the allocation of a specified number or list of IPv6 addresses.
Parameters:
VpcName:
Type: String
Description: VPC Name.
ZoneId:
Type: String
Description: Zone Id.
VSwitchName:
Type: String
Description: SW Name.
SecurityGroupName:
Type: String
Description: SG Name.
InstanceType:
Type: String
Description: Ecs instance Type.
Default: ecs.c5.large
SystemDiskCategory:
Type: String
Description: Category of system disk. Default is cloud_efficiency. support cloud|cloud_efficiency|cloud_ssd|cloud_essd|ephemeral_ssd.Old
instances will not be changed.
Default: cloud_essd
AllowedValues:
- cloud
- cloud_efficiency
- cloud_ssd
- cloud_essd
- ephemeral_ssd
InstancePassword:
Type: String
Description: Ecs instance password.
ImageId:
Type: String
Description: Image Id.
Default: centos_7
Ipv6AddressCount:
Type: Number
Description: |-
IPv6 addresses specified number of randomly generated interfaces elasticity.
Note You cannot specify the parameters Ipv6Addresses and Ipv6AddressCount at the same time.
Default: 1
MinValue: 0
Ipv6Addresses:
Type: CommaDelimitedList
Description: |-
Specify one or more IPv6 addresses for the elastic NIC. Currently, the maximum list size is 1. Example value: 2001:db8:1234:1a00::*** .
Note You cannot specify the parameters Ipv6Addresses and Ipv6AddressCount at the same time.
Default: null
MaxLength: 1
Resources:
Vpc:
Type: ALIYUN::ECS::VPC
Properties:
VpcName:
Ref: VpcName
CidrBlock: 192.168.0.0/16
EnableIpv6: true
SecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: Vpc
SecurityGroupName:
Ref: SecurityGroupName
VSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: Vpc
VSwitchName:
Ref: VSwitchName
Ipv6CidrBlock: 1
CidrBlock: 192.168.0.0/16
Ecs:
Type: ALIYUN::ECS::Instance
Properties:
VpcId:
Fn::GetAtt:
- Vpc
- VpcId
VSwitchId:
Ref: VSwitch
SecurityGroupId:
Fn::GetAtt:
- SecurityGroup
- SecurityGroupId
ImageId:
Ref: ImageId
InternetMaxBandwidthOut: 2
Password:
Ref: InstancePassword
InstanceType:
Ref: InstanceType
SystemDiskCategory:
Ref: SystemDiskCategory
NetworkInterface:
Type: ALIYUN::ECS::NetworkInterface
Properties:
VSwitchId:
Ref: VSwitch
SecurityGroupId:
Ref: SecurityGroup
AssignIpv6Addresses:
Type: ALIYUN::ECS::AssignIpv6Addresses
Properties:
NetworkInterfaceId:
Ref: NetworkInterface
Ipv6AddressCount:
Ref: Ipv6AddressCount
Ipv6Addresses:
Ref: Ipv6Addresses
RouteEntry:
Type: ALIYUN::ECS::Route
Properties:
NextHopId:
Fn::GetAtt:
- Ecs
- InstanceId
RouteId:
Fn::GetAtt:
- Vpc
- VRouterId
RouteTableId:
Fn::GetAtt:
- Vpc
- RouteTableId
DestinationCidrBlock: 0.0.0.0/0
Outputs:
Ipv6AddressIds:
Description: Assigned IPv6 address IDs.
Value:
Fn::GetAtt:
- AssignIpv6Addresses
- Ipv6AddressIds
Ipv6Addresses:
Description: Assigned IPv6 addresses.
Value:
Fn::GetAtt:
- AssignIpv6Addresses
- Ipv6Addresses
NetworkInterfaceId:
Description: Elastic network interface ID.
Value:
Fn::GetAtt:
- AssignIpv6Addresses
- NetworkInterfaceId