Skip to content

Commit

Permalink
resource/alicloud_dcdn_domain_config: Fixed the diff error caused by …
Browse files Browse the repository at this point in the history
…field function_args
  • Loading branch information
MrWolong committed Jan 20, 2025
1 parent 0bcd1c3 commit 070e9a5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion alicloud/resource_alicloud_dcdn_domain_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@ func resourceAliCloudDcdnDomainConfigRead(d *schema.ResourceData, meta interface
d.Set("status", object["Status"])
d.Set("parent_id", object["ParentId"])

ignoreFunctionArg := []string{"dsl", "disable_l2_log", "dynamic_batch_route", "dynamic_enable_cpool_chash",
"dynamic_mux_ecn_enable", "dynamic_mux_keepalive_enable", "dynamic_mux_share_enable", "dynamic_pk",
"dynamic_retry_status", "dynamic_route_cdn_v2", "dynamic_route_cpool", "dynamic_route_magic",
"dynamic_route_round_robin", "dynamic_route_session", "dynamic_route_tunnel", "dynamie_route_alllink_log",
"keepalive_sni", "l7tol4", "partition_back_to_origin", "dynamic_route_adapt_cache",
"dynamic_route_http_methods", "dynamic_mux_tls_enable", "dynamic_route_cdn_v2"}

if functionArgs, ok := object["FunctionArgs"]; ok {
if functionArgList, ok := functionArgs.(map[string]interface{})["FunctionArg"]; ok {
functionArgMaps := make([]map[string]interface{}, 0)
Expand All @@ -179,7 +186,7 @@ func resourceAliCloudDcdnDomainConfigRead(d *schema.ResourceData, meta interface
functionArgMap := map[string]interface{}{}

// This function args is extra, filter them to pass test check.
if fmt.Sprint(functionArgItem["ArgName"]) == "dsl" {
if InArray(fmt.Sprint(functionArgItem["ArgName"]), ignoreFunctionArg) {
continue
}

Expand Down

0 comments on commit 070e9a5

Please sign in to comment.