Skip to content

Commit 0ea0975

Browse files
authored
fix(cvm): [121760013] tencentcloud_instance update instance_name limit (#3101)
* update instance name * update length of instance name
1 parent 69c3b17 commit 0ea0975

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

.changelog/3101.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/tencentcloud_instance: update the length limit of `instance_name`
3+
```

tencentcloud/services/cvm/resource_tc_instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func ResourceTencentCloudInstance() *schema.Resource {
6969
Optional: true,
7070
Default: "Terraform-CVM-Instance",
7171
ValidateFunc: tccommon.ValidateStringLengthInRange(2, 128),
72-
Description: "The name of the instance. The max length of instance_name is 60, and default value is `Terraform-CVM-Instance`.",
72+
Description: "The name of the instance. The max length of instance_name is 128, and default value is `Terraform-CVM-Instance`.",
7373
},
7474
"instance_type": {
7575
Type: schema.TypeString,

tencentcloud/services/cvm/resource_tc_instance_set.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func ResourceTencentCloudInstanceSet() *schema.Resource {
6363
Optional: true,
6464
Default: "Terraform-CVM-Instance",
6565
ValidateFunc: tccommon.ValidateStringLengthInRange(2, 128),
66-
Description: "The name of the instance. The max length of instance_name is 60, and default value is `Terraform-CVM-Instance`.",
66+
Description: "The name of the instance. The max length of instance_name is 128, and default value is `Terraform-CVM-Instance`.",
6767
},
6868
"instance_type": {
6969
Type: schema.TypeString,

website/docs/r/instance.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ The following arguments are supported:
234234
* `instance_charge_type_prepaid_renew_flag` - (Optional, String) Auto renewal flag. Valid values: `NOTIFY_AND_AUTO_RENEW`: notify upon expiration and renew automatically, `NOTIFY_AND_MANUAL_RENEW`: notify upon expiration but do not renew automatically, `DISABLE_NOTIFY_AND_MANUAL_RENEW`: neither notify upon expiration nor renew automatically. Default value: `NOTIFY_AND_MANUAL_RENEW`. If this parameter is specified as `NOTIFY_AND_AUTO_RENEW`, the instance will be automatically renewed on a monthly basis if the account balance is sufficient. NOTE: it only works when instance_charge_type is set to `PREPAID`.
235235
* `instance_charge_type` - (Optional, String) The charge type of instance. Valid values are `PREPAID`, `POSTPAID_BY_HOUR`, `SPOTPAID`, `CDHPAID` and `CDCPAID`. The default is `POSTPAID_BY_HOUR`. Note: TencentCloud International only supports `POSTPAID_BY_HOUR` and `CDHPAID`. `PREPAID` instance may not allow to delete before expired. `SPOTPAID` instance must set `spot_instance_type` and `spot_max_price` at the same time. `CDHPAID` instance must set `cdh_instance_type` and `cdh_host_id`.
236236
* `instance_count` - (Optional, Int, **Deprecated**) It has been deprecated from version 1.59.18. Use built-in `count` instead. The number of instances to be purchased. Value range:[1,100]; default value: 1.
237-
* `instance_name` - (Optional, String) The name of the instance. The max length of instance_name is 60, and default value is `Terraform-CVM-Instance`.
237+
* `instance_name` - (Optional, String) The name of the instance. The max length of instance_name is 128, and default value is `Terraform-CVM-Instance`.
238238
* `instance_type` - (Optional, String) The type of the instance.
239239
* `internet_charge_type` - (Optional, String) Internet charge type of the instance, Valid values are `BANDWIDTH_PREPAID`, `TRAFFIC_POSTPAID_BY_HOUR`, `BANDWIDTH_POSTPAID_BY_HOUR` and `BANDWIDTH_PACKAGE`. If not set, internet charge type are consistent with the cvm charge type by default. This value takes NO Effect when changing and does not need to be set when `allocate_public_ip` is false.
240240
* `internet_max_bandwidth_out` - (Optional, Int) Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). This value does not need to be set when `allocate_public_ip` is false.

website/docs/r/instance_set.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ The following arguments are supported:
8888
* `hostname` - (Optional, String) The hostname of the instance. Windows instance: The name should be a combination of 2 to 15 characters comprised of letters (case insensitive), numbers, and hyphens (-). Period (.) is not supported, and the name cannot be a string of pure numbers. Other types (such as Linux) of instances: The name should be a combination of 2 to 60 characters, supporting multiple periods (.). The piece between two periods is composed of letters (case insensitive), numbers, and hyphens (-). Modifying will cause the instance reset.
8989
* `instance_charge_type` - (Optional, String) The charge type of instance. Only support `POSTPAID_BY_HOUR`.
9090
* `instance_count` - (Optional, Int) The number of instances to be purchased. Value range:[1,100]; default value: 1.
91-
* `instance_name` - (Optional, String) The name of the instance. The max length of instance_name is 60, and default value is `Terraform-CVM-Instance`.
91+
* `instance_name` - (Optional, String) The name of the instance. The max length of instance_name is 128, and default value is `Terraform-CVM-Instance`.
9292
* `instance_type` - (Optional, String) The type of the instance.
9393
* `internet_charge_type` - (Optional, String, ForceNew) Internet charge type of the instance, Valid values are `BANDWIDTH_PREPAID`, `TRAFFIC_POSTPAID_BY_HOUR`, `BANDWIDTH_POSTPAID_BY_HOUR` and `BANDWIDTH_PACKAGE`. This value does not need to be set when `allocate_public_ip` is false.
9494
* `internet_max_bandwidth_out` - (Optional, Int) Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bits per second). This value does not need to be set when `allocate_public_ip` is false.

0 commit comments

Comments
 (0)