Skip to content

Commit 62c05b8

Browse files
authored
add ccn doc (#2733)
1 parent e945c32 commit 62c05b8

9 files changed

+652
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ FEATURES:
88
* **New Resource:** `tencentcloud_ccn_route_table_associate_instance_config` ([#2730](https://github.com/tencentcloudstack/terraform-provider-tencentcloud/pull/2730))
99
* **New Resource:** `tencentcloud_ccn_route_table_broadcast_policies` ([#2730](https://github.com/tencentcloudstack/terraform-provider-tencentcloud/pull/2730))
1010
* **New Resource:** `tencentcloud_ccn_route_table_input_policies` ([#2730](https://github.com/tencentcloudstack/terraform-provider-tencentcloud/pull/2730))
11+
* **New Resource:** `tencentcloud_ccn_route_table_selection_policies` ([#2730](https://github.com/tencentcloudstack/terraform-provider-tencentcloud/pull/2730))
1112
* **New Resource:** `tencentcloud_kubernetes_addon_config` ([#2725](https://github.com/tencentcloudstack/terraform-provider-tencentcloud/pull/2725))
1213

1314
ENHANCEMENTS:

tencentcloud/provider.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ Cloud Connect Network(CCN)
309309
tencentcloud_ccn_tenant_instances
310310
tencentcloud_ccn_cross_border_flow_monitor
311311
tencentcloud_ccn_cross_border_region_bandwidth_limits
312+
tencentcloud_ccn_routes
312313

313314
Resource
314315
tencentcloud_ccn
@@ -318,6 +319,11 @@ Cloud Connect Network(CCN)
318319
tencentcloud_ccn_instances_accept_attach
319320
tencentcloud_ccn_instances_reject_attach
320321
tencentcloud_ccn_instances_reset_attach
322+
tencentcloud_ccn_route_table
323+
tencentcloud_ccn_route_table_input_policies
324+
tencentcloud_ccn_route_table_broadcast_policies
325+
tencentcloud_ccn_route_table_selection_policies
326+
tencentcloud_ccn_route_table_associate_instance_config
321327

322328
CVM Dedicated Host(CDH)
323329
Data Source
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
subcategory: "Cloud Connect Network(CCN)"
3+
layout: "tencentcloud"
4+
page_title: "TencentCloud: tencentcloud_ccn_routes"
5+
sidebar_current: "docs-tencentcloud-datasource-ccn_routes"
6+
description: |-
7+
Use this data source to query detailed information of CCN routes.
8+
---
9+
10+
# tencentcloud_ccn_routes
11+
12+
Use this data source to query detailed information of CCN routes.
13+
14+
## Example Usage
15+
16+
### Query CCN instance all routes
17+
18+
```hcl
19+
data "tencentcloud_ccn_routes" "routes" {
20+
ccn_id = "ccn-gr7nynbd"
21+
}
22+
```
23+
24+
### Query CCN instance routes by filter
25+
26+
```hcl
27+
data "tencentcloud_ccn_routes" "routes" {
28+
ccn_id = "ccn-gr7nynbd"
29+
filters {
30+
name = "route-table-id"
31+
values = ["ccnrtb-jpf7bzn3"]
32+
}
33+
}
34+
```
35+
36+
## Argument Reference
37+
38+
The following arguments are supported:
39+
40+
* `ccn_id` - (Required, String) ID of the CCN to be queried.
41+
* `filters` - (Optional, List) Filter conditions.
42+
* `result_output_file` - (Optional, String) Used to save results.
43+
44+
The `filters` object supports the following:
45+
46+
* `name` - (Required, String) Field to be filtered. Support `route-id`, `cidr-block`, `instance-type`, `instance-region`, `instance-id`, `route-table-id`.
47+
* `values` - (Required, Set) Filter value of the field.
48+
49+
## Attributes Reference
50+
51+
In addition to all arguments above, the following attributes are exported:
52+
53+
* `route_list` - CCN route list.
54+
* `destination_cidr_block` - Destination.
55+
* `enabled` - Is routing enabled.
56+
* `extra_state` - Extension status of routing.
57+
* `instance_extra_name` - Next hop extension name (associated instance extension name).
58+
* `instance_id` - Next jump (associated instance ID).
59+
* `instance_name` - Next jump (associated instance name).
60+
* `instance_region` - Next jump (associated instance region).
61+
* `instance_type` - Next hop type (associated instance type), all types: VPC, DIRECTCONNECT.
62+
* `instance_uin` - The UIN (root account) to which the associated instance belongs.
63+
* `is_bgp` - Is it dynamic routing.
64+
* `route_id` - route ID.
65+
* `route_priority` - Routing priority.
66+
* `update_time` - update time.
67+
68+
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
subcategory: "Cloud Connect Network(CCN)"
3+
layout: "tencentcloud"
4+
page_title: "TencentCloud: tencentcloud_ccn_route_table"
5+
sidebar_current: "docs-tencentcloud-resource-ccn_route_table"
6+
description: |-
7+
Provides a resource to create a CCN Route table.
8+
---
9+
10+
# tencentcloud_ccn_route_table
11+
12+
Provides a resource to create a CCN Route table.
13+
14+
## Example Usage
15+
16+
```hcl
17+
variable "region" {
18+
default = "ap-guangzhou"
19+
}
20+
21+
variable "availability_zone" {
22+
default = "ap-guangzhou-4"
23+
}
24+
25+
# create vpc
26+
resource "tencentcloud_vpc" "vpc" {
27+
name = "vpc"
28+
cidr_block = "172.16.0.0/16"
29+
}
30+
31+
# create subnet
32+
resource "tencentcloud_subnet" "subnet" {
33+
availability_zone = var.availability_zone
34+
name = "subnet"
35+
vpc_id = tencentcloud_vpc.vpc.id
36+
cidr_block = "10.0.20.0/28"
37+
is_multicast = false
38+
}
39+
40+
# create ccn
41+
resource "tencentcloud_ccn" "example" {
42+
name = "tf-example"
43+
description = "desc."
44+
qos = "AG"
45+
charge_type = "PREPAID"
46+
bandwidth_limit_type = "INTER_REGION_LIMIT"
47+
tags = {
48+
createBy = "terraform"
49+
}
50+
}
51+
52+
# create ccn route table
53+
resource "tencentcloud_ccn_route_table" "example" {
54+
ccn_id = tencentcloud_ccn.example.id
55+
name = "tf-example"
56+
description = "desc."
57+
}
58+
```
59+
60+
## Argument Reference
61+
62+
The following arguments are supported:
63+
64+
* `ccn_id` - (Required, String, ForceNew) CCN Instance ID.
65+
* `description` - (Required, String) Description of CCN Route table.
66+
* `name` - (Required, String) CCN Route table name.
67+
68+
## Attributes Reference
69+
70+
In addition to all arguments above, the following attributes are exported:
71+
72+
* `id` - ID of the resource.
73+
* `create_time` - create time.
74+
* `is_default_table` - True: default routing table False: non default routing table.
75+
76+
77+
## Import
78+
79+
Ccn instance can be imported, e.g.
80+
81+
```
82+
$ terraform import tencentcloud_ccn_route_table.example ccnrtb-r5hrr417
83+
```
84+
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
subcategory: "Cloud Connect Network(CCN)"
3+
layout: "tencentcloud"
4+
page_title: "TencentCloud: tencentcloud_ccn_route_table_associate_instance_config"
5+
sidebar_current: "docs-tencentcloud-resource-ccn_route_table_associate_instance_config"
6+
description: |-
7+
Provides a resource to create a CCN Route table associate instance config.
8+
---
9+
10+
# tencentcloud_ccn_route_table_associate_instance_config
11+
12+
Provides a resource to create a CCN Route table associate instance config.
13+
14+
## Example Usage
15+
16+
```hcl
17+
variable "region" {
18+
default = "ap-guangzhou"
19+
}
20+
21+
variable "availability_zone" {
22+
default = "ap-guangzhou-4"
23+
}
24+
25+
# create vpc
26+
resource "tencentcloud_vpc" "vpc" {
27+
name = "vpc"
28+
cidr_block = "172.16.0.0/16"
29+
}
30+
31+
# create subnet
32+
resource "tencentcloud_subnet" "subnet" {
33+
availability_zone = var.availability_zone
34+
name = "subnet"
35+
vpc_id = tencentcloud_vpc.vpc.id
36+
cidr_block = "172.16.0.0/24"
37+
is_multicast = false
38+
}
39+
40+
# create ccn
41+
resource "tencentcloud_ccn" "example" {
42+
name = "tf-example"
43+
description = "desc."
44+
qos = "AG"
45+
charge_type = "PREPAID"
46+
bandwidth_limit_type = "INTER_REGION_LIMIT"
47+
tags = {
48+
createBy = "terraform"
49+
}
50+
}
51+
52+
# create ccn route table
53+
resource "tencentcloud_ccn_route_table" "example" {
54+
ccn_id = tencentcloud_ccn.example.id
55+
name = "tf-example"
56+
description = "desc."
57+
}
58+
59+
# attachment instance
60+
resource "tencentcloud_ccn_attachment" "attachment" {
61+
ccn_id = tencentcloud_ccn.example.id
62+
instance_id = tencentcloud_vpc.vpc.id
63+
instance_type = "VPC"
64+
instance_region = var.region
65+
route_table_id = tencentcloud_ccn_route_table.example.id
66+
}
67+
68+
# route table associate instance
69+
resource "tencentcloud_ccn_route_table_associate_instance_config" "example" {
70+
ccn_id = tencentcloud_ccn.example.id
71+
route_table_id = tencentcloud_ccn_route_table.example.id
72+
instances {
73+
instance_id = tencentcloud_vpc.vpc.id
74+
instance_type = "VPC"
75+
}
76+
}
77+
```
78+
79+
## Argument Reference
80+
81+
The following arguments are supported:
82+
83+
* `ccn_id` - (Required, String) ID of the CCN.
84+
* `instances` - (Required, Set) Instances list.
85+
* `route_table_id` - (Required, String) Ccn instance route table ID.
86+
87+
The `instances` object supports the following:
88+
89+
* `instance_id` - (Required, String) Instances ID.
90+
* `instance_type` - (Required, String) Cloud networking supports instance types: VPC, DIRECTCONNECT, BMVPC, EDGE, EDGE_TUNNEL, EDGE_VPNGW, VPNGW.
91+
92+
## Attributes Reference
93+
94+
In addition to all arguments above, the following attributes are exported:
95+
96+
* `id` - ID of the resource.
97+
98+
99+
100+
## Import
101+
102+
Ccn instance can be imported, e.g.
103+
104+
```
105+
$ terraform import tencentcloud_ccn_route_table_associate_instance_config.example ccn-gr7nynbd#ccnrtb-jpf7bzn3
106+
```
107+

0 commit comments

Comments
 (0)