@@ -10,7 +10,7 @@ Example Usage
1010```hcl
1111data "tencentcloud_images" "my_favorite_image" {
1212 image_type = ["PUBLIC_IMAGE"]
13- os_name = "centos "
13+ os_name = "Tencent Linux release 3.2 (Final) "
1414}
1515
1616data "tencentcloud_instance_types" "my_favorite_instance_types" {
@@ -51,9 +51,7 @@ resource "tencentcloud_instance" "my_awesome_app" {
5151 project_id = 0
5252 vpc_id = tencentcloud_vpc.app.id
5353 subnet_id = tencentcloud_subnet.app.id
54- internet_max_bandwidth_out = 20
5554 count = 2
56- cam_role_name = "CVM_QcsRole"
5755
5856 data_disks {
5957 data_disk_type = "CLOUD_PREMIUM"
@@ -146,7 +144,6 @@ import (
146144
147145 "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
148146 "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
149- "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors"
150147 sdkErrors "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors"
151148 cvm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312"
152149 "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
@@ -886,16 +883,6 @@ func resourceTencentCloudInstanceRead(d *schema.ResourceData, meta interface{})
886883 if d .Get ("image_id" ).(string ) == "" || ! IsContains (cvmImages , * instance .ImageId ) {
887884 _ = d .Set ("image_id" , instance .ImageId )
888885 }
889- expiredTime := instance .ExpiredTime
890- createdTime := instance .CreatedTime
891- if expiredTime != nil && createdTime != nil {
892- deltaMonth , err := DeltaMonth (* instance .ExpiredTime , * instance .CreatedTime )
893- if err != nil {
894- return err
895- }
896- _ = d .Set ("instance_charge_type_prepaid_period" , deltaMonth )
897-
898- }
899886
900887 _ = d .Set ("availability_zone" , instance .Placement .Zone )
901888 _ = d .Set ("instance_name" , instance .InstanceName )
@@ -1449,7 +1436,7 @@ func resourceTencentCloudInstanceDelete(d *schema.ResourceData, meta interface{}
14491436 //when state is terminating, do not delete but check exist
14501437 if errRet != nil {
14511438 //check InvalidInstanceState.Terminating
1452- ee , ok := errRet .(* errors .TencentCloudSDKError )
1439+ ee , ok := errRet .(* sdkErrors .TencentCloudSDKError )
14531440 if ! ok {
14541441 return retryError (errRet )
14551442 }
0 commit comments