From the course: Essential Terraform in AWS

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Learning objectives

Learning objectives

- We're back with another lesson, and this time we're finally going to build our first AWS infrastructure. Here's what we'll do. We will view the provided step-by-step instructions, create our first main.tf file. That's our first Terraform file. We'll format our Terraform code using the Terraform fmt command. Then we'll initialize our working directory so that it can accept our provider plugin. We do that with the Terraform init command. Afterwards, we'll validate the code and check the syntax. Do that with the Terraform validate command. After that, we'll view the Terraform plan, sort of a dry run for our Terraform infrastructure. It doesn't actually build anything, but it shows you what it will do if it was to build the infrastructure. And we showed that with the Terraform plan command. Finally, we'll apply the infrastructure to AWS, and as you can guess, the command is Terraform apply. Then we'll analyze the state file that was created automatically by Terraform, which tells you…

Contents