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


##########
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:
   yeah, looks like you're right on this.  Fixed.



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