File tree 1 file changed +34
-2
lines changed
tencentcloud/services/ccn
1 file changed +34
-2
lines changed Original file line number Diff line number Diff line change 7
7
tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest"
8
8
)
9
9
10
+ // go test -i; go test -test.run TestAccTencentCloudCcnRouteTableInputPoliciesDataSource_basic -v
10
11
func TestAccTencentCloudCcnRouteTableInputPoliciesDataSource_basic (t * testing.T ) {
11
12
t .Parallel ()
12
13
resource .Test (t , resource.TestCase {
@@ -26,8 +27,39 @@ func TestAccTencentCloudCcnRouteTableInputPoliciesDataSource_basic(t *testing.T)
26
27
}
27
28
28
29
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
+
29
61
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
32
64
}
33
65
`
You can’t perform that action at this time.
0 commit comments