builder/digitalocean: user data support [GH-2113]
This commit is contained in:
parent
c9c9e2871c
commit
5cfd26a0d3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue