You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "nagaboinaramgopal (via GitHub)" <gi...@apache.org> on 2026/09/07 19:43:02 UTC
[PR] fix: store the cidr set in the managed egress firewall dummy rule [cloudstack-terraform-provider]
nagaboinaramgopal opened a new pull request, #348:
URL: https://github.com/apache/cloudstack-terraform-provider/pull/348
### Description
For a managed egress firewall, Read collects the unknown rules into a single dummy rule. `cidr_list` is a `schema.TypeSet`, so its value must be a `*schema.Set`, and the code even builds one (`cidrs`) right above for exactly this. But the dummy rule stored the uuid string in `cidr_list` instead, so reading a managed egress firewall panics with `interface conversion: interface {} is string, not *schema.Set`. Use the `cidrs` set.
### Testing
Added a unit test `TestEgressFirewallReadManagedDummyRuleCidrListIsSet` that reads a managed egress firewall, via a stub server returning one rule, and asserts each rule's `cidr_list` is a `*schema.Set`. It needs no live CloudStack:
go test ./cloudstack/ -run TestEgressFirewallReadManagedDummyRuleCidrListIsSet
Before the fix the read panics on the string; after it, the read succeeds.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: store the cidr set in the managed egress firewall dummy rule [cloudstack-terraform-provider]
Posted by "nagaboinaramgopal (via GitHub)" <gi...@apache.org>.
nagaboinaramgopal commented on PR #348:
URL: https://github.com/apache/cloudstack-terraform-provider/pull/348#issuecomment-6069431715
@sureshanaparti could you please review this when you have time?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org