This is an automated email from the ASF dual-hosted git repository.
sureshanaparti pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/cloudstack-terraform-provider.git
The following commit(s) were added to refs/heads/main by this push:
new 5c9f54d Fix private gateway ACL update using wrong SDK setter (#329)
5c9f54d is described below
commit 5c9f54df1946662ce4c6dcc83da645f1a76a3a86
Author: Manoj Kumar <[email protected]>
AuthorDate: Wed Sep 2 10:22:52 2026 +0530
Fix private gateway ACL update using wrong SDK setter (#329)
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 c2123a1..a0697d1 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 {