Prepare IaC
In accordance with our Infrastructure as Code principles, this deployment will also be mostly template driven. We will try to reuse some of the Terraform and Salt code from previous chapters.
Terraform templates
For this particular setup we can simplify our template as we will only need the VPC, some networking bits, and an EC2 instance.
Let's browse through the files in our TF repository:
Variables
The few variables we need can be grouped into VPC and EC2 related ones:
VPC
variable "aws-region" { type = "string" description = "AWS region" } variable "vpc-cidr" { type = "string" description = "VPC CIDR" } variable "vpc-name" { type = "string" description = "VPC name" } variable "aws-availability-zones" { type = "...