Skip to content

Commit 4317448

Browse files
committed
add
1 parent 1cb83cf commit 4317448

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

tencentcloud/services/ccn/data_source_tc_ccn_route_table_input_policies_test.go

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest"
88
)
99

10+
// go test -i; go test -test.run TestAccTencentCloudCcnRouteTableInputPoliciesDataSource_basic -v
1011
func TestAccTencentCloudCcnRouteTableInputPoliciesDataSource_basic(t *testing.T) {
1112
t.Parallel()
1213
resource.Test(t, resource.TestCase{
@@ -26,8 +27,39 @@ func TestAccTencentCloudCcnRouteTableInputPoliciesDataSource_basic(t *testing.T)
2627
}
2728

2829
const testAccCcnRouteTableInputPoliciesDataSource = `
30+
resource "tencentcloud_ccn" "example" {
31+
name = "tf-example"
32+
description = "description."
33+
qos = "AG"
34+
charge_type = "PREPAID"
35+
bandwidth_limit_type = "INTER_REGION_LIMIT"
36+
tags = {
37+
createBy = "terraform"
38+
}
39+
}
40+
41+
resource "tencentcloud_ccn_route_table" "example" {
42+
ccn_id = tencentcloud_ccn.example.id
43+
name = "tf-example"
44+
description = "desc."
45+
}
46+
47+
resource "tencentcloud_ccn_route_table_input_policies" "example" {
48+
ccn_id = tencentcloud_ccn.example.id
49+
route_table_id = tencentcloud_ccn_route_table.example.id
50+
policies {
51+
action = "accept"
52+
description = "desc."
53+
route_conditions {
54+
name = "instance-region"
55+
values = ["ap-guangzhou"]
56+
match_pattern = 1
57+
}
58+
}
59+
}
60+
2961
data "tencentcloud_ccn_route_table_input_policies" "example" {
30-
ccn_id = "ccn-06jek8tf"
31-
route_table_id = "ccnrtb-4jv5ltb9"
62+
ccn_id = tencentcloud_ccn.example.id
63+
route_table_id = tencentcloud_ccn_route_table.example.id
3264
}
3365
`

0 commit comments

Comments
 (0)