HashiCorp Vagrant 2.0.2.
We are pleased to announce the release of HashiCorp Vagrant 2.0.2. Vagrant is a tool for building and distributing development environments. The highlight of this release is an updated implementation of SMB synced folders with added host support for macOS.
Notable new features included within this release:
- Updated SMB synced folder implementation
- Sensitive value handling in Vagrant output
- Customized Vagrantfile templates
» SMB synced folders
Vagrant 2.0.2 includes an updated implementation of SMB synced folders. For users with Windows hosts this updated implementation includes:
- Automatic host removal of SMB shares on destroy
- Credential validation during share setup
- Prevention of credentials display within Vagrant output
- Removal of administrator privileged console requirement
- Support for mount option overrides within guests
For users with macOS hosts, this release introduces SMB synced folder support.
» Sensitive values and Vagrant output
A new feature within the Vagrant 2.0.2 release is the ability to scrub sensitive values from Vagrant's output. This is especially useful when environment variables used within provisioners may contain passwords or API keys. Once values have been registered as sensitive, Vagrant will mask the value in normal output as well as the logger output. This feature can be enabled on shell provisioners by setting the sensitive
option:
Vagrant.configure("2") do |config|
...
config.vm.provision :shell,
path: "./scripts/provision.sh",
sensitive: true,
env: {
"SERVICE_USERNAME" => ENV["SERVICE_USERNAME"],
"SERVICE_PASSWORD" => ENV["SERVICE_PASSWORD"]
}
end
Sensitive values can also be manually configured within the Vagrantfile directly. This allows registering arbitrary values as sensitive to prevent Vagrant from displaying them within the output:
Vagrant.configure("2") do |config|
config.vagrant.sensitive = [
"MySecretPassword",
"RemoveServiceApiKey"
]
end
##Customized Vagrant Templates
The Vagrantfile generated by the vagrant init
command can now be customized using the --template
option. Templates are defined in ERB format and are provided the values given to the command by the user. Below is a simple example of a Vagrantfile template:
# ./templates/custom.erb
Vagrantfile.configure("2") do |config|
config.vm.box = "<%= @box_name %>"
<% if !@box_version.to_s.empty? %>
config.vm.box_version = "<%= @box_version %>"
<% end %>
# This is a customized template, just for you!
end
and can be used by running:
vagrant init custom/box-name --template ./templates/custom.erb
» Other improvements
The Vagrant 2.0.2 release includes a number of other improvements and bug fixes. For a detailed list of all the changes in this release, see the CHANGELOG.
Sign up for the latest HashiCorp news
More blog posts like this one

Terraform provider for Google Cloud 7.0 is now GA
Version 7.0 of the HashiCorp Terraform Google Cloud provider adds new ephemeral resources, write-only attributes, and validation logic.

How to enable developer self-service at scale with Terraform and Waypoint
Learn how to simplify Terraform self-service with HCP Waypoint’s features for building golden deployment workflows.

Terraform now supports assigning agent pools at the project level
HCP Terraform and Terraform Enterprise users can now assign default agent pools at the project level, offering a more scalable and secure approach to agent pool configuration.