Skip to content

Commit 8ce54b8

Browse files
authored
Merge pull request #530 from tengqm/fix-doc
Fix doc for instance
2 parents dbbcad0 + 2a6c8f6 commit 8ce54b8

File tree

2 files changed

+46
-46
lines changed

2 files changed

+46
-46
lines changed

tencentcloud/resource_tc_instance.go

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -107,51 +107,51 @@ func resourceTencentCloudInstance() *schema.Resource {
107107
Type: schema.TypeString,
108108
Required: true,
109109
ForceNew: true,
110-
Description: "The Image to use for the instance. Change 'image_id' will case instance destroy and re-created.",
110+
Description: "The image to use for the instance. Changing `image_id` will cause the instance to be destroyed and re-created.",
111111
},
112112
"availability_zone": {
113113
Type: schema.TypeString,
114114
Required: true,
115115
ForceNew: true,
116-
Description: "The available zone that the CVM instance locates at.",
116+
Description: "The available zone for the CVM instance.",
117117
},
118118
"instance_name": {
119119
Type: schema.TypeString,
120120
Optional: true,
121121
Default: "Terraform-CVM-Instance",
122122
ValidateFunc: validateStringLengthInRange(2, 128),
123-
Description: "The name of the CVM. The max length of instance_name is 60, and default value is `Terraform-CVM-Instance`.",
123+
Description: "The name of the instance. The max length of instance_name is 60, and default value is `Terraform-CVM-Instance`.",
124124
},
125125
"instance_type": {
126126
Type: schema.TypeString,
127127
Optional: true,
128128
Computed: true,
129129
ValidateFunc: validateInstanceType,
130-
Description: "The type of instance to start.",
130+
Description: "The type of the instance.",
131131
},
132132
"hostname": {
133133
Type: schema.TypeString,
134134
Optional: true,
135135
ForceNew: true,
136-
Description: "The hostname of CVM. 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 (-).",
136+
Description: "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 (-).",
137137
},
138138
"project_id": {
139139
Type: schema.TypeInt,
140140
Optional: true,
141141
Default: 0,
142-
Description: "The project CVM belongs to, default to 0.",
142+
Description: "The project the instance belongs to, default to 0.",
143143
},
144144
"running_flag": {
145145
Type: schema.TypeBool,
146146
Optional: true,
147147
Default: true,
148-
Description: "Set instance to running or stop. Default value is true, the instance will shutdown when flag is false.",
148+
Description: "Set instance to running or stop. Default value is true, the instance will shutdown when this flag is false.",
149149
},
150150
"placement_group_id": {
151151
Type: schema.TypeString,
152152
Optional: true,
153153
ForceNew: true,
154-
Description: "The id of a placement group.",
154+
Description: "The ID of a placement group.",
155155
},
156156
// payment
157157
"instance_charge_type": {
@@ -186,7 +186,7 @@ func resourceTencentCloudInstance() *schema.Resource {
186186
Optional: true,
187187
ForceNew: true,
188188
ValidateFunc: validateStringNumber,
189-
Description: "Max price of spot instance, is the format of decimal string, for example \"0.50\". Note: it only works when instance_charge_type is set to `SPOTPAID`.",
189+
Description: "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`.",
190190
},
191191
// network
192192
"internet_charge_type": {
@@ -201,41 +201,41 @@ func resourceTencentCloudInstance() *schema.Resource {
201201
Type: schema.TypeInt,
202202
Optional: true,
203203
Computed: true,
204-
Description: "Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). This value does not need to be set when `allocate_public_ip` is false.",
204+
Description: "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.",
205205
},
206206
"allocate_public_ip": {
207207
Type: schema.TypeBool,
208208
Optional: true,
209209
Default: false,
210210
ForceNew: true,
211-
Description: "Associate a public ip address with an instance in a VPC or Classic. Boolean value, Default is false.",
211+
Description: "Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false.",
212212
},
213213
// vpc
214214
"vpc_id": {
215215
Type: schema.TypeString,
216216
Optional: true,
217217
Computed: true,
218-
Description: "The id of a VPC network. If you want to create instances in VPC network, this parameter must be set.",
218+
Description: "The ID of a VPC network. If you want to create instances in a VPC network, this parameter must be set.",
219219
},
220220
"subnet_id": {
221221
Type: schema.TypeString,
222222
Optional: true,
223223
Computed: true,
224-
Description: "The id of a VPC subnetwork. If you want to create instances in VPC network, this parameter must be set.",
224+
Description: "The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set.",
225225
},
226226
"private_ip": {
227227
Type: schema.TypeString,
228228
Optional: true,
229229
Computed: true,
230-
Description: "The private ip to be assigned to this instance, must be in the provided subnet and available.",
230+
Description: "The private IP to be assigned to this instance, must be in the provided subnet and available.",
231231
},
232232
// security group
233233
"security_groups": {
234234
Type: schema.TypeSet,
235235
Elem: &schema.Schema{Type: schema.TypeString},
236236
Optional: true,
237237
Computed: true,
238-
Description: "A list of security group ids to associate with.",
238+
Description: "A list of security group IDs to associate with.",
239239
},
240240
// storage
241241
"system_disk_type": {
@@ -252,7 +252,7 @@ func resourceTencentCloudInstance() *schema.Resource {
252252
Default: 50,
253253
ForceNew: true,
254254
ValidateFunc: validateIntegerInRange(50, 1000),
255-
Description: "Size of the system disk. Value range: [50, 1000], and unit is GB. Default is 50GB.",
255+
Description: "Size of the system disk. Value range: [50, 1000], and the unit is GB. Default is 50GB.",
256256
},
257257
"system_disk_id": {
258258
Type: schema.TypeString,
@@ -266,7 +266,7 @@ func resourceTencentCloudInstance() *schema.Resource {
266266
Optional: true,
267267
Computed: true,
268268
ForceNew: true,
269-
Description: "Settings for data disk.",
269+
Description: "Settings for data disks.",
270270
Elem: &schema.Resource{
271271
Schema: map[string]*schema.Schema{
272272
"data_disk_type": {
@@ -330,27 +330,27 @@ func resourceTencentCloudInstance() *schema.Resource {
330330
Type: schema.TypeString,
331331
Optional: true,
332332
Computed: true,
333-
Description: "The key pair to use for the instance, it looks like skey-16jig7tx.",
333+
Description: "The key pair to use for the instance, it looks like `skey-16jig7tx`.",
334334
},
335335
"password": {
336336
Type: schema.TypeString,
337337
Optional: true,
338338
Sensitive: true,
339-
Description: "Password to an instance. In order to take effect new password, the instance will be restarted after modifying the password.",
339+
Description: "Password for the instance. In order for the new password to take effect, the instance will be restarted after the password change.",
340340
},
341341
"user_data": {
342342
Type: schema.TypeString,
343343
Optional: true,
344344
ForceNew: true,
345345
ConflictsWith: []string{"user_data_raw"},
346-
Description: "The user data to be specified into this instance. Must be encrypted in base64 format and limited in 16 KB.",
346+
Description: "The user data to be injected into this instance. Must be base64 encoded and up to 16 KB.",
347347
},
348348
"user_data_raw": {
349349
Type: schema.TypeString,
350350
Optional: true,
351351
ForceNew: true,
352352
ConflictsWith: []string{"user_data"},
353-
Description: "The user data to be specified into this instance, plain text. Conflicts with `user_data`. Limited in 16 KB after encrypted in base64 format.",
353+
Description: "The user data to be injected into this instance, in plain text. Conflicts with `user_data`. Up to 16 KB after base64 encoded.",
354354
},
355355
"tags": {
356356
Type: schema.TypeMap,
@@ -361,7 +361,7 @@ func resourceTencentCloudInstance() *schema.Resource {
361361
Type: schema.TypeBool,
362362
Optional: true,
363363
Default: false,
364-
Description: "Indicate whether to delete instance directly or not. Default is false. If set true, the instance will be permanently deleted instead of staying in recycle bin. Note: only works for `PREPAID` instance.",
364+
Description: "Indicate whether to force delete the instance. Default is false. If set true, the instance will be permanently deleted instead of being moved into the recycle bin. Note: only works for `PREPAID` instance.",
365365
},
366366
// Computed values.
367367
"instance_status": {
@@ -372,7 +372,7 @@ func resourceTencentCloudInstance() *schema.Resource {
372372
"public_ip": {
373373
Type: schema.TypeString,
374374
Computed: true,
375-
Description: "Public ip of the instance.",
375+
Description: "Public IP of the instance.",
376376
},
377377
"create_time": {
378378
Type: schema.TypeString,

website/docs/r/instance.html.markdown

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -80,38 +80,38 @@ resource "tencentcloud_instance" "my_awesome_app" {
8080

8181
The following arguments are supported:
8282

83-
* `availability_zone` - (Required, ForceNew) The available zone that the CVM instance locates at.
84-
* `image_id` - (Required, ForceNew) The Image to use for the instance. Change 'image_id' will case instance destroy and re-created.
85-
* `allocate_public_ip` - (Optional, ForceNew) Associate a public ip address with an instance in a VPC or Classic. Boolean value, Default is false.
86-
* `data_disks` - (Optional, ForceNew) Settings for data disk.
83+
* `availability_zone` - (Required, ForceNew) The available zone for the CVM instance.
84+
* `image_id` - (Required, ForceNew) The image to use for the instance. Changing `image_id` will cause the instance to be destroyed and re-created.
85+
* `allocate_public_ip` - (Optional, ForceNew) Associate a public IP address with an instance in a VPC or Classic. Boolean value, Default is false.
86+
* `data_disks` - (Optional, ForceNew) Settings for data disks.
8787
* `disable_monitor_service` - (Optional) Disable enhance service for monitor, it is enabled by default. When this options is set, monitor agent won't be installed.
8888
* `disable_security_service` - (Optional) Disable enhance service for security, it is enabled by default. When this options is set, security agent won't be installed.
89-
* `force_delete` - (Optional) Indicate whether to delete instance directly or not. Default is false. If set true, the instance will be permanently deleted instead of staying in recycle bin. Note: only works for `PREPAID` instance.
90-
* `hostname` - (Optional, ForceNew) The hostname of CVM. 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 (-).
89+
* `force_delete` - (Optional) Indicate whether to force delete the instance. Default is false. If set true, the instance will be permanently deleted instead of being moved into the recycle bin. Note: only works for `PREPAID` instance.
90+
* `hostname` - (Optional, ForceNew) 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 (-).
9191
* `instance_charge_type_prepaid_period` - (Optional) The tenancy (time unit is month) of the prepaid instance, NOTE: it only works when instance_charge_type is set to `PREPAID`. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36.
9292
* `instance_charge_type_prepaid_renew_flag` - (Optional) When enabled, the CVM instance will be renew automatically when it reach the end of the prepaid tenancy. Valid values are `NOTIFY_AND_AUTO_RENEW`, `NOTIFY_AND_MANUAL_RENEW` and `DISABLE_NOTIFY_AND_MANUAL_RENEW`. NOTE: it only works when instance_charge_type is set to `PREPAID`.
9393
* `instance_charge_type` - (Optional, ForceNew) The charge type of instance. Valid values are `PREPAID`, `POSTPAID_BY_HOUR` and `SPOTPAID`, The default is `POSTPAID_BY_HOUR`. Note: TencentCloud International only supports `POSTPAID_BY_HOUR`. `PREPAID` instance may not allow to delete before expired. `SPOTPAID` instance must set `spot_instance_type` and `spot_max_price` at the same time.
94-
* `instance_name` - (Optional) The name of the CVM. The max length of instance_name is 60, and default value is `Terraform-CVM-Instance`.
95-
* `instance_type` - (Optional) The type of instance to start.
94+
* `instance_name` - (Optional) The name of the instance. The max length of instance_name is 60, and default value is `Terraform-CVM-Instance`.
95+
* `instance_type` - (Optional) The type of the instance.
9696
* `internet_charge_type` - (Optional, 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.
97-
* `internet_max_bandwidth_out` - (Optional) Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). This value does not need to be set when `allocate_public_ip` is false.
98-
* `key_name` - (Optional) The key pair to use for the instance, it looks like skey-16jig7tx.
99-
* `password` - (Optional) Password to an instance. In order to take effect new password, the instance will be restarted after modifying the password.
100-
* `placement_group_id` - (Optional, ForceNew) The id of a placement group.
101-
* `private_ip` - (Optional) The private ip to be assigned to this instance, must be in the provided subnet and available.
102-
* `project_id` - (Optional) The project CVM belongs to, default to 0.
103-
* `running_flag` - (Optional) Set instance to running or stop. Default value is true, the instance will shutdown when flag is false.
104-
* `security_groups` - (Optional) A list of security group ids to associate with.
97+
* `internet_max_bandwidth_out` - (Optional) 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.
98+
* `key_name` - (Optional) The key pair to use for the instance, it looks like `skey-16jig7tx`.
99+
* `password` - (Optional) Password for the instance. In order for the new password to take effect, the instance will be restarted after the password change.
100+
* `placement_group_id` - (Optional, ForceNew) The ID of a placement group.
101+
* `private_ip` - (Optional) The private IP to be assigned to this instance, must be in the provided subnet and available.
102+
* `project_id` - (Optional) The project the instance belongs to, default to 0.
103+
* `running_flag` - (Optional) Set instance to running or stop. Default value is true, the instance will shutdown when this flag is false.
104+
* `security_groups` - (Optional) A list of security group IDs to associate with.
105105
* `spot_instance_type` - (Optional) Type of spot instance, only support `ONE-TIME` now. Note: it only works when instance_charge_type is set to `SPOTPAID`.
106-
* `spot_max_price` - (Optional, ForceNew) Max price of spot instance, is the format of decimal string, for example "0.50". Note: it only works when instance_charge_type is set to `SPOTPAID`.
107-
* `subnet_id` - (Optional) The id of a VPC subnetwork. If you want to create instances in VPC network, this parameter must be set.
106+
* `spot_max_price` - (Optional, 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`.
107+
* `subnet_id` - (Optional) The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set.
108108
* `system_disk_id` - (Optional) 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.
109-
* `system_disk_size` - (Optional, ForceNew) Size of the system disk. Value range: [50, 1000], and unit is GB. Default is 50GB.
109+
* `system_disk_size` - (Optional, ForceNew) Size of the system disk. Value range: [50, 1000], and the unit is GB. Default is 50GB.
110110
* `system_disk_type` - (Optional, ForceNew) Type of the system disk. Valid values are `LOCAL_BASIC`, `LOCAL_SSD`, `CLOUD_BASIC`, `CLOUD_SSD` and `CLOUD_PREMIUM`, default value is `CLOUD_BASIC`. NOTE: `LOCAL_BASIC` and `LOCAL_SSD` are deprecated.
111111
* `tags` - (Optional) A mapping of tags to assign to the resource. For tag limits, please refer to [Use Limits](https://intl.cloud.tencent.com/document/product/651/13354).
112-
* `user_data_raw` - (Optional, ForceNew) The user data to be specified into this instance, plain text. Conflicts with `user_data`. Limited in 16 KB after encrypted in base64 format.
113-
* `user_data` - (Optional, ForceNew) The user data to be specified into this instance. Must be encrypted in base64 format and limited in 16 KB.
114-
* `vpc_id` - (Optional) The id of a VPC network. If you want to create instances in VPC network, this parameter must be set.
112+
* `user_data_raw` - (Optional, ForceNew) The user data to be injected into this instance, in plain text. Conflicts with `user_data`. Up to 16 KB after base64 encoded.
113+
* `user_data` - (Optional, ForceNew) The user data to be injected into this instance. Must be base64 encoded and up to 16 KB.
114+
* `vpc_id` - (Optional) The ID of a VPC network. If you want to create instances in a VPC network, this parameter must be set.
115115

116116
The `data_disks` object supports the following:
117117

@@ -130,7 +130,7 @@ In addition to all arguments above, the following attributes are exported:
130130
* `create_time` - Create time of the instance.
131131
* `expired_time` - Expired time of the instance.
132132
* `instance_status` - Current status of the instance.
133-
* `public_ip` - Public ip of the instance.
133+
* `public_ip` - Public IP of the instance.
134134

135135

136136
## Import

0 commit comments

Comments
 (0)