diff --git a/builder/openstack/step_allocate_ip.go b/builder/openstack/step_allocate_ip.go index f4bc0c42a..9570473fc 100644 --- a/builder/openstack/step_allocate_ip.go +++ b/builder/openstack/step_allocate_ip.go @@ -43,7 +43,12 @@ func (s *StepAllocateIp) Run(_ context.Context, state multistep.StateBag) multis // statebag below, because it is requested by Cleanup() state.Put("access_ip", &instanceIP) - // WRITE NEW COMMENT> + // Try to Use the OpenStack floating IP by checking provided parameters in + // the following order: + // - try to use "FloatingIP" ID directly if it's provided + // - try to find free floating IP in the project if "ReuseIPs" is set + // - create a new floating IP if "FloatingIPNetwork" is provided (it can be + // ID or name of the network). if s.FloatingIP != "" { // Try to use FloatingIP if it was provided by the user. freeFloatingIP, err := CheckFloatingIP(networkClient, s.FloatingIP) diff --git a/website/source/docs/builders/openstack.html.md b/website/source/docs/builders/openstack.html.md index e81eb5ce9..a05ce3d67 100644 --- a/website/source/docs/builders/openstack.html.md +++ b/website/source/docs/builders/openstack.html.md @@ -112,8 +112,8 @@ builder. - `floating_ip` (string) - A specific floating IP to assign to this instance. -- `floating_ip_network` (string) - The ID of an external network that can be - used for creation of a new floating IP. +- `floating_ip_network` (string) - The ID or name of an external network that + can be used for creation of a new floating IP. - `floating_ip_pool` (string) - *Deprecated* use `floating_ip_network` instead.