diff --git a/.changelog/3101.txt b/.changelog/3101.txt new file mode 100644 index 0000000000..1d40217caf --- /dev/null +++ b/.changelog/3101.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/tencentcloud_instance: update the length limit of `instance_name` +``` diff --git a/tencentcloud/services/cvm/resource_tc_instance.go b/tencentcloud/services/cvm/resource_tc_instance.go index 4492c4fa08..5317295e99 100644 --- a/tencentcloud/services/cvm/resource_tc_instance.go +++ b/tencentcloud/services/cvm/resource_tc_instance.go @@ -69,7 +69,7 @@ func ResourceTencentCloudInstance() *schema.Resource { Optional: true, Default: "Terraform-CVM-Instance", ValidateFunc: tccommon.ValidateStringLengthInRange(2, 128), - Description: "The name of the instance. The max length of instance_name is 60, and default value is `Terraform-CVM-Instance`.", + Description: "The name of the instance. The max length of instance_name is 128, and default value is `Terraform-CVM-Instance`.", }, "instance_type": { Type: schema.TypeString, diff --git a/tencentcloud/services/cvm/resource_tc_instance_set.go b/tencentcloud/services/cvm/resource_tc_instance_set.go index 3e5ce68bed..3b1a1d64ee 100644 --- a/tencentcloud/services/cvm/resource_tc_instance_set.go +++ b/tencentcloud/services/cvm/resource_tc_instance_set.go @@ -63,7 +63,7 @@ func ResourceTencentCloudInstanceSet() *schema.Resource { Optional: true, Default: "Terraform-CVM-Instance", ValidateFunc: tccommon.ValidateStringLengthInRange(2, 128), - Description: "The name of the instance. The max length of instance_name is 60, and default value is `Terraform-CVM-Instance`.", + Description: "The name of the instance. The max length of instance_name is 128, and default value is `Terraform-CVM-Instance`.", }, "instance_type": { Type: schema.TypeString, diff --git a/website/docs/r/instance.html.markdown b/website/docs/r/instance.html.markdown index 9608916227..e6efcff126 100644 --- a/website/docs/r/instance.html.markdown +++ b/website/docs/r/instance.html.markdown @@ -234,7 +234,7 @@ The following arguments are supported: * `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`. * `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`. * `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. -* `instance_name` - (Optional, String) The name of the instance. The max length of instance_name is 60, and default value is `Terraform-CVM-Instance`. +* `instance_name` - (Optional, String) The name of the instance. The max length of instance_name is 128, and default value is `Terraform-CVM-Instance`. * `instance_type` - (Optional, String) The type of the instance. * `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. * `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. diff --git a/website/docs/r/instance_set.html.markdown b/website/docs/r/instance_set.html.markdown index 655cfdb22d..8f3907b432 100644 --- a/website/docs/r/instance_set.html.markdown +++ b/website/docs/r/instance_set.html.markdown @@ -88,7 +88,7 @@ The following arguments are supported: * `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. * `instance_charge_type` - (Optional, String) The charge type of instance. Only support `POSTPAID_BY_HOUR`. * `instance_count` - (Optional, Int) The number of instances to be purchased. Value range:[1,100]; default value: 1. -* `instance_name` - (Optional, String) The name of the instance. The max length of instance_name is 60, and default value is `Terraform-CVM-Instance`. +* `instance_name` - (Optional, String) The name of the instance. The max length of instance_name is 128, and default value is `Terraform-CVM-Instance`. * `instance_type` - (Optional, String) The type of the instance. * `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. * `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.