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,
|
Default: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"project": &schema.Schema{
|
||||||
|
Type: schema.TypeString,
|
||||||
|
Optional: true,
|
||||||
|
ForceNew: true,
|
||||||
|
},
|
||||||
|
|
||||||
"forward": &schema.Schema{
|
"forward": &schema.Schema{
|
||||||
Type: schema.TypeSet,
|
Type: schema.TypeSet,
|
||||||
Required: true,
|
Required: true,
|
||||||
|
@ -207,6 +213,10 @@ func resourceCloudStackPortForwardRead(d *schema.ResourceData, meta interface{})
|
||||||
p.SetIpaddressid(d.Id())
|
p.SetIpaddressid(d.Id())
|
||||||
p.SetListall(true)
|
p.SetListall(true)
|
||||||
|
|
||||||
|
if err := setProjectid(p, cs, d); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
l, err := cs.Firewall.ListPortForwardingRules(p)
|
l, err := cs.Firewall.ListPortForwardingRules(p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue