|
|
|
|
@ -57,6 +57,11 @@ func resourceNetworkingFloatingIPV2() *schema.Resource {
|
|
|
|
|
Optional: true,
|
|
|
|
|
Computed: true,
|
|
|
|
|
},
|
|
|
|
|
"value_specs": &schema.Schema{
|
|
|
|
|
Type: schema.TypeMap,
|
|
|
|
|
Optional: true,
|
|
|
|
|
ForceNew: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -75,12 +80,16 @@ func resourceNetworkFloatingIPV2Create(d *schema.ResourceData, meta interface{})
|
|
|
|
|
if len(poolID) == 0 {
|
|
|
|
|
return fmt.Errorf("No network found with name: %s", d.Get("pool").(string))
|
|
|
|
|
}
|
|
|
|
|
createOpts := floatingips.CreateOpts{
|
|
|
|
|
FloatingNetworkID: poolID,
|
|
|
|
|
PortID: d.Get("port_id").(string),
|
|
|
|
|
TenantID: d.Get("tenant_id").(string),
|
|
|
|
|
FixedIP: d.Get("fixed_ip").(string),
|
|
|
|
|
createOpts := FloatingIPCreateOpts{
|
|
|
|
|
floatingips.CreateOpts{
|
|
|
|
|
FloatingNetworkID: poolID,
|
|
|
|
|
PortID: d.Get("port_id").(string),
|
|
|
|
|
TenantID: d.Get("tenant_id").(string),
|
|
|
|
|
FixedIP: d.Get("fixed_ip").(string),
|
|
|
|
|
},
|
|
|
|
|
MapValueSpecs(d),
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
log.Printf("[DEBUG] Create Options: %#v", createOpts)
|
|
|
|
|
floatingIP, err := floatingips.Create(networkingClient, createOpts).Extract()
|
|
|
|
|
if err != nil {
|
|
|
|
|
|