-
Notifications
You must be signed in to change notification settings - Fork 35
/
router-interface.yml
75 lines (75 loc) · 1.85 KB
/
router-interface.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
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建两个VPC,配置VPC间路由器接口,实现VPC互联。
en: Create two Virtual Private Clouds (VPCs), configure VPC-to-VPC router interfaces,
and establish inter-VPC connectivity.
Parameters:
VpcName:
Type: String
Default: mytest
Resources:
Vpc:
Type: ALIYUN::ECS::VPC
Properties:
VpcName:
Ref: VpcName
CidrBlock: 192.168.0.0/16
Count: 2
RouterInterfaceAccept:
Type: ALIYUN::VPC::RouterInterface
Properties:
Description: Accepting Side
RouterType: VRouter
RouterId:
Fn::Select:
- 1
- Fn::GetAtt:
- Vpc
- VRouterId
Role: AcceptingSide
OppositeRouterType: VRouter
InstanceChargeType: PostPaid
RouterInterfaceInit:
Type: ALIYUN::VPC::RouterInterface
Properties:
OppositeInterfaceId:
Ref: RouterInterfaceAccept
OppositeRouterId:
Fn::Select:
- 1
- Fn::GetAtt:
- Vpc
- VRouterId
OppositeInterfaceOwnerId:
Ref: ALIYUN::TenantId
OppositeRouterType: VRouter
Description: Initiating Side
RouterType: VRouter
RouterId:
Fn::Select:
- 0
- Fn::GetAtt:
- Vpc
- VRouterId
Role: InitiatingSide
Spec: Mini.2
InstanceChargeType: PostPaid
DependsOn: RouterInterfaceAccept
PeeringRouterInterfaceBinding:
Type: ALIYUN::VPC::PeeringRouterInterfaceBinding
Properties:
OppositeInterfaceId:
Ref: RouterInterfaceInit
RouterInterfaceId:
Ref: RouterInterfaceAccept
Outputs:
RouterInterfaceInitId:
Value:
Fn::GetAtt:
- RouterInterfaceInit
- RouterInterfaceId
RouterInterfaceAcceptId:
Value:
Fn::GetAtt:
- RouterInterfaceAccept
- RouterInterfaceId