Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Fix cli conversion - collection elements could be nonprimitive
Browse files Browse the repository at this point in the history
Signed-off-by: Hasan Turken <turkenh@gmail.com>
  • Loading branch information
turkenh committed Mar 3, 2022
1 parent 3d439f6 commit b54efc2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/types/conversion/tfjson/tfjson.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ func schemaV2TypeFromCtyType(typ cty.Type, schema *schemav2.Schema) error { //no
case et.IsPrimitiveType():
elemType = &schemav2.Schema{Type: primitiveToV2SchemaType(et)}
case et.IsCollectionType():
elemType = collectionToV2SchemaType(et)
elemType = &schemav2.Schema{Type: collectionToV2SchemaType(et)}
if err := schemaV2TypeFromCtyType(et, elemType.(*schemav2.Schema)); err != nil {
return err
}
case et.IsObjectType():
res := &schemav2.Resource{}
res.Schema = make(map[string]*schemav2.Schema, len(et.AttributeTypes()))
Expand Down

0 comments on commit b54efc2

Please sign in to comment.