Skip to content

Commit 967c418

Browse files
committed
fix: modify doc
1 parent 8e18d7e commit 967c418

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

tencentcloud/services/cvm/resource_tc_instance.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func ResourceTencentCloudInstance() *schema.Resource {
245245
Type: schema.TypeString,
246246
Optional: true,
247247
Computed: true,
248-
Description: "System disk snapshot ID used to initialize the system disk. When system disk type is `LOCAL_BASIC` and `LOCAL_SSD`, disk id is not supported. Input not supported.",
248+
Description: "System disk snapshot ID used to initialize the system disk. When system disk type is `LOCAL_BASIC` and `LOCAL_SSD`, disk id is not supported. Invalid value passed in when creating.",
249249
},
250250
"system_disk_name": {
251251
Type: schema.TypeString,
@@ -293,7 +293,7 @@ func ResourceTencentCloudInstance() *schema.Resource {
293293
Type: schema.TypeString,
294294
Optional: true,
295295
Computed: true,
296-
Description: "Data disk ID used to initialize the data disk. When data disk type is `LOCAL_BASIC` and `LOCAL_SSD`, disk id is not supported. Input not supported.",
296+
Description: "Data disk ID used to initialize the data disk. When data disk type is `LOCAL_BASIC` and `LOCAL_SSD`, disk id is not supported. Invalid value passed in when creating.",
297297
},
298298
"delete_with_instance": {
299299
Type: schema.TypeBool,
@@ -622,9 +622,9 @@ func resourceTencentCloudInstanceCreate(d *schema.ResourceData, meta interface{}
622622
request.SystemDisk.DiskSize = &diskSize
623623
}
624624

625-
// if v, ok := d.GetOk("system_disk_id"); ok {
626-
// request.SystemDisk.DiskId = helper.String(v.(string))
627-
// }
625+
if v, ok := d.GetOk("system_disk_id"); ok {
626+
request.SystemDisk.DiskId = helper.String(v.(string))
627+
}
628628

629629
if v, ok := d.GetOk("system_disk_name"); ok {
630630
request.SystemDisk.DiskName = helper.String(v.(string))
@@ -658,9 +658,9 @@ func resourceTencentCloudInstanceCreate(d *schema.ResourceData, meta interface{}
658658
}
659659
}
660660

661-
// if value["data_disk_id"] != "" {
662-
// dataDisk.DiskId = helper.String(value["data_disk_id"].(string))
663-
// }
661+
if value["data_disk_id"] != "" {
662+
dataDisk.DiskId = helper.String(value["data_disk_id"].(string))
663+
}
664664

665665
if deleteWithInstance, ok := value["delete_with_instance"]; ok {
666666
deleteWithInstanceBool := deleteWithInstance.(bool)

website/docs/r/instance.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ The following arguments are supported:
252252
* `spot_max_price` - (Optional, String, ForceNew) Max price of a spot instance, is the format of decimal string, for example "0.50". Note: it only works when instance_charge_type is set to `SPOTPAID`.
253253
* `stopped_mode` - (Optional, String) Billing method of a pay-as-you-go instance after shutdown. Available values: `KEEP_CHARGING`,`STOP_CHARGING`. Default `KEEP_CHARGING`.Need to be used with the running_flag field set to `false`.
254254
* `subnet_id` - (Optional, String) The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set.
255-
* `system_disk_id` - (Optional, String) System disk snapshot ID used to initialize the system disk. When system disk type is `LOCAL_BASIC` and `LOCAL_SSD`, disk id is not supported. Input not supported.
255+
* `system_disk_id` - (Optional, String) System disk snapshot ID used to initialize the system disk. When system disk type is `LOCAL_BASIC` and `LOCAL_SSD`, disk id is not supported. Invalid value passed in when creating.
256256
* `system_disk_name` - (Optional, String) Name of the system disk.
257257
* `system_disk_resize_online` - (Optional, Bool) Resize online.
258258
* `system_disk_size` - (Optional, Int) Size of the system disk. unit is GB, Default is 50GB. If modified, the instance may force stop.
@@ -266,7 +266,7 @@ The `data_disks` object supports the following:
266266

267267
* `data_disk_size` - (Required, Int) Size of the data disk, and unit is GB.
268268
* `data_disk_type` - (Required, String, ForceNew) Data disk type. For more information about limits on different data disk types, see [Storage Overview](https://intl.cloud.tencent.com/document/product/213/4952). Valid values: LOCAL_BASIC: local disk, LOCAL_SSD: local SSD disk, LOCAL_NVME: local NVME disk, specified in the InstanceType, LOCAL_PRO: local HDD disk, specified in the InstanceType, CLOUD_BASIC: HDD cloud disk, CLOUD_PREMIUM: Premium Cloud Storage, CLOUD_SSD: SSD, CLOUD_HSSD: Enhanced SSD, CLOUD_TSSD: Tremendous SSD, CLOUD_BSSD: Balanced SSD.
269-
* `data_disk_id` - (Optional, String) Data disk ID used to initialize the data disk. When data disk type is `LOCAL_BASIC` and `LOCAL_SSD`, disk id is not supported. Input not supported.
269+
* `data_disk_id` - (Optional, String) Data disk ID used to initialize the data disk. When data disk type is `LOCAL_BASIC` and `LOCAL_SSD`, disk id is not supported. Invalid value passed in when creating.
270270
* `data_disk_name` - (Optional, String) Name of data disk.
271271
* `data_disk_snapshot_id` - (Optional, String, ForceNew) Snapshot ID of the data disk. The selected data disk snapshot size must be smaller than the data disk size.
272272
* `delete_with_instance_prepaid` - (Optional, Bool, ForceNew) Decides whether the disk is deleted with instance(only applied to `CLOUD_BASIC`, `CLOUD_SSD` and `CLOUD_PREMIUM` disk with `PREPAID` instance), default is false.

0 commit comments

Comments
 (0)