@@ -175,6 +175,32 @@ func TestMorphValueToType(t *testing.T) {
175175 tftypes .NewValue (tftypes .String , "baz" ),
176176 }),
177177 },
178+ "tuple(object)->list(object)" : {
179+ In : sampleInType {
180+ V : tftypes .NewValue (tftypes.Tuple {ElementTypes : []tftypes.Type {
181+ tftypes.Object {AttributeTypes : map [string ]tftypes.Type {"foo" : tftypes .String }},
182+ tftypes.Object {AttributeTypes : map [string ]tftypes.Type {"foo" : tftypes .DynamicPseudoType }},
183+ tftypes.Object {AttributeTypes : map [string ]tftypes.Type {"foo" : tftypes .String }},
184+ }},
185+ []tftypes.Value {
186+ tftypes .NewValue (tftypes.Object {AttributeTypes : map [string ]tftypes.Type {"foo" : tftypes .String }},
187+ map [string ]tftypes.Value {"foo" : tftypes .NewValue (tftypes .String , "foo" )}),
188+ tftypes .NewValue (tftypes.Object {AttributeTypes : map [string ]tftypes.Type {"foo" : tftypes .DynamicPseudoType }},
189+ map [string ]tftypes.Value {"foo" : tftypes .NewValue (tftypes .DynamicPseudoType , nil )}),
190+ tftypes .NewValue (tftypes.Object {AttributeTypes : map [string ]tftypes.Type {"foo" : tftypes .String }},
191+ map [string ]tftypes.Value {"foo" : tftypes .NewValue (tftypes .String , "baz" )}),
192+ }),
193+ T : tftypes.List {ElementType : tftypes.Object {AttributeTypes : map [string ]tftypes.Type {"foo" : tftypes .String }}},
194+ },
195+ Out : tftypes .NewValue (tftypes.List {ElementType : tftypes.Object {AttributeTypes : map [string ]tftypes.Type {"foo" : tftypes .String }}}, []tftypes.Value {
196+ tftypes .NewValue (tftypes.Object {AttributeTypes : map [string ]tftypes.Type {"foo" : tftypes .String }},
197+ map [string ]tftypes.Value {"foo" : tftypes .NewValue (tftypes .String , "foo" )}),
198+ tftypes .NewValue (tftypes.Object {AttributeTypes : map [string ]tftypes.Type {"foo" : tftypes .String }},
199+ map [string ]tftypes.Value {"foo" : tftypes .NewValue (tftypes .String , nil )}),
200+ tftypes .NewValue (tftypes.Object {AttributeTypes : map [string ]tftypes.Type {"foo" : tftypes .String }},
201+ map [string ]tftypes.Value {"foo" : tftypes .NewValue (tftypes .String , "baz" )}),
202+ }),
203+ },
178204 "set->tuple" : {
179205 In : sampleInType {
180206 V : tftypes .NewValue (tftypes.Set {ElementType : tftypes .String }, []tftypes.Value {
0 commit comments