-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
294 additions
and
14 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
page_title: "Provider: Vagrant" | ||
description: |- | ||
Integrate vagrant into terraform. | ||
--- | ||
|
||
# Vagrant Provider | ||
A Vagrant provider for terraform. | ||
|
||
A note about lippertmarkus/vagrant in the registry: when I originally wrote | ||
this provider, the terraform registry didn't exist. My terraform needs waned | ||
and I didn't hear about the registry until some time later. lippertmarkus | ||
forked my provider and published to the registry as a convenience. Thanks! But, | ||
it's just an older version of this exact same codebase. So, I recommend you use | ||
bmatcuk/vagrant to get the latest updates instead. | ||
|
||
## Installation | ||
Add bmatcuk/vagrant to [required_providers](https://www.terraform.io/docs/language/providers/requirements.html#requiring-providers): | ||
|
||
```terraform | ||
terraform { | ||
required_providers { | ||
vagrant = { | ||
source = "bmatcuk/vagrant" | ||
version = "~> 3.0.0" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
provider "vagrant" { | ||
# no config | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
## Debugging | ||
If terrafrom is failing on the vagrant step, you can get additional output by | ||
running terraform with logging output enabled. Try something like: | ||
|
||
```bash | ||
env TF_LOG=TRACE terraform apply ... | ||
``` | ||
|
||
And, of course, you can always run vagrant on your Vagrantfile directly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
page_title: "vagrant_vm Resource - terraform-provider-vagrant" | ||
description: |- | ||
Integrate vagrant into terraform. | ||
--- | ||
|
||
# vagrant_vm (Resource) | ||
|
||
## Forcing an Update | ||
The easiest way to force an update is to set, or change the value of, some | ||
environment variable. This will signal to terraform that the vagrant_vm | ||
resource needs to update. | ||
|
||
In the example below, a environment variable, `VAGRANTFILE_HASH`, is set to | ||
the md5 hash of the Vagrantfile. When the file changes, the hash will change, | ||
and terraform will ask for an update. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "vagrant_vm" "my_vagrant_vm" { | ||
env = { | ||
# force terraform to re-run vagrant if the Vagrantfile changes | ||
VAGRANTFILE_HASH = "${md5(file("path/to/Vagrantfile"))}", | ||
} | ||
# see schema for additional options | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
- **env** (Map of String) Environment variables to pass to the Vagrantfile. | ||
- **id** (String) The ID of this resource. | ||
- **vagrantfile_dir** (String) Path to the directory where the Vagrantfile can be found. Defaults to the current directory. | ||
|
||
### Read-Only | ||
|
||
- **machine_names** (List of String) Names of the vagrant machines from the Vagrantfile. Names are in the same order as ssh_config. | ||
- **ssh_config** (List of Object) SSH connection information. (see [below for nested schema](#nestedatt--ssh_config)) | ||
|
||
<a id="nestedatt--ssh_config"></a> | ||
### Nested Schema for `ssh_config` | ||
|
||
Read-Only: | ||
|
||
- **agent** (String) | ||
- **host** (String) | ||
- **port** (String) | ||
- **private_key** (String) | ||
- **type** (String) | ||
- **user** (String) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
provider "vagrant" { | ||
# no config | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
resource "vagrant_vm" "my_vagrant_vm" { | ||
env = { | ||
# force terraform to re-run vagrant if the Vagrantfile changes | ||
VAGRANTFILE_HASH = "${md5(file("path/to/Vagrantfile"))}", | ||
} | ||
# see schema for additional options | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.