fix: zero-value fallback — integer→0, boolean→false; modify uses WithDefaults
This commit is contained in:
@@ -332,6 +332,12 @@ func normalizeUniversalValueV6(val string, param universalCfsParam) string {
|
||||
if strings.Contains(dataType, "map") || strings.Contains(dataType, "json") || strings.Contains(nameHint, "map") || strings.Contains(nameHint, "json") {
|
||||
return "{}"
|
||||
}
|
||||
if strings.Contains(dataType, "integer") || strings.Contains(dataType, "int") {
|
||||
return "0"
|
||||
}
|
||||
if strings.Contains(dataType, "boolean") || strings.Contains(dataType, "bool") {
|
||||
return "false"
|
||||
}
|
||||
|
||||
return trimmed
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ func UpdateResourceWithTimeout(ctx context.Context, client *core.UniversalClient
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return client.RunInstanceOperationUniversal(ctxWithTimeout, instanceID, "modify", params)
|
||||
return client.RunInstanceOperationUniversalWithDefaults(ctxWithTimeout, instanceID, "modify", params)
|
||||
}
|
||||
|
||||
// DeleteResource runs destroy behavior (suspend/state-only) for instance resources.
|
||||
|
||||
Reference in New Issue
Block a user