Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions cloudstack/resource_cloudstack_egress_firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ func resourceCloudStackEgressFirewall() *schema.Resource {
},
},

"project": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},

"parallelism": {
Type: schema.TypeInt,
Optional: true,
Expand Down Expand Up @@ -265,6 +271,10 @@ func resourceCloudStackEgressFirewallRead(d *schema.ResourceData, meta interface
p.SetNetworkid(d.Id())
p.SetListall(true)

if err := cloudstack.WithProject(d.Get("project").(string))(cs, p); err != nil {
return err
}

l, err := cs.Firewall.ListEgressFirewallRules(p)
if err != nil {
return err
Expand Down
10 changes: 10 additions & 0 deletions cloudstack/resource_cloudstack_firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ func resourceCloudStackFirewall() *schema.Resource {
},
},

"project": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},

"parallelism": {
Type: schema.TypeInt,
Optional: true,
Expand Down Expand Up @@ -256,6 +262,10 @@ func resourceCloudStackFirewallRead(d *schema.ResourceData, meta interface{}) er
p.SetIpaddressid(d.Id())
p.SetListall(true)

if err := cloudstack.WithProject(d.Get("project").(string))(cs, p); err != nil {
return err
}

l, err := cs.Firewall.ListFirewallRules(p)
if err != nil {
return err
Expand Down