August 2019
Beginner
608 pages
16h 7m
English
This module is responsible for creating a public/private keypair that is used to connect to the instances with SSH. It was available in the previous chapters, but it was in the root module. Now, it is a standalone module that's called from the GitLab module with certain arguments:
provider "aws" { region = "${var.region}"}resource "tls_private_key" "mykey"{ algorithm = "RSA" rsa_bits = 4096}resource "aws_key_pair" "keypair"{ public_key = "${tls_private_key.mykey.public_key_openssh}"}
At the top of the preceding code, you can see the region that's been defined. This is an argument on the top level that's passed through to the child module.
Read now
Unlock full access