Skip to content

Commit 2c28875

Browse files
committed
re-added accidentally removed cidr set from resourceCloudStackEgressFirewallRead
1 parent dc603d2 commit 2c28875

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cloudstack/resource_cloudstack_egress_firewall.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,17 @@ func resourceCloudStackEgressFirewallRead(d *schema.ResourceData, meta interface
320320
// Delete the known rule so only unknown rules remain in the ruleMap
321321
delete(ruleMap, id.(string))
322322

323+
// Create a set with all CIDR's
324+
cidrs := &schema.Set{F: schema.HashString}
325+
for _, cidr := range strings.Split(r.Cidrlist, ",") {
326+
cidrs.Add(cidr)
327+
}
328+
323329
// Update the values
324330
rule["protocol"] = r.Protocol
325331
rule["icmp_type"] = r.Icmptype
326332
rule["icmp_code"] = r.Icmpcode
333+
rule["cidr_list"] = cidrs
327334
rules.Add(rule)
328335
}
329336

0 commit comments

Comments
 (0)