From c6dab7b89ef1044a28c04e3e940675c9ccd45dae Mon Sep 17 00:00:00 2001 From: Manoj Kumar Date: Fri, 28 Aug 2026 13:33:32 +0530 Subject: [PATCH] Fix private gateway ACL update using wrong SDK setter resourceCloudStackPrivateGatewayUpdate called SetNetworkid with the private gateway's own ID instead of SetGatewayid, so any acl_id update was rejected by the API with "entity does not exist". Use SetGatewayid, matching ReplaceNetworkACLListParams' actual parameter for updating a private gateway's ACL. --- cloudstack/resource_cloudstack_private_gateway.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudstack/resource_cloudstack_private_gateway.go b/cloudstack/resource_cloudstack_private_gateway.go index c2123a15..a0697d18 100644 --- a/cloudstack/resource_cloudstack_private_gateway.go +++ b/cloudstack/resource_cloudstack_private_gateway.go @@ -172,7 +172,7 @@ func resourceCloudStackPrivateGatewayUpdate(d *schema.ResourceData, meta interfa // Replace the ACL if the ID has changed if d.HasChange("acl_id") { p := cs.NetworkACL.NewReplaceNetworkACLListParams(d.Get("acl_id").(string)) - p.SetNetworkid(d.Id()) + p.SetGatewayid(d.Id()) _, err := cs.NetworkACL.ReplaceNetworkACLList(p) if err != nil {