Thank you for sharing the actual configuration that applies to your error.
Though it’s mostly clear in this particular case, please bear in mind Welcome to the forum - please reformat your message in future.
Though this may seem obvious, the behaviour you describe would be easily explained if var.bastion_ip
was accidentally set to an empty string.
Therefore, please double check it really is set to a real value.