Skip to content

Commit f734a6d

Browse files
committed
fix: modify eip
1 parent 788ae9d commit f734a6d

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

tencentcloud/services/cvm/resource_tc_eip.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,9 +436,8 @@ func resourceTencentCloudEipDelete(d *schema.ResourceData, meta interface{}) err
436436
ctx := context.WithValue(context.TODO(), tccommon.LogIdKey, logId)
437437
vpcService := svcvpc.NewVpcService(meta.(tccommon.ProviderMeta).GetAPIV3Conn())
438438
eipId := d.Id()
439-
cdcId := d.Get("cdc_id").(string)
440439
err := resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError {
441-
errRet := vpcService.UnattachEip(ctx, eipId, cdcId)
440+
errRet := vpcService.UnattachEip(ctx, eipId)
442441
if errRet != nil {
443442
return tccommon.RetryError(errRet, "DesOperation.MutexTaskRunning")
444443
}

tencentcloud/services/cvm/resource_tc_eip_association.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,8 @@ func resourceTencentCloudEipAssociationDelete(d *schema.ResourceData, meta inter
275275
return err
276276
}
277277

278-
cdcId := d.Get("cdc_id").(string)
279278
err = resource.Retry(tccommon.WriteRetryTimeout, func() *resource.RetryError {
280-
e := vpcService.UnattachEip(ctx, association.EipId, cdcId)
279+
e := vpcService.UnattachEip(ctx, association.EipId)
281280
if e != nil {
282281
return tccommon.RetryError(e, "DesOperation.MutexTaskRunning")
283282
}

tencentcloud/services/vpc/service_tencentcloud_vpc.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2727,12 +2727,12 @@ func (me *VpcService) DisassociateNatGatewayAddress(ctx context.Context, request
27272727
return
27282728
}
27292729

2730-
func (me *VpcService) UnattachEip(ctx context.Context, eipId, cdcId string) error {
2730+
func (me *VpcService) UnattachEip(ctx context.Context, eipId string) error {
27312731
eipUnattachLocker.Lock()
27322732
defer eipUnattachLocker.Unlock()
27332733

27342734
logId := tccommon.GetLogId(ctx)
2735-
eip, err := me.DescribeEipById(ctx, eipId, cdcId)
2735+
eip, err := me.DescribeEipById(ctx, eipId)
27362736
if err != nil {
27372737
return err
27382738
}
@@ -2751,7 +2751,7 @@ func (me *VpcService) UnattachEip(ctx context.Context, eipId, cdcId string) erro
27512751
}
27522752

27532753
outErr := resource.Retry(tccommon.ReadRetryTimeout*3, func() *resource.RetryError {
2754-
eip, err := me.DescribeEipById(ctx, eipId, cdcId)
2754+
eip, err := me.DescribeEipById(ctx, eipId)
27552755
if err != nil {
27562756
return tccommon.RetryError(err)
27572757
}

0 commit comments

Comments
 (0)