We plan to automate the creation and removal of virtual machines in our DC servers that support our cloud service. The service is such that each new client receives dedicated virtual machines (at least 3), so the number of virtual machines continues to grow. We already have about 2,000 virtual machines running on ESXi. So, we have two problems that need to be solved before taking the terraform -
How can we migrate existing virtual machines that Terraform manages (or should we do at all)? Generating a resource specification can be scripted, but checking the plan to ensure that nothing is affected will be a problem - given the size of the virtual machines and the fact that they all LIVE put extra pressure on the engineers.
As the number of virtual machines increases, the number of .tf files will increase on disk. We could combine several virtual machines into one file, but that would make deleting individual virtual machines programmatically a little more difficult. Separating files into multiple directories is just a workaround I can think of, but ... Is there a better way to handle scale with terraforms?
I could not find any blogs that discuss these issues, so look for some practical tips here.
source
share