Part 3 Mastering Terraform

Mastering anything is difficult and circuitous, and Terraform is no exception. Until now, the overall narrative has been fairly linear. We started with the basics of Terraform, moved on to design patterns and principles, and rounded out the discussion with a few real-world scenarios. Progressing further, however, first requires us to take a step back and ask bigger questions: How does Terraform fit into the overall technology landscape? How do you manage, automate, and integrate Terraform with other continuous deployment technologies? All this, and more, is the subject of part 3.

Chapter 9 is all about zero-downtime deployments. We examine two methods for performing Blue/Green deployments with Terraform before finally asking, “Is Terraform the right tool for the job?” As it turns out, Terraform and Ansible might be better together.

Chapter 10 explores case studies in testing and refactoring Terraform configuration. Everyone has to deal with refactoring at some point, but it’s tricky with Terraform because you have to deal with migrating state. Automated testing helps to some extent since it gives you greater confidence that functionality is preserved and nothing has broken.

Chapter 11 is when we finally extend Terraform by writing a custom provider. Writing custom providers is fun because it allows you the greatest control over how Terraform behaves. We write a bare-bones provider for a Petstore API and use Terraform to deploy a managed pet resource to it.

Chapter 12 considers the problem of running Terraform in automation. Terraform Cloud and Terraform Enterprise are proprietary solutions that address this problem, but they may not fit your requirements. We walk through what it takes to build your own CI/CD pipeline for running Terraform in automation and discuss potential improvements.

Chapter 13 is about security and secrets management in Terraform. Topics covered include how to secure state and log files, how to manage static and dynamic secrets, and how to enforce policy as code with Sentinel. There are many ways Terraform can leak secrets, and it’s important to know what they are so you can protect against them.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
35.175.236.44