Skip to content

Commit 022c377

Browse files
committed
fix(cvm): [137843507] Modify multiple cvm doc
1 parent a4bfdce commit 022c377

8 files changed

+35
-15
lines changed

tencentcloud/services/cvm/resource_tc_eip_association.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func ResourceTencentCloudEipAssociation() *schema.Resource {
6464
ConflictsWith: []string{
6565
"instance_id",
6666
},
67-
Description: "Indicates an IP belongs to the `network_interface_id`. This field is conflict with `instance_id`.",
67+
Description: "The private IP to bind to. If `network_interface_id` is specified, `private_ip` must also be specified. It cannot be specified at the same time as `instance_id`.Also make sure the specified `private_ip` is a private IP on the specified `network_interface_id`.",
6868
},
6969
},
7070
}

tencentcloud/services/cvm/resource_tc_eip_public_address_adjust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Provides a resource to create a eip public_address_adjust
1+
Provides a resource to create a eip public_address_adjust. Used to change the IP address. It supports changing the common public IP of the CVM instance and the EIP with monthly bandwidth. `address_id` and `instance_id` cannot exist at the same time. When `address_id` is passed, only the EIP with monthly bandwidth is supported.
22

33
Example Usage
44

tencentcloud/services/cvm/resource_tc_instance.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func ResourceTencentCloudInstance() *schema.Resource {
6060
"instance_count": {
6161
Type: schema.TypeInt,
6262
Optional: true,
63-
Deprecated: "It has been deprecated from version 1.59.18. Use built-in `count` instead.",
63+
Deprecated: "It has been deprecated from version 1.59.18.",
6464
ValidateFunc: tccommon.ValidateIntegerInRange(1, 100),
6565
Description: "The number of instances to be purchased. Value range:[1,100]; default value: 1.",
6666
},
@@ -98,7 +98,7 @@ func ResourceTencentCloudInstance() *schema.Resource {
9898
"stopped_mode": {
9999
Type: schema.TypeString,
100100
Optional: true,
101-
Description: "Billing method of a pay-as-you-go instance after shutdown. Available values: `KEEP_CHARGING`,`STOP_CHARGING`. Default `KEEP_CHARGING`.",
101+
Description: "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`.",
102102
ValidateFunc: tccommon.ValidateAllowedStringValue([]string{
103103
CVM_STOP_MODE_KEEP_CHARGING,
104104
CVM_STOP_MODE_STOP_CHARGING,
@@ -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)

tencentcloud/services/cvm/resource_tc_instance_set.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ func ResourceTencentCloudInstanceSet() *schema.Resource {
143143
Computed: true,
144144
Description: "The private IP to be assigned to this instance, must be in the provided subnet and available.",
145145
},
146+
"private_ip_addresses": {
147+
Type: schema.TypeList,
148+
Elem: &schema.Schema{Type: schema.TypeString},
149+
Optional: true,
150+
Computed: true,
151+
Description: "Private network subnet IP array, which can be used when creating an instance or modifying instance vpc attributes. Currently, only batch creation of multiple instances supports passing in multiple IPs of the same subnet. Cannot be set at the same time as `private_ip`.",
152+
},
146153
// security group
147154
"security_groups": {
148155
Type: schema.TypeSet,
@@ -414,7 +421,16 @@ func doResourceTencentCloudInstanceSetCreate(d *schema.ResourceData, meta interf
414421

415422
if v, ok = d.GetOk("private_ip"); ok {
416423
request.VirtualPrivateCloud.PrivateIpAddresses = []*string{helper.String(v.(string))}
424+
} else if v, ok = d.GetOk("private_ip_addresses"); ok {
425+
addresses := v.([]interface{})
426+
addressList := make([]*string, 0, len(addresses))
427+
for _, ip := range addresses {
428+
address := ip.(string)
429+
addressList = append(addressList, &address)
430+
}
431+
request.VirtualPrivateCloud.PrivateIpAddresses = addressList
417432
}
433+
418434
}
419435

420436
if v, ok := d.GetOk("security_groups"); ok {
@@ -567,6 +583,9 @@ func doResourceTencentCloudInstanceSetRead(d *schema.ResourceData, meta interfac
567583
if len(instance.PrivateIpAddresses) > 0 {
568584
_ = d.Set("private_ip", instance.PrivateIpAddresses[0])
569585
}
586+
if len(instance.PrivateIpAddresses) > 0 {
587+
_ = d.Set("private_ip_addresses", instance.PrivateIpAddresses)
588+
}
570589
if len(instance.PublicIpAddresses) > 0 {
571590
_ = d.Set("public_ip", instance.PublicIpAddresses[0])
572591
}

website/docs/r/eip_association.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ The following arguments are supported:
123123
* `eip_id` - (Required, String, ForceNew) The ID of EIP.
124124
* `instance_id` - (Optional, String, ForceNew) The CVM or CLB instance id going to bind with the EIP. This field is conflict with `network_interface_id` and `private_ip fields`.
125125
* `network_interface_id` - (Optional, String, ForceNew) Indicates the network interface id like `eni-xxxxxx`. This field is conflict with `instance_id`.
126-
* `private_ip` - (Optional, String, ForceNew) Indicates an IP belongs to the `network_interface_id`. This field is conflict with `instance_id`.
126+
* `private_ip` - (Optional, String, ForceNew) The private IP to bind to. If `network_interface_id` is specified, `private_ip` must also be specified. It cannot be specified at the same time as `instance_id`.Also make sure the specified `private_ip` is a private IP on the specified `network_interface_id`.
127127

128128
## Attributes Reference
129129

website/docs/r/eip_public_address_adjust.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ layout: "tencentcloud"
44
page_title: "TencentCloud: tencentcloud_eip_public_address_adjust"
55
sidebar_current: "docs-tencentcloud-resource-eip_public_address_adjust"
66
description: |-
7-
Provides a resource to create a eip public_address_adjust
7+
Provides a resource to create a eip public_address_adjust. Used to change the IP address. It supports changing the common public IP of the CVM instance and the EIP with monthly bandwidth. `address_id` and `instance_id` cannot exist at the same time. When `address_id` is passed, only the EIP with monthly bandwidth is supported.
88
---
99

1010
# tencentcloud_eip_public_address_adjust
1111

12-
Provides a resource to create a eip public_address_adjust
12+
Provides a resource to create a eip public_address_adjust. Used to change the IP address. It supports changing the common public IP of the CVM instance and the EIP with monthly bandwidth. `address_id` and `instance_id` cannot exist at the same time. When `address_id` is passed, only the EIP with monthly bandwidth is supported.
1313

1414
## Example Usage
1515

website/docs/r/instance.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ The following arguments are supported:
233233
* `instance_charge_type_prepaid_period` - (Optional, Int) 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`, `48`, `60`.
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`.
236-
* `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.
236+
* `instance_count` - (Optional, Int, **Deprecated**) It has been deprecated from version 1.59.18. The number of instances to be purchased. Value range:[1,100]; default value: 1.
237237
* `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.
@@ -250,7 +250,7 @@ The following arguments are supported:
250250
* `security_groups` - (Optional, Set: [`String`], **Deprecated**) It will be deprecated. Use `orderly_security_groups` instead. A list of security group IDs to associate with.
251251
* `spot_instance_type` - (Optional, String) Type of spot instance, only support `ONE-TIME` now. Note: it only works when instance_charge_type is set to `SPOTPAID`.
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`.
253-
* `stopped_mode` - (Optional, String) Billing method of a pay-as-you-go instance after shutdown. Available values: `KEEP_CHARGING`,`STOP_CHARGING`. Default `KEEP_CHARGING`.
253+
* `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.
255255
* `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.
256256
* `system_disk_name` - (Optional, String) Name of the system disk.

website/docs/r/instance_set.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ The following arguments are supported:
9696
* `key_name` - (Optional, String) The key pair to use for the instance, it looks like `skey-16jig7tx`. Modifying will cause the instance reset.
9797
* `password` - (Optional, String) Password for the instance. In order for the new password to take effect, the instance will be restarted after the password change. Modifying will cause the instance reset.
9898
* `placement_group_id` - (Optional, String, ForceNew) The ID of a placement group.
99+
* `private_ip_addresses` - (Optional, List: [`String`]) Private network subnet IP array, which can be used when creating an instance or modifying instance vpc attributes. Currently, only batch creation of multiple instances supports passing in multiple IPs of the same subnet. Cannot be set at the same time as `private_ip`.
99100
* `private_ip` - (Optional, String) The private IP to be assigned to this instance, must be in the provided subnet and available.
100101
* `project_id` - (Optional, Int) The project the instance belongs to, default to 0.
101102
* `security_groups` - (Optional, Set: [`String`]) A list of security group IDs to associate with.

0 commit comments

Comments
 (0)