vishesh92 commented on code in PR #287:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/287#discussion_r2930842064


##########
cloudstack/resource_cloudstack_cni_configuration.go:
##########
@@ -188,9 +188,18 @@ func resourceCloudStackCniConfigurationRead(d 
*schema.ResourceData, meta interfa
 
        d.Set("name", config.CniConfiguration[0].Name)
        d.Set("cni_config", config.CniConfiguration[0].Userdata)
-       d.Set("account", config.CniConfiguration[0].Account)
-       d.Set("domain_id", config.CniConfiguration[0].Domainid)
-       d.Set("project_id", config.CniConfiguration[0].Projectid)
+
+       // Only set account and domain_id if they were originally provided by 
the user
+       // to avoid drift when CloudStack returns default values
+       if _, ok := d.GetOk("account"); ok {

Review Comment:
   @bhouse-nexthop I am not sure about this. But can't we set the fields as 
compute for this?
   Right now we have `Optional: true` &  `ForceNew: true`. I am not sure if 
using computed will work correctly here or not.



-- 
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]

Reply via email to