File tree Expand file tree Collapse file tree 1 file changed +34
-2
lines changed
tencentcloud/services/ccn Expand file tree Collapse file tree 1 file changed +34
-2
lines changed Original file line number Diff line number Diff line change 77 tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest"
88)
99
10+ // go test -i; go test -test.run TestAccTencentCloudCcnRouteTableInputPoliciesDataSource_basic -v
1011func 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
2829const 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+
2961data "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`
You can’t perform that action at this time.
0 commit comments