Skip to content

Add integration with Vagrant #1263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jdpleiness opened this issue Mar 16, 2023 · 1 comment
Open

Add integration with Vagrant #1263

jdpleiness opened this issue Mar 16, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@jdpleiness
Copy link

Add new integration with Vagrant via modules folder. Some systems programming workflows cannot rely on Docker for local iteration. Having Vagrant supported as a first class package in terratest would help streamline these kinds of workflows.

Examples such as:

  • vagrant up
  • vagrant halt
  • vagrant ssh
  • vagrant down
  • Works with packer module in similar fashion to docker module

Example workflow:

package test

import (
	"testing"

	"github.com/gruntwork-io/terratest/modules/vagrant"
	"github.com/gruntwork-io/terratest/modules/packer"
	"github.com/stretchr/testify/assert"
)

func TestPackerHelloWorldExample(t *testing.T) {
	packerOptions := &packer.Options{
		Template: "../examples/packer-hello-world-example/build.pkr.hcl",
	}

	packer.BuildArtifact(t, packerOptions) // Build the Packer template which will create a Vagrant box

	output := vagrant.up(t, "gruntwork/packer-hello-world-example", opts) // Run Vagrant box
}
@denis256 denis256 added the enhancement New feature or request label Mar 16, 2023
@oxr463
Copy link

oxr463 commented Apr 14, 2023

Might also need modules for VirtualBox or KVM depending on the Vagrant box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants