Merge pull request #6106 from vmfarms/port-forward-projectid-bug
Add project parameter to cloudstack_port_forward.
This commit is contained in:
commit
ae371b5492
|
@ -43,6 +43,12 @@ func resourceCloudStackPortForward() *schema.Resource {
|
|||
Default: false,
|
||||
},
|
||||
|
||||
"project": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
},
|
||||
|
||||
"forward": &schema.Schema{
|
||||
Type: schema.TypeSet,
|
||||
Required: true,
|
||||
|
@ -207,6 +213,10 @@ func resourceCloudStackPortForwardRead(d *schema.ResourceData, meta interface{})
|
|||
p.SetIpaddressid(d.Id())
|
||||
p.SetListall(true)
|
||||
|
||||
if err := setProjectid(p, cs, d); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
l, err := cs.Firewall.ListPortForwardingRules(p)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue