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

Commit

Permalink
Assume string type for unset Set/List/Map element types
Browse files Browse the repository at this point in the history
- Fixes #177

Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
  • Loading branch information
ulucinar committed Dec 20, 2021
1 parent 3306e6e commit 86e9c1c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/types/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ func (g *Builder) buildSchema(sch *schema.Schema, cfg *config.Resource, tfPath [
}
elemType = paramType
}
// if unset
case types.Nil:
elemType = types.Universe.Lookup("string").Type()
default:
return nil, errors.Errorf("element type of %s should be either schema.Resource or schema.Schema", fieldPath(names))
}
Expand Down

0 comments on commit 86e9c1c

Please sign in to comment.