In this chapter, we learned how to efficiently manage infrastructure using Terraform templates. First, we learned about how Terraform can be used to provision an EC2 instance in just a few lines. We then looked at how to create Terraform templates using Terraform provisioners to deploy lightweight applications. We then extended the Terraform templates with Ansible, which allowed us to orchestrate the different steps to deploy our web application. Finally, we looked at how Terraform can be integrated with Ansible in a pull-based approach, which usually makes more sense when managing sizable infrastructures, as we observed in Chapter 3, Treating Your Infrastructure as Code.
We now have a good production environment ready to host any application. We have seen how to architect it using CloudFormation, Ansible, and Terraform. In Chapter 5, Adding Continuous Integration and...