Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update readme #12

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 21 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# TencentCloud Terraform

The VSCode TIAT(Tencent Infrastructure Automation for Terraform)Terraform extension is designed to improve the efficiency of DevOps when using Terraform with Tencent Cloud. The extension provides TencentCloud Account login, resource explorer, code auto-complete, argument tips, and command support inside VSCode.
The TIAT(Tencent Infrastructure Automation for Terraform)Terraform VS Code extension is designed to improve the efficiency of DevOps when using Terraform with Tencent Cloud. The extension provides TencentCloud Account login, resource explorer, code auto-complete, argument tips, and command palette inside VSCode.

![demo](./images/readme/demo-overview.gif)

## Features

This extension supports the following features:

- Login: log in Tencent Cloud with AKSK.
- Terraform Commands: init, plan, apply, and destroy through the VSCode command Palette.
- Auto Complete: provides code suggestions and auto-complete resource types, arguments, and options. Provides ways to go to resource documents.
- Auto Complete: provides code suggestions and auto-complete resource types, arguments, and options.
- Code Snippets/Example: provides a completed example code when typing the specified resource type.
- Tips: provides `Go to Terraform definition` to preview resource documents natively instead of through the official website.
- Import Resource: display the existing `CVM` resource and then import it as a tf file by [Terraformer](https://github.com/GoogleCloudPlatform/terraformer).

*TO-DO(Features to be supported in the future):*
Expand All @@ -20,7 +23,8 @@ This extension supports the following features:
## Quick Start
### 1.Login Tencent Cloud
Provide Log in entry to Tencent Cloud.
![login](./images/readme/login.png)
![login](./images/readme/demo-login-logout.gif)

After logged, you can see your account and detail when hovering the status bar.
![account_status](./images/readme/account_status.png)

Expand Down Expand Up @@ -65,20 +69,24 @@ Open the Command Palette (`Command`+`Shift`+`P` on macOS and `Ctrl`+`Shift`+`P`
</tbody>
</table>

![demo-cmd](./images/readme/demo-cmd.gif)

### 3.Auto Complete
When you typing the resource type, attribute, and options, there is a suggestions dialog.

#### Resource Type
![auto_complete_resourcetype](./images/readme/auto_complete_resourcetype.png)
#### Attribute
![auto_complete_resourcetype](./images/readme/auto_complete_attr.png)
![auto_complete_resType](./images/readme/demo-auto-complete-resType.gif)

#### Argument
![auto_complete_argument](./images/readme/demo-auto-complete-argument.gif)

#### Options(demo)
> NOTE: only support on `tencentcloud_instance` resource.
![auto_complete_resourcetype](./images/readme/auto_complete_attr_options.png)
![auto_complete_options](./images/readme/demo-auto-complete-options.gif)

### 4.Code Snippets/Example
When you typing the `{` after a resource type and name, there is a example suggestions.
![example](./images/readme/example.png)
![example](./images/readme/demo-code-example.gif)

Press `Enter` to insert the whole example.

Expand All @@ -91,11 +99,9 @@ Choose one resource to import it.
After a few minutes, the import resource will be in the `generated` folder.

### 6.Resource definition
When you place the cursor on a resource type, use the `go to definition` (`Command` on macOS) button to jump to this resource document of the terraform provider website.
When you open a menu on a terraform resource, click the `Go to Terraform Definition` (`ctrl+shift+D` on macOS/Linux/Windows) item to open a preview panel to display the resource document locally.

![doc_definition](./images/readme/doc_definition.png)
Or, put cursor under the resource type, press `Command`.
![doc](./images/readme/doc.png)
![doc_definition](./images/readme/demo-doc-res.gif)

## Requirements

Expand All @@ -118,7 +124,8 @@ This extension requires:
[MIT](LICENSE.md)

## Reference
- [Source code of the tencentcloud terraform provider ](https://github.com/tencentcloudstack/terraform-provider-tencentcloud)
- [Document of the tencentcloud terraform](https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/latest)
- [Document - TencnetCloud Terraform Registry](https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/latest/docs)
- [Repo - TencnetCloud Terraform Provider ](https://github.com/tencentcloudstack/terraform-provider-tencentcloud)
- [Tencent Cloud Terraform extension - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=Tencent-Cloud.vscode-tencentcloud-terraform)

**Enjoy!**
39 changes: 39 additions & 0 deletions config/docs/d/address_template_groups.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
subcategory: "Virtual Private Cloud(VPC)"
layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_address_template_groups"
sidebar_current: "docs-tencentcloud-datasource-address_template_groups"
description: |-
Use this data source to query detailed information of address template groups.
---

# tencentcloud_address_template_groups

Use this data source to query detailed information of address template groups.

## Example Usage

```hcl
data "tencentcloud_address_template_groups" "name" {
name = "test"
}
```

## Argument Reference

The following arguments are supported:

* `id` - (Optional, String) Id of the address template group to query.
* `name` - (Optional, String) Name of the address template group to query.
* `result_output_file` - (Optional, String) Used to save results.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

* `group_list` - Information list of the dedicated address template groups.
* `id` - Id of the address template group.
* `name` - Name of address template group.
* `template_ids` - ID set of the address template.


39 changes: 39 additions & 0 deletions config/docs/d/address_templates.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
subcategory: "Virtual Private Cloud(VPC)"
layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_address_templates"
sidebar_current: "docs-tencentcloud-datasource-address_templates"
description: |-
Use this data source to query detailed information of address templates.
---

# tencentcloud_address_templates

Use this data source to query detailed information of address templates.

## Example Usage

```hcl
data "tencentcloud_address_templates" "name" {
name = "test"
}
```

## Argument Reference

The following arguments are supported:

* `id` - (Optional, String) ID of the address template to query.
* `name` - (Optional, String) Name of the address template to query.
* `result_output_file` - (Optional, String) Used to save results.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

* `template_list` - Information list of the dedicated address templates.
* `addresses` - Set of the addresses.
* `id` - ID of the address template.
* `name` - Name of address template.


45 changes: 45 additions & 0 deletions config/docs/d/antiddos_basic_device_status.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
subcategory: "Anti-DDoS"
layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_antiddos_basic_device_status"
sidebar_current: "docs-tencentcloud-datasource-antiddos_basic_device_status"
description: |-
Use this data source to query detailed information of antiddos basic_device_status
---

# tencentcloud_antiddos_basic_device_status

Use this data source to query detailed information of antiddos basic_device_status

## Example Usage

```hcl
data "tencentcloud_antiddos_basic_device_status" "basic_device_status" {
ip_list = [
"127.0.0.1"
]
filter_region = 1
}
```

## Argument Reference

The following arguments are supported:

* `filter_region` - (Optional, Int) Region Id.
* `id_list` - (Optional, Set: [`String`]) Named resource transfer ID.
* `ip_list` - (Optional, Set: [`String`]) Ip resource list.
* `result_output_file` - (Optional, String) Used to save results.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

* `clb_data` - Note: This field may return null, indicating that a valid value cannot be obtained.
* `key` - Properties name.
* `value` - Properties value.
* `data` - Return resources and status, status code: 1- Blocking status 2- Normal status 3- Attack status.
* `key` - Properties name.
* `value` - Properties value.


47 changes: 47 additions & 0 deletions config/docs/d/antiddos_bgp_biz_trend.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
subcategory: "Anti-DDoS"
layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_antiddos_bgp_biz_trend"
sidebar_current: "docs-tencentcloud-datasource-antiddos_bgp_biz_trend"
description: |-
Use this data source to query detailed information of antiddos bgp_biz_trend
---

# tencentcloud_antiddos_bgp_biz_trend

Use this data source to query detailed information of antiddos bgp_biz_trend

## Example Usage

```hcl
data "tencentcloud_antiddos_bgp_biz_trend" "bgp_biz_trend" {
business = "bgp-multip"
start_time = "2023-11-22 09:25:00"
end_time = "2023-11-22 10:25:00"
metric_name = "intraffic"
instance_id = "bgp-00000ry7"
flag = 0
}
```

## Argument Reference

The following arguments are supported:

* `business` - (Required, String) Dayu sub product code (bgpip represents advanced defense IP; net represents professional version of advanced defense IP).
* `end_time` - (Required, String) Statistic end time.
* `flag` - (Required, Int) 0 represents fixed time, 1 represents custom time.
* `instance_id` - (Required, String) Antiddos InstanceId.
* `metric_name` - (Required, String) Statistic metric name, for example: intraffic, outtraffic, inpkg, outpkg.
* `start_time` - (Required, String) Statistic start time.
* `result_output_file` - (Optional, String) Used to save results.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

* `data_list` - Values at various time points on the graph.
* `max_data` - Returns the maximum value of an array.
* `total` - Number of values in the curve graph.


67 changes: 67 additions & 0 deletions config/docs/d/antiddos_list_listener.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
subcategory: "Anti-DDoS"
layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_antiddos_list_listener"
sidebar_current: "docs-tencentcloud-datasource-antiddos_list_listener"
description: |-
Use this data source to query detailed information of antiddos list_listener
---

# tencentcloud_antiddos_list_listener

Use this data source to query detailed information of antiddos list_listener

## Example Usage

```hcl
data "tencentcloud_antiddos_list_listener" "list_listener" {
}
```

## Argument Reference

The following arguments are supported:

* `result_output_file` - (Optional, String) Used to save results.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

* `layer4_listeners` - L4 listener list.
* `backend_port` - Origin port, value 1~65535.
* `frontend_port` - Forwarding port, value 1~65535.
* `instance_detail_rule` - Resource instance to which the rule belongs.
* `cname` - Instance cname.
* `eip_list` - Resource instance ip.
* `instance_id` - InstanceId.
* `instance_details` - Resource instance.
* `eip_list` - Instance ip.
* `instance_id` - InstanceId.
* `protocol` - TCP or UDP.
* `real_servers` - Source server list.
* `port` - 0~65535.
* `real_server` - Source server addr, ip or domain.
* `rs_type` - 1: domain, 2: ip.
* `weight` - The return weight of the source station, ranging from 1 to 100.
* `layer7_listeners` - Layer 7 forwarding listener list.
* `domain` - Domain.
* `instance_detail_rule` - Resource instance to which the rule belongs.
* `cname` - Cname.
* `eip_list` - Instance ip list.
* `instance_id` - Instance id.
* `instance_details` - InstanceDetails.
* `eip_list` - Instance ip list.
* `instance_id` - Instance id.
* `protocol` - Protocol.
* `proxy_type_list` - List of forwarding types.
* `proxy_ports` - Forwarding listening port list, port value is 1~65535.
* `proxy_type` - Http, https.
* `real_servers` - Source server list.
* `port` - 0-65535.
* `real_server` - Source server list.
* `rs_type` - 1: domain, 2: ip.
* `weight` - Weight: 1-100.
* `vport` - Port.


44 changes: 44 additions & 0 deletions config/docs/d/antiddos_overview_attack_trend.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
subcategory: "Anti-DDoS"
layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_antiddos_overview_attack_trend"
sidebar_current: "docs-tencentcloud-datasource-antiddos_overview_attack_trend"
description: |-
Use this data source to query detailed information of antiddos overview_attack_trend
---

# tencentcloud_antiddos_overview_attack_trend

Use this data source to query detailed information of antiddos overview_attack_trend

## Example Usage

```hcl
data "tencentcloud_antiddos_overview_attack_trend" "overview_attack_trend" {
type = "ddos"
dimension = "attackcount"
period = 86400
start_time = "2023-11-21 10:28:31"
end_time = "2023-11-22 10:28:31"
}
```

## Argument Reference

The following arguments are supported:

* `dimension` - (Required, String) Latitude, currently only attackcount is supported.
* `end_time` - (Required, String) Protection Overview Attack Trend End Time.
* `period` - (Required, Int) Period, currently only 86400 is supported.
* `start_time` - (Required, String) Protection Overview Attack Trend Start Time.
* `type` - (Required, String) Attack type: cc, ddos.
* `result_output_file` - (Optional, String) Used to save results.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

* `data` - Number of attacks per cycle point.
* `period_point_count` - Number of period points included.


Loading
Loading