Copilot commented on code in PR #317:
URL:
https://github.com/apache/cloudstack-terraform-provider/pull/317#discussion_r3803944036
##########
cloudstack/resource_cloudstack_loadbalancer.go:
##########
@@ -158,7 +158,7 @@ func resourceCloudStackLoadBalancerRead(d
*schema.ResourceData, meta interface{}
d.Set("algorithm", r.Algorithm)
d.Set("name", r.Name)
- d.Set("network_id", r.Networkid)
+ d.Set("networkid", r.Networkid)
Review Comment:
This changes the state key from `network_id` to `networkid` only in `Read`,
which is likely a breaking change (or a state drift bug) unless the schema was
also renamed. Terraform attribute names are part of the public provider API; if
the schema still defines `network_id`, this will no longer populate it and may
cause perpetual diffs. Recommendation (mandatory): ensure the `d.Set(...)` key
matches the schema attribute name. If you truly need to rename the attribute,
add a migration strategy (e.g., state upgrader / equivalent) and consider
temporarily setting both keys for backward compatibility.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]