I had the same issue, the fix was simple for me. It seems like the file was not in UTF-8 so terraform was somehow misinterpreting it. For me saving it in UTF-8 worked.