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 Jan 3, 2022
1 parent 2c54e84 commit 8e9e681
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/types/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ func (g *Builder) buildSchema(sch *schema.Schema, cfg *config.Resource, tfPath [
}
elemType = paramType
}
// if unset
// see: https://github.com/crossplane/terrajet/issues/177
case 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 8e9e681

Please sign in to comment.