Skip to content

Review

Let's review what we've done here today with Terraform.

State

Firstly we defined how the state file will be managed and decided on storing it remotely in GitLab Terraform.

Initialisation

Then we initialised the Terraform code (terraform init) base so that Terraform can download everything it needs, like the AWS provider.

Planning

Next we used a Terraform plan (terraform plan) to compute what it was Terraform needed to do to make our AWS infrastructure match what we stated we wanted in our code. At this point in the book we're going to need it to build out everything.

This plan was stored in a file - latest.plan - and is used by the next step.

Apply

Finally we use the latest.plan and build the infrastructure we've defined in our code.

Next Steps

Warning

If you're not planning on going straight into the next section, then please consider removing your infrastructure to save money: terraform destroy. It's not a critical application and thanks to the nature of Cloud computing you can build it all again very simply by just repeating the instructions in this book.

Now we're going to move onto the Application code base. We're going to compile the application, package it together with some static resources and get it ready for consumption by Ansible (which will deploy it to the infrastructure we've defined in this section.)


Last update: August 25, 2021