From the course: AWS Global Networking in Terraform

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Demo: Deploy EC2 test instances

Demo: Deploy EC2 test instances

- Before we deploy any of the connectivity for making sure our VPCs can communicate with each other, we're going to go ahead and push out the infrastructure that we're going to use to test, specifically the EC2 instances. Now the code for these can be found under global, prod, EC2. And then we have several files that we're going to take a look at here. The first one that I want to show you is kind of a special object that contains all of our data objects that we're going to use to generate the latest and greatest Amazon Linux 2 AMIs. And we're going to do this on a per region basis. And let's take a look at one of the blocks of code here. We have data. It's an AWS AMI object, and then I have called it "amazonlinux2 US east 1" and then we have one for US west 2 and AP east 1. Each of these are going to be associated with a specific region. And essentially, what this data object does, you can see we've got some filters in here for name, virtualization type, owners. It's going to issue…

Contents