diff --git a/builtin/providers/openstack/resource_openstack_compute_instance_v2.go b/builtin/providers/openstack/resource_openstack_compute_instance_v2.go index 30c16b973..6088f8721 100644 --- a/builtin/providers/openstack/resource_openstack_compute_instance_v2.go +++ b/builtin/providers/openstack/resource_openstack_compute_instance_v2.go @@ -990,6 +990,15 @@ func getInstanceNetworks(computeClient *gophercloud.ServiceClient, d *schema.Res rawMap := raw.(map[string]interface{}) + // Both a floating IP and a port cannot be specified + if fip, ok := rawMap["floating_ip"].(string); ok { + if port, ok := rawMap["port"].(string); ok { + if fip != "" && port != "" { + return nil, fmt.Errorf("Only one of a floating IP or port may be specified per network.") + } + } + } + allPages, err := tenantnetworks.List(computeClient).AllPages() if err != nil { if _, ok := err.(gophercloud.ErrDefault404); ok {