Skip to content

Commit 7583195

Browse files
committed
add changelog and doc
1 parent 9fc656a commit 7583195

File tree

5 files changed

+67
-6
lines changed

5 files changed

+67
-6
lines changed

.changelog/1482.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:new-data-source
2+
tencentcloud_as_instances
3+
```

tencentcloud/data_source_tc_as_instances.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@ Example Usage
55
66
```hcl
77
data "tencentcloud_as_instances" "instances" {
8-
instance_ids =
98
filters {
10-
name = ""
11-
values =
12-
13-
}
9+
name = "auto-scaling-group-id"
10+
values = [tencentcloud_as_scaling_group.scaling_group.id]
1411
}
12+
}
1513
```
1614
*/
1715
package tencentcloud
1816

1917
import (
2018
"context"
19+
2120
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
2221
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
2322
as "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/as/v20180419"

tencentcloud/data_source_tc_as_instances_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ data "tencentcloud_as_instances" "instances" {
6262
filters {
6363
name = "auto-scaling-group-id"
6464
values = [tencentcloud_as_scaling_group.scaling_group.id]
65-
6665
}
6766
}
6867
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
subcategory: "Auto Scaling(AS)"
3+
layout: "tencentcloud"
4+
page_title: "TencentCloud: tencentcloud_as_instances"
5+
sidebar_current: "docs-tencentcloud-datasource-as_instances"
6+
description: |-
7+
Use this data source to query detailed information of as instances
8+
---
9+
10+
# tencentcloud_as_instances
11+
12+
Use this data source to query detailed information of as instances
13+
14+
## Example Usage
15+
16+
```hcl
17+
data "tencentcloud_as_instances" "instances" {
18+
filters {
19+
name = "auto-scaling-group-id"
20+
values = [tencentcloud_as_scaling_group.scaling_group.id]
21+
}
22+
}
23+
```
24+
25+
## Argument Reference
26+
27+
The following arguments are supported:
28+
29+
* `filters` - (Optional, List) Filter conditions. If there are multiple Filters, the relationship between Filters is a logical AND (AND) relationship. If there are multiple Values in the same Filter, the relationship between Values under the same Filter is a logical OR (OR) relationship.
30+
* `instance_ids` - (Optional, Set: [`String`]) Instance ID of the cloud server (CVM) to be queried. The limit is 100 per request.
31+
* `result_output_file` - (Optional, String) Used to save results.
32+
33+
The `filters` object supports the following:
34+
35+
* `name` - (Required, String) Fields to be filtered. Valid names: `instance-id`: Filters by instance ID, `auto-scaling-group-id`: Filter by scaling group ID.
36+
* `values` - (Required, Set) Value of the field.
37+
38+
## Attributes Reference
39+
40+
In addition to all arguments above, the following attributes are exported:
41+
42+
* `instance_list` - List of instance details.
43+
* `add_time` - The time when the instance joined the group.
44+
* `auto_scaling_group_id` - Auto scaling group ID.
45+
* `auto_scaling_group_name` - Auto scaling group name.
46+
* `creation_type` - Valid values: `AUTO_CREATION`, `MANUAL_ATTACHING`.
47+
* `health_status` - Health status, the valid values are HEALTHY and UNHEALTHY.
48+
* `instance_id` - Instance ID.
49+
* `instance_type` - Instance type.
50+
* `launch_configuration_id` - Launch configuration ID.
51+
* `launch_configuration_name` - Launch configuration name.
52+
* `life_cycle_state` - Life cycle state. Please refer to the link for field value details: https://cloud.tencent.com/document/api/377/20453#Instance.
53+
* `protected_from_scale_in` - Enable scale in protection.
54+
* `version_number` - Version ID.
55+
* `zone` - Available zone.
56+
57+

website/tencentcloud.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@
198198
<li>
199199
<a href="#">Data Sources</a>
200200
<ul class="nav nav-auto-expand">
201+
<li>
202+
<a href="/docs/providers/tencentcloud/d/as_instances.html">tencentcloud_as_instances</a>
203+
</li>
201204
<li>
202205
<a href="/docs/providers/tencentcloud/d/as_scaling_configs.html">tencentcloud_as_scaling_configs</a>
203206
</li>

0 commit comments

Comments
 (0)