Skip to content

Commit 46d8c2e

Browse files
committed
fix: support origin_pull_protocol
1 parent 5a41484 commit 46d8c2e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

tencentcloud/services/teo/resource_tc_teo_l7_acc_rule_extension.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,21 @@ func TencentTeoL7RuleBranchBasicInfo(depth int) map[string]*schema.Schema {
566566
},
567567
},
568568
},
569+
"origin_pull_protocol_parameters": {
570+
Type: schema.TypeList,
571+
Optional: true,
572+
MaxItems: 1,
573+
Description: "Back-to-origin HTTPS configuration parameter. This parameter is required when the Name value is `OriginPullProtocol`.",
574+
Elem: &schema.Resource{
575+
Schema: map[string]*schema.Schema{
576+
"protocol": {
577+
Type: schema.TypeString,
578+
Optional: true,
579+
Description: "Back-to-origin protocol configuration. Possible values ​​are: `http`: use HTTP protocol for back-to-origin; `https`: use HTTPS protocol for back-to-origin; `follow`: follow the protocol.",
580+
},
581+
},
582+
},
583+
},
569584
"compression_parameters": {
570585
Type: schema.TypeList,
571586
Optional: true,
@@ -1396,6 +1411,13 @@ func resourceTencentCloudTeoL7AccRuleGetBranchs(rulesMap map[string]interface{})
13961411
}
13971412
ruleEngineAction.ForceRedirectHTTPSParameters = &forceRedirectHTTPSParameters
13981413
}
1414+
// if originPullProtocolParametersMap, ok := helper.ConvertInterfacesHeadToMap(actionsMap["origin_pull_protocol_parameters"]); ok {
1415+
// originPullProtocolParameters := teov20220901.OriginPullProtocol{}
1416+
// if v, ok := originPullProtocolParametersMap["protocol"].(string); ok && v != "" {
1417+
// originPullProtocolParameters.Protocol = helper.String(v)
1418+
// }
1419+
// ruleEngineAction.OriginPullProtocolParameters = &originPullProtocolParameters
1420+
// }
13991421
if compressionParametersMap, ok := helper.ConvertInterfacesHeadToMap(actionsMap["compression_parameters"]); ok {
14001422
compressionParameters := teov20220901.CompressionParameters{}
14011423
if v, ok := compressionParametersMap["switch"].(string); ok && v != "" {
@@ -2088,6 +2110,16 @@ func resourceTencentCloudTeoL7AccRuleSetBranchs(ruleBranches []*teo.RuleBranch)
20882110
actionsMap["force_redirect_https_parameters"] = []interface{}{forceRedirectHTTPSParametersMap}
20892111
}
20902112

2113+
// originPullProtocolParametersMap := map[string]interface{}{}
2114+
2115+
// if actions.OriginPullProtocolParameters != nil {
2116+
// if actions.OriginPullProtocolParameters.Protocol != nil {
2117+
// originPullProtocolParametersMap["protocol"] = actions.OriginPullProtocolParameters.Protocol
2118+
// }
2119+
2120+
// actionsMap["origin_pull_protocol_parameters"] = []interface{}{originPullProtocolParametersMap}
2121+
// }
2122+
20912123
compressionParametersMap := map[string]interface{}{}
20922124

20932125
if actions.CompressionParameters != nil {

0 commit comments

Comments
 (0)