From 5509d0734b103cab006af3472fc627d60a5c27c4 Mon Sep 17 00:00:00 2001 From: Lawrence Date: Wed, 1 Nov 2017 14:43:08 -0400 Subject: [PATCH] Added ipv6 option for digitalocean builder the ipv6 option is already part of the godo package Updated documentation to reflect new feature Closes: https://github.com/hashicorp/packer/issues/5533 --- builder/digitalocean/config.go | 1 + builder/digitalocean/step_create_droplet.go | 1 + website/source/docs/builders/digitalocean.html.md | 3 +++ 3 files changed, 5 insertions(+) diff --git a/builder/digitalocean/config.go b/builder/digitalocean/config.go index 9d89910dc..6e58bc759 100644 --- a/builder/digitalocean/config.go +++ b/builder/digitalocean/config.go @@ -28,6 +28,7 @@ type Config struct { PrivateNetworking bool `mapstructure:"private_networking"` Monitoring bool `mapstructure:"monitoring"` + IPv6 bool `mapstructure:"ipv6"` SnapshotName string `mapstructure:"snapshot_name"` SnapshotRegions []string `mapstructure:"snapshot_regions"` StateTimeout time.Duration `mapstructure:"state_timeout"` diff --git a/builder/digitalocean/step_create_droplet.go b/builder/digitalocean/step_create_droplet.go index 9789e7b99..ed2c7390d 100644 --- a/builder/digitalocean/step_create_droplet.go +++ b/builder/digitalocean/step_create_droplet.go @@ -47,6 +47,7 @@ func (s *stepCreateDroplet) Run(state multistep.StateBag) multistep.StepAction { }, PrivateNetworking: c.PrivateNetworking, Monitoring: c.Monitoring, + IPv6: c.IPv6, UserData: userData, }) if err != nil { diff --git a/website/source/docs/builders/digitalocean.html.md b/website/source/docs/builders/digitalocean.html.md index 7af506319..595c1a62f 100644 --- a/website/source/docs/builders/digitalocean.html.md +++ b/website/source/docs/builders/digitalocean.html.md @@ -69,6 +69,9 @@ builder. - `monitoring` (boolean) - Set to `true` to enable monitoring for the droplet being created. This defaults to `false`, or not enabled. +- `ipv6` (boolean) - Set to `true` to enable ipv6 + for the droplet being created. This defaults to `false`, or not enabled. + - `snapshot_name` (string) - The name of the resulting snapshot that will appear in your account. This must be unique. To help make this unique, use a function like `timestamp` (see [configuration