Skip to content

Commit 8313bf3

Browse files
authored
Merge pull request #1440 from ioito/hotfix/qx-aliyun-eip-associate-name
fix(aliyun): eip associate type
2 parents 5b97102 + 396c242 commit 8313bf3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/multicloud/aliyun/eip.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ func (self *SEipAddress) GetMode() string {
163163
func (self *SEipAddress) GetAssociationType() string {
164164
switch self.InstanceType {
165165
case EIP_INSTANCE_TYPE_ECS, "NetworkInterface":
166+
if strings.HasPrefix(self.Name, "CREATE_BY_ALB") || strings.HasPrefix(self.Name, "CREATE_BY_NLB") {
167+
return api.EIP_ASSOCIATE_TYPE_LOADBALANCER
168+
}
166169
return api.EIP_ASSOCIATE_TYPE_SERVER
167170
case EIP_INSTANCE_TYPE_NAT:
168171
return api.EIP_ASSOCIATE_TYPE_NAT_GATEWAY

0 commit comments

Comments
 (0)