forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
anycast-eip.yml
142 lines (142 loc) · 4.02 KB
/
anycast-eip.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
ROSTemplateFormatVersion: '2015-09-01'
Description: VPC AnycastEIP/AnycastEIPAssociation resource example
Parameters:
LoadBalancerName:
Type: String
Description: Name of created load balancer. Length is limited to 1-80 characters,
allowed to contain letters, numbers, '-, /, _,.' When not specified, a default
name will be assigned.
Default: mytest
LoadBalancerSpec:
Type: String
Description: 'The specification of the Server Load Balancer instance. Allowed
value: slb.s1.small|slb.s2.small|slb.s2.medium|slb.s3.small|slb.s3.medium|slb.s3.large|slb.s3.xlarge|slb.s3.xxlarge.
Default value: slb.s1.small. The supported performance specification in each
region is different, two specifications are supported in the US East 1 region.
If the region does not support the performance-guaranteed instances, the value
will not take effect.'
Default: slb.s1.small
VpcId:
Type: String
Description: The VPC id to create load balancer instance. For VPC network only.
VSwitchId:
Type: String
Description: The VSwitch id to create load balancer instance. For VPC network
only.
AnyCastDescription:
Type: String
Description: Anycast EIP instance description
Default: null
AnyCastServiceLocation:
Type: String
Description: Anycast EIP instance access area
Default: international
AllowedValues:
- international
AnyCastInstanceChargeType:
Type: String
Description: Anycast EIP instance charge type
Default: PostPaid
AllowedValues:
- PostPaid
AnyCastInternetChargeType:
Type: String
Description: Anycast EIP instance access public network billing method
Default: PayByTraffic
AllowedValues:
- PayByTraffic
AnyCastName:
Type: String
Description: Anycast EIP instance name
Default: null
AnyCastBindInstanceType:
Type: String
Description: 'The cloud resource instance type to be bound. Valid value: SlbInstance,
SLB instance of private network type.'
Default: SlbInstance
AllowedValues:
- SlbInstance
Resources:
LoadBalance:
Type: ALIYUN::SLB::LoadBalancer
Properties:
VpcId:
Ref: VpcId
VSwitchId:
Ref: VSwitchId
PayType: PayOnDemand
AddressType: intranet
LoadBalancerSpec:
Ref: LoadBalancerSpec
LoadBalancerName:
Ref: LoadBalancerName
AnycastEip:
Type: ALIYUN::VPC::AnycastEIP
Properties:
Description:
Ref: AnyCastDescription
ServiceLocation:
Ref: AnyCastServiceLocation
InstanceChargeType:
Ref: AnyCastInstanceChargeType
InternetChargeType:
Ref: AnyCastInternetChargeType
Name:
Ref: AnyCastName
AnycastEIPAssociation:
Type: ALIYUN::VPC::AnycastEIPAssociation
Properties:
BindInstanceId:
Ref: LoadBalance
BindInstanceRegionId:
Ref: ALIYUN::Region
BindInstanceType:
Ref: AnyCastBindInstanceType
AnycastId:
Ref: AnycastEip
DependsOn:
- AnycastEip
- LoadBalance
Outputs:
AnyCastId:
Description: Anycast EIP instance ID
Value:
Fn::GetAtt:
- AnycastEip
- AnycastId
AnyCastIpAddress:
Description: Anycase IP address
Value:
Fn::GetAtt:
- AnycastEip
- IpAddress
AnyCastOrderId:
Description: Order ID
Value:
Fn::GetAtt:
- AnycastEip
- OrderId
AnyCastName:
Description: Anycast EIP instance name
Value:
Fn::GetAtt:
- AnycastEip
- Name
AnyCastBindInstanceId:
Description: The ID of the cloud resource instance to be bound.
Value:
Fn::GetAtt:
- AnycastEIPAssociation
- BindInstanceId
AnyCastBindInstanceRegionId:
Description: The region ID of the cloud resource instance to be bound.
Value:
Fn::GetAtt:
- AnycastEIPAssociation
- BindInstanceRegionId
AnyCastBindInstanceType:
Description: The cloud resource instance type to be bound.
Value:
Fn::GetAtt:
- AnycastEIPAssociation
- BindInstanceType