Terraform and Reverse Engineering
摘要
In the previous chapter, we studied the fundamentals of reverse engineering and its operation. Additionally, we discussed Terraform with you and the difficulties it presents when attempting to use it to automate infrastructure activities. In this chapter, we will cover every step required for using Terraform to accomplish this automation. We will examine each stage of the reverse-engineering process in detail, covering information extraction, modeling, and review. We’ll use an import of a pre-existing VMware virtual machine as an example. We will highlight the sample reverse-engineering model with Terraform and the importance of using a “hook” to fetch the point-in-time state parameters required for successful import of a resource. We will also look at a typical import operation and build the import logic for an automated import.