@@ -342,6 +342,57 @@ func TestToUpdatePayload(t *testing.T) {
342342 },
343343 true ,
344344 },
345+ {
346+ "plugins empty slice" ,
347+ & Model {
348+ PlanId : types .StringValue ("plan" ),
349+ Parameters : types .ObjectValueMust (parametersTypes , map [string ]attr.Value {
350+ "sgw_acl" : types .StringValue ("acl" ),
351+ "enable_monitoring" : types .BoolValue (true ),
352+ "graphite" : types .StringValue ("graphite" ),
353+ "java_garbage_collector" : types .StringValue (string (legacyOpensearch .INSTANCEPARAMETERSJAVA_GARBAGE_COLLECTOR_USE_G1_GC )),
354+ "java_heapspace" : types .Int32Value (10 ),
355+ "java_maxmetaspace" : types .Int32Value (10 ),
356+ "max_disk_threshold" : types .Int32Value (10 ),
357+ "metrics_frequency" : types .Int32Value (10 ),
358+ "metrics_prefix" : types .StringValue ("prefix" ),
359+ "monitoring_instance_id" : types .StringValue ("mid" ),
360+ "plugins" : types .ListValueMust (types .StringType , []attr.Value {}),
361+ "syslog" : types .ListValueMust (types .StringType , []attr.Value {
362+ types .StringValue ("syslog" ),
363+ types .StringValue ("syslog2" ),
364+ }),
365+ "tls_ciphers" : types .ListValueMust (types .StringType , []attr.Value {
366+ types .StringValue ("cipher" ),
367+ types .StringValue ("cipher2" ),
368+ }),
369+ "tls_protocols" : types .ListValueMust (types .StringType , []attr.Value {
370+ types .StringValue ("TLSv1.2" ),
371+ types .StringValue ("TLSv1.3" ),
372+ }),
373+ }),
374+ },
375+ & opensearch.PartialUpdateInstancePayload {
376+ Parameters : & opensearch.InstanceParameters {
377+ SgwAcl : new ("acl "),
378+ EnableMonitoring : new (true ),
379+ Graphite : new ("graphite "),
380+ JavaGarbageCollector : new (string (legacyOpensearch.INSTANCEPARAMETERSJAVA_GARBAGE_COLLECTOR_USE_G1_GC )),
381+ JavaHeapspace : new (int32 (10 )),
382+ JavaMaxmetaspace : new (int32 (10 )),
383+ MaxDiskThreshold : new (int32 (10 )),
384+ MetricsFrequency : new (int32 (10 )),
385+ MetricsPrefix : new ("prefix "),
386+ MonitoringInstanceId : new ("mid "),
387+ Plugins : []string {},
388+ Syslog : []string {"syslog" , "syslog2" },
389+ TlsCiphers : []string {"cipher" , "cipher2" },
390+ TlsProtocols : []string {"TLSv1.2" , "TLSv1.3" },
391+ },
392+ PlanId : new ("plan "),
393+ },
394+ true ,
395+ },
345396 }
346397 for _ , tt := range tests {
347398 t .Run (tt .description , func (t * testing.T ) {
0 commit comments