If we want to automate the installation of the GitLab Geo-enabled instances, we have to change our Terraform setup a bit. Because we want to use two different regions, we are going to use Terraform modules. In the previous chapters, we only used the context of the root module, but now we are going to expand on the module concept.
The Terraform AWS provider always operates in a certain region's context, and we can use these modules to create a GitLab instance template that will be installed as service modules for site A and site B.
The example project has the following file structure:
.
├── connect.sh
├── deploy
│ ├── configure_replication.yml
│ ├── files
│ │ └── Gitlab.gitlab-license
│ ├─...