How Do You Use Terraform with VMware vSphere?

0
13
Asked By TechieTurtle42 On

I'm curious about how people are integrating Terraform with VMware vSphere. What's your workflow like? Given that many VMs may remain in place, do you create individual scripts for each server or group multiple servers together in one script and keep it indefinitely, even if you don't plan on re-running it?

5 Answers

Answered By VirtualVoyager On

You typically need Terraform if you’re setting things up anew or for quick disaster recovery. Otherwise, I find it more efficient than doing things manually. It's all about the consistent ability to re-create environments, which is crucial.

Answered By VMWmaster912 On

I usually create a module that handles VM provisioning using variables. Then, I call this module with a `for_each` loop to pass parameters for each VM. If it's a one-off deployment, I just toss the state afterwards. But keep in mind that if you're using Terraform primarily for initial provisioning and not for ongoing management, it kinda misses the point of using Terraform in the first place.

Answered By JenkinsJuggler88 On

Initially, I wrote PowerShell scripts to create a few Windows and Linux machines for my needs. Later, I wanted to elevate my process by using Jenkins to get environment info, followed by using Terraform for provisioning and Ansible for installing and configuring the software. However, I felt overwhelmed when I realized I’d need a way to create an inventory for Terraform, so I ended up sticking with Ansible.

Answered By PowerShellPal99 On

I must admit, I've never tried Terraform because I've always relied on PowerCLI. But with everything changing these days, I think it’s about time I learned it. Does anyone have any good tutorials or resources for using Terraform with vSphere?

Answered By CattleOverPets On

This really comes down to the cattle vs. pets analogy. VMs like domain controllers are the pets you care for long-term, while web servers are your cattle—setup quickly and replaced easily. Terraform is ideal for managing those cattle-like servers where rapid, consistent deployments are needed.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.