@@ -288,6 +288,33 @@ func TestMorphValueToType(t *testing.T) {
288288 "three" : tftypes .NewValue (tftypes .String , "baz" ),
289289 }),
290290 },
291+ "object->object" : {
292+ In : sampleInType {
293+ V : tftypes .NewValue (tftypes.Object {AttributeTypes : map [string ]tftypes.Type {
294+ "one" : tftypes .String ,
295+ "two" : tftypes .String ,
296+ "three" : tftypes .String ,
297+ }}, map [string ]tftypes.Value {
298+ "one" : tftypes .NewValue (tftypes .String , "foo" ),
299+ "two" : tftypes .NewValue (tftypes .String , "bar" ),
300+ "three" : tftypes .NewValue (tftypes .String , "baz" ),
301+ }),
302+ T : tftypes.Object {AttributeTypes : map [string ]tftypes.Type {
303+ "one" : tftypes .String ,
304+ "two" : tftypes .String ,
305+ "three" : tftypes .String ,
306+ }},
307+ },
308+ Out : tftypes .NewValue (tftypes.Object {AttributeTypes : map [string ]tftypes.Type {
309+ "one" : tftypes .String ,
310+ "two" : tftypes .String ,
311+ "three" : tftypes .String ,
312+ }}, map [string ]tftypes.Value {
313+ "one" : tftypes .NewValue (tftypes .String , "foo" ),
314+ "two" : tftypes .NewValue (tftypes .String , "bar" ),
315+ "three" : tftypes .NewValue (tftypes .String , "baz" ),
316+ }),
317+ },
291318
292319 // Testcases to demonstrate https://github.com/hashicorp/terraform-provider-kubernetes-alpha/issues/190
293320 "string(unknown value)->string" : {
0 commit comments