Terraform vs Vagrant: What are the differences?
Terraform: Describe your complete infrastructure as code and build resources across providers. With Terraform, you describe your complete infrastructure as code, even as it spans multiple service providers. Your servers may come from AWS, your DNS may come from CloudFlare, and your database may come from Heroku. Terraform will build all these resources across all these providers in parallel; Vagrant: A tool for building and distributing development environments. Vagrant provides the framework and configuration format to create and manage complete portable development environments. These development environments can live on your computer or in the cloud, and are portable between Windows, Mac OS X, and Linux.
Terraform can be classified as a tool in the "Infrastructure Build Tools" category, while Vagrant is grouped under "Virtual Machine Management".
Some of the features offered by Terraform are:
- Infrastructure as Code: Infrastructure is described using a high-level configuration syntax. This allows a blueprint of your datacenter to be versioned and treated as you would any other code. Additionally, infrastructure can be shared and re-used.
- Execution Plans: Terraform has a "planning" step where it generates an execution plan. The execution plan shows what Terraform will do when you call apply. This lets you avoid any surprises when Terraform manipulates infrastructure.
- Resource Graph: Terraform builds a graph of all your resources, and parallelizes the creation and modification of any non-dependent resources. Because of this, Terraform builds infrastructure as efficiently as possible, and operators get insight into dependencies in their infrastructure.
On the other hand, Vagrant provides the following key features:
- Up And SSH
- Synced Folders
"Infrastructure as code" is the top reason why over 80 developers like Terraform, while over 354 developers mention "Development environments" as the leading cause for choosing Vagrant.
Terraform and Vagrant are both open source tools. Vagrant with 18.6K GitHub stars and 3.74K forks on GitHub appears to be more popular than Terraform with 17.4K GitHub stars and 4.77K GitHub forks.
According to the StackShare community, Vagrant has a broader approval, being mentioned in 802 company stacks & 475 developers stacks; compared to Terraform, which is listed in 490 company stacks and 298 developer stacks.
Sign up to add or upvote prosMake informed product decisions
Sign up to add or upvote consMake informed product decisions
What is Terraform?
What is Vagrant?
Need advice about which tool to choose?Ask the StackShare community!
Sign up to get full access to all the companiesMake informed product decisions
Sign up to get full access to all the tool integrationsMake informed product decisions