terraform: guard output types. Fixes #593