Skip to content

Commit e5191bf

Browse files
committed
fix: modify doc
1 parent 022c377 commit e5191bf

File tree

3 files changed

+33
-10
lines changed

3 files changed

+33
-10
lines changed

.changelog/3157.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
```release-note:enhancement
2+
resource/tencentcloud_eip_association: update doc
3+
```
4+
5+
```release-note:enhancement
6+
resource/tencentcloud_eip_public_address_adjust: update doc
7+
```
8+
9+
```release-note:enhancement
10+
resource/tencentcloud_instance: update doc
11+
```
12+
13+
```release-note:enhancement
14+
resource/tencentcloud_instance_set: Added field `private_ip_addresses`
15+
```

tencentcloud/services/cvm/resource_tc_instance_set.go

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,22 @@ func ResourceTencentCloudInstanceSet() *schema.Resource {
138138
Description: "The ID of a VPC subnet. If you want to create instances in a VPC network, this parameter must be set.",
139139
},
140140
"private_ip": {
141-
Type: schema.TypeString,
142-
Optional: true,
143-
Computed: true,
144-
Description: "The private IP to be assigned to this instance, must be in the provided subnet and available.",
141+
Type: schema.TypeString,
142+
Optional: true,
143+
Computed: true,
144+
ConflictsWith: []string{
145+
"private_ip_addresses",
146+
},
147+
Description: "The private IP to be assigned to this instance, must be in the provided subnet and available. Cannot be set at the same time as `private_ip_addresses`.",
145148
},
146149
"private_ip_addresses": {
147-
Type: schema.TypeList,
148-
Elem: &schema.Schema{Type: schema.TypeString},
149-
Optional: true,
150-
Computed: true,
150+
Type: schema.TypeList,
151+
Elem: &schema.Schema{Type: schema.TypeString},
152+
Optional: true,
153+
Computed: true,
154+
ConflictsWith: []string{
155+
"private_ip",
156+
},
151157
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`.",
152158
},
153159
// security group
@@ -421,7 +427,9 @@ func doResourceTencentCloudInstanceSetCreate(d *schema.ResourceData, meta interf
421427

422428
if v, ok = d.GetOk("private_ip"); ok {
423429
request.VirtualPrivateCloud.PrivateIpAddresses = []*string{helper.String(v.(string))}
424-
} else if v, ok = d.GetOk("private_ip_addresses"); ok {
430+
}
431+
432+
if v, ok = d.GetOk("private_ip_addresses"); ok {
425433
addresses := v.([]interface{})
426434
addressList := make([]*string, 0, len(addresses))
427435
for _, ip := range addresses {

website/docs/r/instance_set.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ The following arguments are supported:
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.
9999
* `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`.
100-
* `private_ip` - (Optional, String) The private IP to be assigned to this instance, must be in the provided subnet and available.
100+
* `private_ip` - (Optional, String) The private IP to be assigned to this instance, must be in the provided subnet and available. Cannot be set at the same time as `private_ip_addresses`.
101101
* `project_id` - (Optional, Int) The project the instance belongs to, default to 0.
102102
* `security_groups` - (Optional, Set: [`String`]) A list of security group IDs to associate with.
103103
* `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.

0 commit comments

Comments
 (0)