diff --git a/volcengine/ebs/volume/resource_volcengine_volume.go b/volcengine/ebs/volume/resource_volcengine_volume.go index dfaca5de..b8b3081c 100644 --- a/volcengine/ebs/volume/resource_volcengine_volume.go +++ b/volcengine/ebs/volume/resource_volcengine_volume.go @@ -102,16 +102,6 @@ func ResourceVolcengineVolume() *schema.Resource { Computed: true, Description: "Creation time of Volume.", }, - "billing_type": { - Type: schema.TypeInt, - Computed: true, - Description: "Billing type of Volume.", - }, - "pay_type": { - Type: schema.TypeString, - Computed: true, - Description: "Pay type of Volume.", - }, "delete_with_instance": { Type: schema.TypeBool, Optional: true, diff --git a/volcengine/ebs/volume/service_volcengine_volume.go b/volcengine/ebs/volume/service_volcengine_volume.go index 61b6fd8e..82b7e75b 100644 --- a/volcengine/ebs/volume/service_volcengine_volume.go +++ b/volcengine/ebs/volume/service_volcengine_volume.go @@ -245,7 +245,10 @@ func (s *VolcengineVolumeService) ModifyResource(resourceData *schema.ResourceDa }, ExecuteCall: func(d *schema.ResourceData, client *ve.SdkClient, call ve.SdkCall) (*map[string]interface{}, error) { logger.Debug(logger.ReqFormat, call.Action, call.SdkParam) - return s.Client.UniversalClient.DoCall(getUniversalInfo(call.Action), call.SdkParam) + resp, err := s.Client.UniversalClient.DoCall(getUniversalInfo(call.Action), call.SdkParam) + logger.Debug(logger.RespFormat, call.Action, resp) + logger.Debug(logger.RespFormat, call.Action, err) + return resp, err }, CallError: func(d *schema.ResourceData, client *ve.SdkClient, call ve.SdkCall, baseErr error) error { oldV, newV := resourceData.GetChange("volume_charge_type") @@ -270,6 +273,10 @@ func (s *VolcengineVolumeService) ModifyResource(resourceData *schema.ResourceDa if callErr == nil { return nil } + // 按量实例下挂载的云盘不支持按量转包年操作 + if strings.Contains(callErr.Error(), "ErrorInvalidEcsChargeType") { + return re.NonRetryableError(callErr) + } return re.RetryableError(callErr) }) }, diff --git a/website/docs/r/volume.html.markdown b/website/docs/r/volume.html.markdown index f93bd0a6..bf9756ae 100644 --- a/website/docs/r/volume.html.markdown +++ b/website/docs/r/volume.html.markdown @@ -49,9 +49,7 @@ The following arguments are supported: ## Attributes Reference In addition to all arguments above, the following attributes are exported: * `id` - ID of the resource. -* `billing_type` - Billing type of Volume. * `created_at` - Creation time of Volume. -* `pay_type` - Pay type of Volume. * `status` - Status of Volume. * `trade_status` - Status of Trade.