Skip to content

Feature: Add dest_cidr_list support to egress firewall#298

Open
elivlo wants to merge 4 commits into
apache:mainfrom
elivlo:feature/egress-firewall-destcidrlist
Open

Feature: Add dest_cidr_list support to egress firewall#298
elivlo wants to merge 4 commits into
apache:mainfrom
elivlo:feature/egress-firewall-destcidrlist

Conversation

@elivlo

@elivlo elivlo commented Jun 25, 2026

Copy link
Copy Markdown

Hi :)

This PR adds the optional set dest_cidr_list to cloudstack_egress_firewall rules to restrict egress traffic destinations, mapping to the CloudStack destcidrlist API parameter. It also refactors the rule-read path for some cleanup.

Please keep in mind that I ran the following tests in the cloudstack simulator:

make testacc TESTARGS='-run ^TestAccCloudStackEgressFirewall_'

It fixes #296 - @artem-sidorenko Does that fit your needs?
It is a complete implementation of #265

elivlo added 4 commits June 25, 2026 09:51
Adds the destcidrlist parameter to egress firewall rules, allowing
users to restrict the destination of egress traffic. The field is
optional and maps to the CloudStack API's destcidrlist parameter.

Fixes apache#296
Restructure resourceCloudStackEgressFirewallRead to use a switch on the
protocol and extract the repeated CIDR set-building into a single
cidrSetFromList helper.

The helper returns an empty set for an empty list, restoring the guard
against empty Destcidrlist consistently across all branches.

Verified with the egress firewall acceptance tests against the
cloudstack simulator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

destcidrlist isn't supported for cloudstack_egress_firewall

1 participant