As per https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc?permalink_comment_id=4801699#gistcomment-4801699