@@ -24,7 +24,7 @@ func TestAccTencentCloudTeoL7AccRuleResource_basic(t *testing.T) {
24
24
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.rule_name" , "网站加速" ),
25
25
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.status" , "enable" ),
26
26
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.#" , "1" ),
27
- resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.condition" , "$$ {http.request.host} in ['aaa.makn.cn']" ),
27
+ resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.condition" , "${http.request.host} in ['aaa.makn.cn']" ),
28
28
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.actions.#" , "2" ),
29
29
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.actions.0.name" , "Cache" ),
30
30
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.actions.0.cache_parameters.#" , "1" ),
@@ -44,15 +44,15 @@ func TestAccTencentCloudTeoL7AccRuleResource_basic(t *testing.T) {
44
44
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.#" , "2" ),
45
45
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.description.#" , "1" ),
46
46
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.branches.#" , "1" ),
47
- resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.branches.0.condition" , "lower($$ {http.request.file_extension}) in ['php', 'jsp', 'asp', 'aspx']" ),
47
+ resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.branches.0.condition" , "lower(${http.request.file_extension}) in ['php', 'jsp', 'asp', 'aspx']" ),
48
48
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.branches.0.actions.#" , "1" ),
49
49
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.branches.0.actions.0.name" , "Cache" ),
50
50
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.branches.0.actions.0.cache_parameters.#" , "1" ),
51
51
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.branches.0.actions.0.cache_parameters.0.no_cache.#" , "1" ),
52
52
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.branches.0.actions.0.cache_parameters.0.no_cache.0.switch" , "on" ),
53
53
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.1.description.#" , "1" ),
54
54
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.1.branches.#" , "1" ),
55
- resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.1.branches.0.condition" , "$$ {http.request.file_extension} in ['jpg', 'png', 'gif', 'bmp', 'svg', 'webp']" ),
55
+ resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.1.branches.0.condition" , "${http.request.file_extension} in ['jpg', 'png', 'gif', 'bmp', 'svg', 'webp']" ),
56
56
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.1.branches.0.actions.#" , "1" ),
57
57
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.1.branches.0.actions.0.name" , "MaxAge" ),
58
58
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.1.branches.0.actions.0.max_age_parameters.#" , "1" ),
@@ -75,7 +75,7 @@ func TestAccTencentCloudTeoL7AccRuleResource_basic(t *testing.T) {
75
75
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.rule_name" , "网站加速" ),
76
76
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.status" , "disable" ),
77
77
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.#" , "1" ),
78
- resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.condition" , "$$ {http.request.host} in ['aaa.makn.cn']" ),
78
+ resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.condition" , "${http.request.host} in ['aaa.makn.cn']" ),
79
79
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.actions.#" , "2" ),
80
80
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.actions.0.name" , "Cache" ),
81
81
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.actions.0.cache_parameters.#" , "1" ),
@@ -95,15 +95,15 @@ func TestAccTencentCloudTeoL7AccRuleResource_basic(t *testing.T) {
95
95
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.#" , "2" ),
96
96
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.description.#" , "1" ),
97
97
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.branches.#" , "1" ),
98
- resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.branches.0.condition" , "lower($$ {http.request.file_extension}) in ['php', 'jsp', 'asp', 'aspx']" ),
98
+ resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.branches.0.condition" , "lower(${http.request.file_extension}) in ['php', 'jsp', 'asp', 'aspx']" ),
99
99
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.branches.0.actions.#" , "1" ),
100
100
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.branches.0.actions.0.name" , "Cache" ),
101
101
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.branches.0.actions.0.cache_parameters.#" , "1" ),
102
102
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.branches.0.actions.0.cache_parameters.0.no_cache.#" , "1" ),
103
103
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.0.branches.0.actions.0.cache_parameters.0.no_cache.0.switch" , "on" ),
104
104
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.1.description.#" , "1" ),
105
105
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.1.branches.#" , "1" ),
106
- resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.1.branches.0.condition" , "$$ {http.request.file_extension} in ['jpg', 'png', 'gif', 'bmp', 'svg', 'webp']" ),
106
+ resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.1.branches.0.condition" , "${http.request.file_extension} in ['jpg', 'png', 'gif', 'bmp', 'svg', 'webp']" ),
107
107
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.1.branches.0.actions.#" , "1" ),
108
108
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.1.branches.0.actions.0.name" , "MaxAge" ),
109
109
resource .TestCheckResourceAttr ("tencentcloud_teo_l7_acc_rule.teo_l7_acc_rule" , "rules.0.branches.0.sub_rules.1.branches.0.actions.0.max_age_parameters.#" , "1" ),
0 commit comments