When configuring a tencentcloud_teo_origin_acl resource without defining Layer 4 proxy protection (i.e., l4_proxy_ids is omitted, set to null, or set to []), the provider incorrectly injects "L4EnableMode": "specific" into the EnableOriginACL API request payload.
Because L4ProxyIds is empty, the EdgeOne API strictly rejects the payload, as "L4EnableMode": "specific" requires at least one valid L4 proxy ID to be passed.
The provider should either omit L4EnableMode entirely from the JSON request or pass a valid mode (like "all") when no L4 proxies are defined.
Terraform CLI and Provider Versions
- Terraform v1.15.5
- tencentcloud-sdk-go: v1.82.97
- terraform-provider-tencentcloud: v1.82.97
Affected Resource(s)
tencentcloud_teo_origin_acl
Terraform Configuration Files
resource "tencentcloud_teo_origin_acl" "origin_protection" {
zone_id = "zone-xxxxxxxxx"
origin_acl_family = "gaz"
l7_hosts = ["example.com.cn"]
# Leaving l4_proxy_ids empty, null, or entirely commented out triggers the bug
l4_proxy_ids = []
}
Debug Output
2026-05-27T12:46:05.421+0100 [INFO] provider.terraform-provider-tencentcloud_v1.82.97: 2026/05/27 12:46:05 ######[DEBUG]tencentcloud-sdk-go: [EnableOriginACL], request: {"ZoneId":"zone-xxxxxxxxx","L7EnableMode":"specific","L7Hosts":["example.com.cn"],"L4EnableMode":"specific","OriginACLFamily":"gaz"}, (host teo.tencentcloudapi.com, region:[ap-beijing]); response:{"Response":{"Error":{"Code":"InvalidParameterValue","Message":"When L4EnableMode is set to all, the L4ProxyIds field must be empty.When L4EnableMode is set to special, the L4ProxyIds field must contain specific Layer 4 proxy instance IDs.Please verify that L4ProxyIds is accurately filled based on the selected mode."},"RequestId":"[UUID]"}},cost 1.78210158s: timestamp="2026-05-27T12:46:05.421+0100"
Expected Behavior
A successful API call configuring only the Layer 7 hosts. The provider should recognize that l4_proxy_ids is empty and either omit "L4EnableMode" from the request entirely, or set it to "all" so that the EdgeOne API validation passes.
Actual Behavior
The API rejects the request with a 400 InvalidParameterValue error because the provider defaulted to "L4EnableMode": "specific" without providing the required L4 proxy IDs.
i.e.
{
"ZoneId": "zone-xxxxxxxxx",
"L7EnableMode": "specific",
"L7Hosts": [
"example.com.cn"
],
"L4EnableMode": "specific",
"OriginACLFamily": "gaz"
}
Steps to Reproduce
- Create a
tencentcloud_teo_origin_acl resource.
- Define
l7_hosts.
- Omit
l4_proxy_ids or explicitly set it to [].
- Run
terraform apply.
When configuring a
tencentcloud_teo_origin_aclresource without defining Layer 4 proxy protection (i.e.,l4_proxy_idsis omitted, set tonull, or set to[]), the provider incorrectly injects"L4EnableMode": "specific"into the EnableOriginACL API request payload.Because
L4ProxyIdsis empty, the EdgeOne API strictly rejects the payload, as"L4EnableMode": "specific"requires at least one valid L4 proxy ID to be passed.The provider should either omit
L4EnableModeentirely from the JSON request or pass a valid mode (like"all") when no L4 proxies are defined.Terraform CLI and Provider Versions
Affected Resource(s)
tencentcloud_teo_origin_aclTerraform Configuration Files
Debug Output
Expected Behavior
A successful API call configuring only the Layer 7 hosts. The provider should recognize that
l4_proxy_idsis empty and either omit"L4EnableMode"from the request entirely, or set it to"all"so that the EdgeOne API validation passes.Actual Behavior
The API rejects the request with a
400 InvalidParameterValueerror because the provider defaulted to"L4EnableMode": "specific"without providing the required L4 proxy IDs.i.e.
Steps to Reproduce
tencentcloud_teo_origin_aclresource.l7_hosts.l4_proxy_idsor explicitly set it to[].terraform apply.