terraform: Handle module depedency inversion