The directory in the repository (https://github.com/PacktPublishing/Mastering-GitLab-12/tree/master/Chapter20) contains a script to connect to the instances that you first create with Terraform.
The connect_ssh.sh script is changed for the situation in this chapter, so you can connect to the new instances after they are created. You can execute the script with show_host_codes to check which hosts you can connect to:
$scripts/connect_ssh.sh show_host_codes
hostcode: pg0 -- hostname: "ip-10-0-2-195.eu-central-1.compute.internal"
hostcode: gitaly0 -- hostname: "ip-10-0-11-29.eu-central-1.compute.internal"
hostcode: middleware1 -- hostname: "ip-10-0-11-160.eu-central-1.compute.internal"
hostcode: middleware0 -- hostname: "ip-10-0-12-252.eu-central-1.compute.internal"
hostcode: frontend1 -- hostname: "ip-10-0-11-76.eu...