Terraform – reviewing the code and deploying our infrastructure
As we did a deep dive into Terraform in Chapter 4, Deploying to Microsoft Azure, we aren’t going to dig too deep into the code here, and instead will just highlight any considerations we need to make when targeting AWS or if there is a function we didn’t use when deploying our workload to Microsoft Azure.
Walk-through of Terraform files
What follows is a walk-through of each of the Terraform files. Just as we did for Microsoft Azure, I have grouped each logical group of resources in its own .
tf
file.
Setup
This is not too dissimilar to the one we defined for Azure. There are a few obvious differences – the biggest of which is that we are using the AWS provider:
aws = { source = "hashicorp/aws" version = "~> 4.0" }
Also, we...