August 2019
Beginner
608 pages
16h 7m
English
This is the main file of the GitLab module. It's quite big, but we kept it this way to focus on the overall architecture. With Terraform, we could refactor this into a well-formed module structure, but we'll keep it simple for this demonstration.
At the top of the file, we define the region so that we can use this variable in other modules:
provider "aws" { region = "${var.region}"}
The next module that we call is the keypair module, which will provider SSH key pairs to the instances. As you can see, the only arguments are the location of the module file and the region:
module "keypair" { source = "../keypair" region = "${var.region}"}
Then, we define the actual EC2 instances. We use ...
Read now
Unlock full access