Commit 3933cc32 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

Merge pull request #2208 from mitchellh/b-do-user

builder/digitalocean: user data support [GH-2113]
parents 97fd7802 5cfd26a0
......@@ -26,6 +26,7 @@ type Config struct {
PrivateNetworking bool `mapstructure:"private_networking"`
SnapshotName string `mapstructure:"snapshot_name"`
DropletName string `mapstructure:"droplet_name"`
UserData string `mapstructure:"user_data"`
SSHUsername string `mapstructure:"ssh_username"`
SSHPort uint `mapstructure:"ssh_port"`
......
......@@ -31,6 +31,7 @@ func (s *stepCreateDroplet) Run(state multistep.StateBag) multistep.StepAction {
godo.DropletCreateSSHKey{ID: int(sshKeyId)},
},
PrivateNetworking: c.PrivateNetworking,
UserData: c.UserData,
})
if err != nil {
err := fmt.Errorf("Error creating droplet: %s", err)
......
......@@ -67,6 +67,8 @@ each category, the available configuration keys are alphabetized.
for a droplet to enter a desired state (such as "active") before
timing out. The default state timeout is "6m".
* `user_data` (string) - User data to launch with the Droplet.
## Basic Example
Here is a basic example. It is completely valid as soon as you enter your
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment