Summary
In this chapter, we talked about how IaC can help us automatically prepare, configure, and manage our penetration testing lab environments in the cloud. We then used Terraform, one of the most powerful and most used IaC tools available, to create, modify, and delete cloud infrastructure resources. After setting up Terraform in our environment, we then proceeded with several hands-on examples to demonstrate the different capabilities of the tool. In addition to this, we rebuilt the vulnerable lab environment we prepared in Chapter 2 using Terraform (this time, automatically). Finally, we had a quick look at how to configure a Terraform backend with state locking to help prevent conflicts when multiple engineers are using Terraform to modify infrastructure resources.
In the next chapter, we’ll dive deep into the different strategies for isolating accounts and environments in the cloud. The information, along with the hands-on solutions in the next chapter, will help...