Managing a large number of virtual machines can be challenging. As our infrastructure grew, we needed a better way to handle the complexity. That’s when we turned to Terraform to help us manage our VMware environment more efficiently. the gist from the article:
Lessons learned
1. Use remote state
2. It's tricky to catch more than 10 changes at one time
3. With great power comes great responsibility
4. Bulk changes can lead to performance degradation
5. Avoid configuration drift between VMware & terraform
6. Instead of recreating VM you can simply move it
7. Use
prevent_destroy to avoid VMs deletion8. Use simple & obvious structure to make entrance level lower
9. Use to ansible dynamic inventory based on tags
10. It's possible to add the missing functionality
Benefits
1. It's really easy to perform bulk updates
2. Re-create infra from nothing
3. Trackable changes
4. Single source of the truth
Want to try
1. Terraform pull request automation via Atlantis
2. Build green button in jenkins
3. Windows automation
4. Cloud-init for setting hostname like here (sry it's in RU)
5. Tests for terraform like for ansible
#article