Update to use setProjectid helper function
This commit is contained in:
parent
44fc1b5d80
commit
3135706d1f
|
@ -213,15 +213,8 @@ func resourceCloudStackPortForwardRead(d *schema.ResourceData, meta interface{})
|
|||
p.SetIpaddressid(d.Id())
|
||||
p.SetListall(true)
|
||||
|
||||
// If there is a project supplied, we retrieve and set the project id
|
||||
if project, ok := d.GetOk("project"); ok {
|
||||
// Retrieve the project ID
|
||||
projectid, e := retrieveID(cs, "project", project.(string))
|
||||
if e != nil {
|
||||
return e.Error()
|
||||
}
|
||||
// Set the default project ID
|
||||
p.SetProjectid(projectid)
|
||||
if err := setProjectid(p, cs, d); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
l, err := cs.Firewall.ListPortForwardingRules(p)
|
||||
|
|
Loading…
Reference in New Issue